Thank you for your interest in contributing to istSOS4! This document will help you get started with setting up the project, running tests, following code style guidelines, and submitting pull requests.
If you have questions, feel free to open an issue or reach out on the OSGeo Discourse.
-
Fork the repository on GitHub and clone your fork:
git clone https://github.com/<your-username>/istSOS4.git cd istSOS4
-
Add the upstream remote:
git remote add upstream https://github.com/istSOS/istSOS4.git
-
Copy the example environment file and fill in your values:
cp .env.example .env
At minimum, set
SECRET_KEYbefore running the stack:SECRET_KEY=your_generated_secret_key
-
Start the development environment:
docker compose -f dev_docker-compose.yml up -d
-
The SensorThings API will be available at:
http://127.0.0.1:8018/istsos4/v1.1 -
To stop the services:
docker compose -f dev_docker-compose.yml down
istSOS4 uses pytest for testing.
pytestpytest tests/test_auth.pypytest -vMake sure the Docker services are running before executing tests that require a database connection.
istSOS4 follows consistent Python code style using black and pylint.
To automatically format your code:
black .To check formatting without making changes:
black --check .To check your code for issues:
pylint app/Please make sure your code passes both black and pylint checks before
submitting a pull request. These checks will also run automatically on your
pull request via CI.
We use a fork and pull request workflow for all contributions.
-
Fork the repository on GitHub.
-
Clone your fork and add the upstream remote (see Setup above).
-
Create a new branch for your change:
git checkout -b fix/your-fix-description
-
Make your changes and commit them with a clear message:
git add . git commit -m "fix: short description of what was fixed"
-
Keep your branch up to date with upstream:
git fetch upstream git rebase upstream/main
-
Push your branch to your fork:
git push origin fix/your-fix-description
-
Open a Pull Request on GitHub from your fork to the main istSOS4 repository. Describe what your PR does and reference any related issues (e.g.
Closes #80).
- Code is formatted with
black - Code passes
pylintchecks - Tests are added or updated where relevant
- PR description clearly explains the change
- Related issue is referenced in the PR description
Found a bug or have a feature request? Please open an issue at:
https://github.com/istSOS/istSOS4/issues
Provide as much detail as possible including steps to reproduce, expected behaviour, and actual behaviour.