Skip to content

Rename package to climate_toolkit; full API docs, docs site, and publish metadata#116

Merged
Sammyjoseph999 merged 10 commits into
mainfrom
feat/rename-toolkit-and-docs
Jul 8, 2026
Merged

Rename package to climate_toolkit; full API docs, docs site, and publish metadata#116
Sammyjoseph999 merged 10 commits into
mainfrom
feat/rename-toolkit-and-docs

Conversation

@peetmate

@peetmate peetmate commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Prepares the package for publication. Four areas:

1. Package rename (breaking)

  • climate_tookitclimate_toolkit / dist climate-tookitclimate-toolkit, fixing the long-standing typo before first PyPI publication (PyPI names cannot be renamed after publish).
  • Mechanical rename across 187 files; console script names were already spelled correctly and are unchanged. Lockfile regenerated.
  • Migration: import climate_toolkit; pip install "git+https://github.com/CGIAR-Climate-Data-Hub/climate-toolkit.git".

2. API documentation

  • NumPy-style docstrings for all seven public functions (previously 4 had none): every parameter with valid values, return dict structures, Earth Engine auth notes, runnable examples. Package __init__ docstring is now a help(ct) index.
  • All facts traced from code, not guessed. Two honest caveats surfaced and documented: evaluate_hazards accepts but does not forward gap_days/min_season_days to the auto season detector; the agera_5 source is backed by the ERA5-Land daily aggregates asset (ECMWF/ERA5_LAND/DAILY_AGGR).

3. Documentation site

  • MkDocs Material + mkdocstrings site: getting-started (incl. free GEE registration path), dataset reference page (all 15 sources: resolution, coverage, variables, auth, selection guide), auto-generated API reference, existing workflow docs in nav.
  • GitHub Actions workflow deploys to GitHub Pages on push to main (enable Pages → gh-pages branch after first run).

4. Publish metadata & attribution

  • CHANGELOG.md, CITATION.cff, docs/homepage/changelog URLs in pyproject.toml, examples/basic_usage.py walkthrough.
  • Funding acknowledgements (McKnight CRFS, Alliance Bioversity-CIAT, AIMS Rwanda, CGIAR Climate Data Hub / Climate Action Program AoW1) with logos in README and docs landing page.

Test plan

  • pytest: 589 passed, 68 subtests after rename
  • mkdocs build --strict clean
  • import climate_toolkit + all seven functions resolve; docstrings verified via help()
  • Live fetch smoke test (nasa_power, Nairobi 2020)

🤖 Generated with Claude Code

peetmate and others added 9 commits July 3, 2026 16:50
All seven top-level functions (fetch_climate_data, analyze_climate_statistics,
evaluate_hazards, compare_climate_periods, compare_climate_sources,
download_station_data, compare_station_to_grids) now document every parameter
with valid values, the returned structure, Earth Engine auth requirements,
and a runnable example. Package __init__ docstring becomes a help(ct) index.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fixes the long-standing typo in the package and distribution name before
first PyPI publication (PyPI names cannot be renamed after publish).
Mechanical rename across all source, tests, docs, and examples; console
script names were already spelled correctly and are unchanged.

BREAKING CHANGE: import climate_tookit -> import climate_toolkit;
pip install climate-tookit -> climate-toolkit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- MkDocs Material site with mkdocstrings API reference auto-generated
  from the NumPy docstrings (docs/api/*), getting-started guide, and
  the existing workflow docs in the nav
- GitHub Actions workflow deploying to GitHub Pages on push to main
- CHANGELOG.md (Keep a Changelog format) and CITATION.cff
- pyproject: docs dependency group; Homepage/Documentation/Changelog URLs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New docs/datasets.md documents every fetchable source: provider, native
resolution, temporal coverage, supported variables, and auth requirement,
plus a source-selection guide. fetch_climate_data's docstring source list
gains the same resolution/variable detail so help() answers the question
without leaving the REPL.

Notes honestly that the agera_5 source is backed by the ERA5-Land daily
aggregates Earth Engine asset (ECMWF/ERA5_LAND/DAILY_AGGR).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Acknowledges the McKnight Foundation Global Collaboration for Resilient
Food Systems (CRFS) programme, the Alliance of Bioversity International
and CIAT, AIMS Rwanda, and the CGIAR Climate Data Hub (Climate Action
Program, Area of Work 1) with logos and links in the README and on the
documentation site landing page.

McKnight logo sourced from Wikimedia Commons (CC BY 4.0); CGIAR logo
from cgiar.org.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
separate_signature + line_length 60 in mkdocstrings options, matching
NumPy/pandas documentation style for long signatures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replaces the generic CGIAR mark with the Climate Action program logo
(cropped from the program launch video frame) and places both funder
logos on one line at the bottom of the acknowledgements, linked to the
CRFS programme page and the Climate Action announcement.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@peetmate peetmate requested a review from Sammyjoseph999 July 3, 2026 16:28
@Sammyjoseph999 Sammyjoseph999 enabled auto-merge (squash) July 6, 2026 13:41

@Sammyjoseph999 Sammyjoseph999 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really solid PR — the rename is thorough (187 files, entry points + dist name updated, test_packaging_metadata fully migrated with no stale refs), the NumPy docstrings are excellent, and I appreciate the honest caveats (the gap_days/min_season_days not being forwarded, and the agera_5ECMWF/ERA5_LAND/DAILY_AGGR note). The MkDocs site + dataset reference are a great addition ahead of publication.

One blocking item and a couple of notes:

Must fix — a shipped example is broken by the rename

examples/basic_usage.py still imports the old package name, so it fails with ModuleNotFoundError on import:

  • line 83: import climate_tookit as ct
  • line 84: from climate_tookit.fetch_data.source_data.sources.utils.models import ClimateVariable
  • line 152: print(f"climate_tookit v{ct.__version__}\n")
  • line 1 (docstring): Basic usage of climate_tookit ...

All four should be climate_toolkit. Since the whole point here is publication-readiness, a runnable example matters — this looks like the one file the mechanical rename missed.

Minor (non-blocking)

  • analysis/package_architecture_summary.md still has ~10 climate_tookit references. Internal doc, not breaking, but worth updating for consistency in a rename PR.

Coordination note

Merging this will break two in-flight PRs that import climate_tookit.* — the API service (#111) and the ERA LTE example (#112). I'll do a rename pass on both once this lands; flagging so it's not missed.

Happy to re-approve as soon as the example imports are fixed.

examples/basic_usage.py was untracked when the mechanical rename ran
over git ls-files, so its imports still pointed at climate_tookit and
the shipped example failed on import. Also renames the ~10 stale
references in analysis/package_architecture_summary.md flagged in
review. Example verified end-to-end (nasa_power fetch, 366 rows).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@peetmate

peetmate commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the careful review — both items fixed in 6029536.

Example imports: confirmed and fixed. Root cause: examples/basic_usage.py was still untracked when the mechanical rename ran over git ls-files, so it was the one file the sweep missed. All four references now climate_toolkit, and the example verified end-to-end (nasa_power fetch returns 366 daily rows; EE-gated demos skip cleanly without credentials).

analysis/package_architecture_summary.md: the ~10 stale references renamed in the same commit.

Re grep -r tookit across tracked files is now clean. Coordination note on #111/#112 understood — thanks for offering to handle the rename pass there.

@Sammyjoseph999 Sammyjoseph999 requested a review from bjyberg July 7, 2026 21:53

@Sammyjoseph999 Sammyjoseph999 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both points from my earlier review are addressed in 6029536d — verified on the head branch:

  • examples/basic_usage.py now imports climate_toolkit (lines 1, 83, 84, 152).
  • analysis/package_architecture_summary.md has no stale references.
  • No climate_tookit references remain anywhere except the CHANGELOG entry that documents the rename.

CI is green. Thanks for the quick turnaround — approving. 🚀

Heads-up for after merge: the in-flight #111 (API service) and #112 (ERA LTE example) import climate_tookit.* and will need the rename; I'll push that to both as soon as this lands.

@Sammyjoseph999 Sammyjoseph999 merged commit fc8fae3 into main Jul 8, 2026
2 checks passed
Sammyjoseph999 added a commit that referenced this pull request Jul 8, 2026
Rename climate_tookit -> climate_toolkit across apis/ to match the merged
package rename (#116); resolve uv.lock and regenerate with the api extra.
Verified: app imports, all pages render 200, ruff clean, 22 packaging/cli
tests pass.
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.

3 participants