Development and contributing - h-janes/flask-sitemapper GitHub Wiki
Thank you for contributing to the project! All issues and pull requests are highly appreciated.
Development Requirements
The following Python libraries will be installed automatically to a virtual environment by poetry during setup.
- flask
- jinja2
- black
- isort
- pytest
Project Setup
Install poetry if not already installed.
pip install poetry
Clone the repository and enter the repository's directory.
git clone https://github.com/h-janes/flask-sitemapper
cd flask-sitemapper
Create the poetry virtual environment and install dependencies.
poetry install
You may want to configure your editor to use the virtual environment for linting and debugging. You can find the path of the virtual environment with the command:
poetry env info --path
Code Style
Flask Sitemapper uses black for code formatting and isort for import ordering.
It is recommended that you configure your editor to run black and isort on save, making sure that they access the configurations defined in pyproject.toml
Otherwise, you should ensure that your code conforms to these style standards before submitting a pull request.
Testing
Tests are stored in the tests directory. You should ensure that all tests are passing before creating a pull request. If you create a pull request with new features, creating new tests for your additions is highly appreciated. You can run all tests with the command:
poetry run pytest
Building
The project can be built with the command:
poetry build
This should generate a dist directory containing a .tar.gz file and a .whl file.