Skip to content

Commit

Permalink
Build + development environment switched to Poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
Dani Ramirez committed Feb 2, 2019
1 parent 78bc949 commit e590cf3
Show file tree
Hide file tree
Showing 11 changed files with 467 additions and 537 deletions.
4 changes: 0 additions & 4 deletions MANIFEST.in

This file was deleted.

26 changes: 0 additions & 26 deletions Pipfile

This file was deleted.

411 changes: 0 additions & 411 deletions Pipfile.lock

This file was deleted.

29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,31 @@ pip install -e git+https://github.com/GeographicaGS/Longitude#egg=longitude

## As developer...

Install pipenv in your development machine if you still do not have it.
### First time

Set up Python environment:
1. Install ```poetry``` using the [recommended process](https://github.com/sdispater/poetry#installation)
1. poetry is installed globally as a tool
1. It works along with virtualenvironments
1. Create a virtual environment for Python 3.x (check the current development version in ```pyproject.toml```)
1. You can create it wherever you want but do not put it inside the project
1. A nice place is ```$HOME/virtualenvs/longitude```
1. Clone the ```longitude``` repo
1. `cd` to the repo and:
1. Activate the virtual environment: `. ~/virtualenvs/longitude/bin/activate`
1. Run `poetry install`
1. Configure your IDE to use the virtual environment

```shell
$ cd [path-to-longitude-folder]
$ pipenv install
```
### Daily

To activate the virtual environment: `$ pipenv shell`. If the environment variables are defined in a `.env` file, they are loaded in this shell.
1. Remember to activate the virtual environment

## Sample scripts
### Why Poetry?

These are intended to be used with real databases (i.e. those in your profile) to check features of the library.
Because it handles development dependencies and packaging with a single file (```pyproject.toml```), which is [already standard](https://flit.readthedocs.io/en/latest/pyproject_toml.html).

## Sample scripts

You will probably need to provide credentials/api keys/urls/username/... Check each script and it will be explained there.
These are intended to be used with real databases (i.e. those in your profile) to check features of the library. They must be run from the virtual environment.

## Testing and coverage

Expand Down
3 changes: 1 addition & 2 deletions longitude/samples/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
carto_sample_config.py
postgres_sample_config.py
*_sample_config.py
Empty file removed longitude/samples/load_sys_path.py
Empty file.
5 changes: 0 additions & 5 deletions longitude/samples/sqlalchemy_sample_config.py

This file was deleted.

Loading

0 comments on commit e590cf3

Please sign in to comment.