Thank you for your interest in contributing to geopins!
Since geopins is at early stages of development, please ensure a GitHub Issue is opened before starting work on a new feature or bug fix. This helps to ensure that the feature is aligned with the project's goals and that there is no duplication of effort. Sometimes these Issues don't have enough guidance in them, so consider asking for some more guidance from the ticket creator before getting started.
Most of the setup described below is automated. Try invoking the tasks/dev_setup command.
uv is required to install the development environment. You can install it using the instructions here:
https://docs.astral.sh/uv/getting-started/installation/
Then with the current working directory set to the project root, run:
uv syncThis project uses the prek framework to manage Git hooks. To install the hooks,
run:
uv run prek installTo run the tests, simply run:
uv run pytestTests are written using the pytest framework. The test suite is located in the tests directory. The tests are organized into subdirectories with a directory structure that mirrors the structure of the code being tested. This makes it easy to find the tests for a specific module or function.
PRs should ideally include tests for any new features or bug fixes.
To diagnose test leakage, run this command:
uv run detect-test-pollution --fuzz --tests ./testsand follow the prompts to bisect the tests.
To profile the test suite, use pyinstrument:
uv run pyinstrument -m pytestFor more in-depth exploration, try the -r html option to generate an HTML report:
uv run pyinstrument -r html -m pytestTo profile the speed of test collection (which is mostly related to import times), you can also use pyinstrument:
uv run pyinstrument -m pytest --collect-onlyGit is used for version control, using Trunk-based development.
It is recommended that you use signed commits, although this is not a requirement. Please see this guide from the VS Code project for instructions on how to do this: https://github.com/microsoft/vscode/wiki/Commit-Signing
This project uses Import Linter to
enforce a software architecture. Refer to the [[tool.importlinter.contracts]] sections
in pyproject.toml to understand the structure of the project.