Skip to content

feat: prepare climate-api for PyPI release#85

Merged
turban merged 2 commits into
mainfrom
restore/pypi-release
May 9, 2026
Merged

feat: prepare climate-api for PyPI release#85
turban merged 2 commits into
mainfrom
restore/pypi-release

Conversation

@turban
Copy link
Copy Markdown
Contributor

@turban turban commented May 9, 2026

Closes #62.

What

Prepares climate-api for PyPI publication.

Changes

Flat package layout

src/climate_api/ moved to climate_api/ at the project root. Updated pyproject.toml ([tool.uv.build-backend] module-root = ""), Makefile, and Dockerfile accordingly. No import paths change.

Blocker removed: dhis2eo git-sourced dependency

dhis2eo is removed from dependencies (it was already on PyPI as of PR #74). It is called lazily via importlib.import_module inside _get_dynamic_function, so the core API is unaffected. A ModuleNotFoundError handler now surfaces a clear install instruction if a download is attempted without the package.

Version bump: 0.1.00.1.0a1

PEP 440 alpha pre-release — invisible to pip install climate-api by default, opt-in via pip install --pre climate-api or an explicit pin.

Package metadata

Added to pyproject.toml: license, authors, readme, keywords, classifiers, [project.urls]. A LICENSE file is included at the project root.

Publish workflow

.github/workflows/publish.yml — triggers on v* tags, builds with uv build, publishes via Trusted Publishing (no API token stored in secrets).

What still needs doing before first publish

  1. Register climate-api on PyPI and configure Trusted Publishing for this repo
  2. Create a pypi environment in repo settings
  3. Push a v0.1.0a1 tag

Restores PR #75, which was accidentally merged then reverted.

@turban turban merged commit 4907c64 into main May 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PyPI release: make climate-api installable via pip install climate-api

1 participant