Development & Contributing¶
This page explains how to work on sdmxflow locally: dev environment, tests/lint, docs preview, and how to add provider support in a disciplined way.
Local dev setup¶
This project uses uv for development.
Run tests¶
Lint and format¶
Docs preview (Zensical)¶
Preview locally:
Build the static site:
Repository structure (high level)¶
sdmxflow/dataset.py: user-facingSdmxDatasetentrypoint and refresh workflowsdmxflow/download/: provider download implementationssdmxflow/query/: upstream metadata queries (e.g., “last updated”)sdmxflow/metadata/: metadata schema + read/write helperssdmxflow/extract/: structure/codelist extractiontests/: unit tests (provider branches, error classification, contracts)
How to add a provider (implementation outline)¶
Provider support should preserve the stable artifact contract:
dataset.csvwith leadinglast_updatedmetadata.jsonwith append-only version historycodelists/extraction and mapping
Acceptance criteria for a new provider:
-
Change detection
-
Implement an upstream “last updated” resolver for the provider.
- Add unit tests for changed vs unchanged behavior.
-
Download and materialization
-
Implement a downloader that writes a provider slice to a CSV without the internal
last_updatedcolumn. - Ensure
append_version_slice()can tag it and append deterministically. -
Structures and codelists
-
Ensure structures can be downloaded and codelists can be mapped from dataset columns.
-
Error classification
-
Timeouts, unreachable errors, and interruptions should raise typed
sdmxflowerrors. -
Docs update
-
Add the provider to Provider Support and describe any provider-specific caveats.
PR expectations¶
- Keep changes focused and additive.
- Update docs when behavior changes.
- Add tests for new branches and error cases.
See the repository contributing guide for details:
Release notes (PyPI)¶
Publishing to PyPI is automated via GitHub Actions on version tags matching v* (e.g. v0.1.1).
The publish workflow validates that the tag version matches pyproject.toml before building and publishing.
Prerequisite: configure PyPI “Trusted Publishing” (OIDC) for the GitHub repository so the publish step can upload without storing an API token in GitHub secrets.