Python client for the processing service of the ESA Sen4CAP project
Note, this project and its documentation is still in an early development stage.
The sen4cap-client package is available on PyPI, and can be
installed with pip:
pip install sen4cap-clientThe sen4cap-client package is available on conda-forge and can be
installed using mamba or conda. To install into an existing,
activated conda environment:
mamba install --channel conda-forge sen4cap-clientTo create and activate a new environment containing sen4cap-client:
mamba create --channel conda-forge --name sen4cap-client sen4cap-client
mamba activate sen4cap-clientYou can use the pixi package manager to install the conda-forge package:
mkdir sen4cap-test
cd sen4cap-test
pixi init
pixi add python
pixi add sen4cap-client
pixi shellPixi can also install the PyPI package:
mkdir sen4cap-test
cd sen4cap-test
pixi init
pixi add python
pixi add --pypi sen4cap-client
pixi shellTo install and use the sen4cap-client package from its sources on GitHub you'll
need to install both git and
pixi first. Then:
git clone https://github.com/eo-tools/sen4cap-client.git
cd sen4cap-client
pixi install
pixi shellThe installed development environment includes also JupyterLab so the recommended
way to get started is to take a look at the notebooks in the notebooks folder.
cd notebooks
jupyter-labAfter installing the sen4cap-client package in your Python environment
and activating it (conda/mamba: conda activate <your-env>, pixi: pixi shell)
make sure the sen4cap-client command-line tool is accessible: Type
sen4cap-client --helpto get an overview of the available commands and options. The first step is to configure the client, which will also serve as default configuration for the client's Python API and its GUI:
sen4cap-client configureList the available processes of the Sen4CAP processing service:
sen4cap-client list-processesInstall the sen4cap-client as described in Installation / Using GitHub
above.
To run all checks, execute
pixi run checksTo run all tests, execute
pixi run testsTo generate a coverage report, execute
pixi run coverageThe sen4cap-client code relies heavily on the
Eozilla packages
- cuiman, which provides the client implementation, and
- gavicore which provides common OGC model classes and basic utilities.
Should sen4cap-client require non-Sen4CAP-specific enhancements it
would likely be best to implement the required changes in the respective
Eozilla packages. For this, check out the Eozilla sources directly into
the project root:
git clone https://github.com/Sen4CAP/sen4cap-client.git
cd sen4cap-client
git clone https://github.com/eo-tools/eozilla.git
pixi install
pixi run testsThe resulting folder structure:
${projects}/
└── sen4cap-client/
├── ...
└── eozilla/
├── cuiman/
├── gavicore/
└── ...
Then, during development, change sen4cap-client/pyproject.toml as follows
-
Comment out the dependencies
cuimanandgavicorein the[project.dependencies]table. -
Uncomment the editable PyPI dependencies for
cuimanandgavicorein the[tool.pixi.pypi-dependencies]table.
Then run once more
pixi installThis is how to run a simple server integration test:
git clone https://github.com/Sen4CAP/sen4cap-client.git
cd sen4cap-client
git clone https://github.com/eo-tools/eozilla.git
pixi install
pixi shell
sen4cap-client configure
pytest -s scripts/integration_test.pyJupyterLab
On the remote VM start JupyterLab without opening a browser and listening on all interfaces:
cd sen4cap-client
pixi shell
jupyter lab --no-browser --ip=0.0.0.0 --port=8888It will print something like http://127.0.0.1:8888/lab?token=1e751cd... - keep this running.
On your local desktop machine (e.g., Windows or WSL2) SSH into the VM with port forwarding:
ssh -L 8888:localhost:8888 user@remote-vmNow open your local browser:
http://127.0.0.1:8888/lab?token=1e751cd20cd...
