Rename package to climate_toolkit; full API docs, docs site, and publish metadata#116
Conversation
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>
Sammyjoseph999
left a comment
There was a problem hiding this comment.
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_5 → ECMWF/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.mdstill has ~10climate_tookitreferences. 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>
|
Thanks for the careful review — both items fixed in 6029536. Example imports: confirmed and fixed. Root cause:
Re |
Sammyjoseph999
left a comment
There was a problem hiding this comment.
Both points from my earlier review are addressed in 6029536d — verified on the head branch:
examples/basic_usage.pynow importsclimate_toolkit(lines 1, 83, 84, 152).analysis/package_architecture_summary.mdhas no stale references.- No
climate_tookitreferences 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.
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.
Summary
Prepares the package for publication. Four areas:
1. Package rename (breaking)
climate_tookit→climate_toolkit/ distclimate-tookit→climate-toolkit, fixing the long-standing typo before first PyPI publication (PyPI names cannot be renamed after publish).import climate_toolkit;pip install "git+https://github.com/CGIAR-Climate-Data-Hub/climate-toolkit.git".2. API documentation
__init__docstring is now ahelp(ct)index.evaluate_hazardsaccepts but does not forwardgap_days/min_season_daysto the auto season detector; theagera_5source is backed by the ERA5-Land daily aggregates asset (ECMWF/ERA5_LAND/DAILY_AGGR).3. Documentation site
gh-pagesbranch after first run).4. Publish metadata & attribution
CHANGELOG.md,CITATION.cff, docs/homepage/changelog URLs inpyproject.toml,examples/basic_usage.pywalkthrough.Test plan
pytest: 589 passed, 68 subtests after renamemkdocs build --strictcleanimport climate_toolkit+ all seven functions resolve; docstrings verified viahelp()nasa_power, Nairobi 2020)🤖 Generated with Claude Code