Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Latest commit

 

History

History
86 lines (61 loc) · 2.7 KB

CONTRIBUTING.md

File metadata and controls

86 lines (61 loc) · 2.7 KB

Contribution Guidelines

Thanks for considering to make a contribution to the location-allocation library.

Table of Contents

Issues

  • 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

Submitting fixes

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 against master as well

Setup

  1. Clone and install locally:
git clone https://gitlab.com/gis-ops/location-allocation.git
cd location-allocation
  1. Create and activate a new virtual environment
python -m venv .venv
source .venv/bin/activate
  1. Install development dependencies:
# From the root of your git project
poetry install
  1. Run tests to check if all goes well:
# From the root of your git project
tox -e py38
#or
pytest --cov=location_allocation -x
  1. 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

Documentation

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.