Skip to content

Development - Contributing

Issues and pull requests are more than welcome: github.com/sentinel-hub/titiler-openeo/issues

dev install

git clone https://github.com/sentinel-hub/titiler-openeo.git
cd titiler-openeo

python -m pip install -e ".[test,dev]"

Authentication Testing with Keycloak

The project includes a Keycloak instance for testing OpenID Connect authentication:

  1. Start the development environment:
    docker compose up
    

This will start: - API service at localhost:8081 - openEO Web Editor at localhost:8080 - Keycloak at localhost:8082

  1. Access Keycloak admin console at localhost:8082/admin
  2. Username: admin
  3. Password: admin

  4. Create a new client:

  5. Go to "Clients" → "Create client"
  6. Client ID: titiler-openeo
  7. Client type: OpenID Connect
  8. Click "Next"
  9. Enable "Client authentication"
  10. Enable "Authorization"
  11. Click "Save"

  12. Configure client settings:

  13. Valid redirect URIs: http://localhost:8080/* for the openEO editor
  14. Web origins: http://localhost:8080 for the openEO editor
  15. Click "Save"

The environment includes several pre-configured settings: - GDAL optimization settings for performance - Debug mode enabled - STAC API endpoint set to stac.eoapi.dev - Keycloak OIDC configuration

  1. Create a test user:
  2. Go to "Users" → "Add user"
  3. Username: test
  4. Email: test@example.com
  5. Click "Create"
  6. Go to "Credentials" tab
  7. Set password: test123
  8. Disable "Temporary"
  9. Click "Save password"

The Keycloak server will be available at localhost:8082 for testing OIDC authentication flows.

pre-commit

This repo is set to use pre-commit to run isort, flake8, pydocstring, black ("uncompromising Python code formatter") and mypy when committing new code.

pre-commit install

Run tests

python -m pytest --cov=titiler.openeo --cov-report=xml --cov-append --cov-report=term-missing

Docs

git clone https://github.com/sentinel-hub/titiler-openeo.git
cd titiler-openeo
python -m pip install -e ".[docs]"

Hot-reloading docs:

mkdocs serve -f docs/mkdocs.yml

To manually deploy docs (note you should never need to do this because Github Actions deploys automatically for new commits.):

```bash mkdocs gh-deploy -f docs/mkdocs.yml