Thanks for considering to make a contribution to the location-allocation library.
-
Please only submit actual technical issues
-
Please make sure you don't submit a duplicate by browsing open and closed issues first and consult the CHANGELOG for already fixed issues
We welcome patches and fixes to existing clients and want to make sure everything goes smoothly for you while submitting a PR.
We use the PSF's black
to make sure the code style is consistent, and flake8
as a linter.
When contributing, we expect you to:
- close an existing issue. If there is none yet for your fix, please create one.
- write/adapt unit tests and/or mock API tests, depending on the introduced or fixed functionality
- limit the number of commits to a minimum, i.e. responsible use of
git commit --amend [--no-edit]
- use meaningful commit messages
- you can branch off
master
and raise a PR againstmaster
as well
- Clone and install locally:
git clone https://gitlab.com/gis-ops/location-allocation.git
cd location-allocation
- Create and activate a new virtual environment
python -m venv .venv
source .venv/bin/activate
- Install development dependencies:
# From the root of your git project
poetry install
- Run tests to check if all goes well:
# From the root of your git project
tox -e py38
#or
pytest --cov=location_allocation -x
- Please install the pre-commit hook, so your code gets auto-formatted and linted before committing it:
# From the root of your git project
pre-commit install
If you add or remove new functionality which is exposed to the user/developer, please make sure to document these in the docstrings. To build the documentation:
# From the root of your git project
cd docs
make html
The documentation will have been added to location-allocation/docs/build/html
and you can open index.html
in your web browser to view the changes.
We realize that re-structured text is not the most user-friendly format, but it is the currently best available documentation format for Python projects. You'll find lots of copy/paste material in the existing implementations.