Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make dependencies easier to manage for development #264

Merged
merged 7 commits into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/reference/developer_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
```
5. Install dependencies and pre-commit.
```
poetry install
poetry install --with dev # includes development dependencies
poetry run pre-commit install
```

Expand Down Expand Up @@ -43,6 +43,14 @@ poetry run python buildingmotif/api/app.py
```
API will run on localhost:5000

### Using Postgres

**In Development**: While we find SQLite much easier to use for development, there are reasons to use Postgres as the backend database for BuildingMOTIF during development.
We recommend use of the `psycopg2-binary` package for interacting with Postgres for development. *This will be installed automatically as part of installing development dependencies. Make sure you use `poetry install --with dev`*.

**In Production**: To use Postgres as the backend database in a production deployment, we recommend installation of BuildingMOTIF with the `postgres` feature (`pip install BuildingMOTIF[postgres]`).
This will install the `psycopg2` library which is [recommended over `psycopg2-binary` for production settings](https://pypi.org/project/psycopg2-binary/). If you are using BuildingMOTIF as a dependency in another project, make sure to include the `postgres` feature; for example, to add BuildingMOTIF to a [Poetry-based](https://python-poetry.org) project, use `poetry add BuildingMOTIF[postgres]`.

## Continuous Integration

The CI process for developers' local clones and the remote repository should be the same for reproduceability, i.e. the commands in the following files should be the same (with *slight* differences).
Expand Down
Loading