Contributing
This page is intended for project developers. It describes the development workflow.
Requirements
To develop the present project you would need:
Contribution Workflow
Clone
-
Clone the GitHub repo:
Branch
-
Create a feature branch for your changes from
main:where
FEATURE/MY_CHANGEis the name of the branch.
Tip
Examples of development names
feature/add-download-endpointfix/rasterio-import-errordocs/update-contributingrefactor/download-serviceperf/parallel-downloadstest/add-download-tests
Install dependencies
-
Create projects's python environment with all dependency groups including the optional ones in accordance with
pyproject.toml: -
Install the backend
SNAPJava package (if not already installed) and subsequently configure it usinguv: -
Install all git hooks in accordance with
.pre-commit-config.yaml: -
Safely set your CDSE credentials as environment variables of the system:
Note
CDSE credentials
CDSE credentials are required to download Sentinel-3 data. Script s3lst-ds-set-cdse
will prompt the user to provide their CDSE mail and password. The script will
subsequently write them to file ~/.config/cdse_credentials.sh with user-only read
and write permissions and source it in ~/.bashrc file. You may check the created
credentials file using the command:
Note that if you would like to remove the credentials from the file at a later time, you may run:
Make changes to the Python source code
- Make your changes in the code by following the coding style guide of Python Enhancement Proposal 8 (PEP 8).
Make changes to the documentattion source code
-
Render HTML in a local development server from the source documenting code at the /docs folder and auto-reload for changes in it:
Commit and push changes
-
Commit your changes and push them to the remote repo:
where
MESSAGEis the commit message to set.
Note
Automatic executions on commit
As defined in
.pre-commit-config.yaml,
pre-commit package is in this project used to run several
git hooks on commit:
- Project syncing (using
uv sync). uv.lockfile update (usinguv lock).- Code lint check (using
ruff check). - Code formatting (using
ruff format).
If any of these fails, the commit operation is aborted. Note that project syncing is also automatically performed after checkouts, merging, amending and rebasing.
Automatic executions after a push
As defined in the GitHub workflow file
ci.yml,
several are executed by GitHub after a push:
- Code lint check (using
ruff check). - Code format check (using
ruff format --check).
Note that regardless of any of these failing, the push proceeds.
Open pull request
- In GitHub open a pull request
using
mainbranch as base and the development branch as compare one, so that other developers and maintainers may review the changes, comment on and approve them and also request corrections.
Note
Automatic executions on the creation of a pull request
As defined in the GitHub workflow file
ci.yml,
the push-specific jobs are also run on the creation of a pull request.