feat(esm_catalog): PR-0 — package scaffold#1483
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d setup.cfg, orphan docs stub Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ncompatible base pins
…d CI Move tests from src/esm_catalog/tests/ to tests/test_esm_catalog/ to match repo convention (tests/test_<package>/, as used by esm_environment, esm_parser, esm_viz, etc.). The scaffold smoke tests only need click, already a base dependency, so the main pytest suite picks them up without the isolated-install workaround — drop the now-redundant dedicated workflow. Also collapse the dead [tool.pytest] (unrecognized by pytest in setup.cfg) and the now-unneeded src/esm_catalog norecursedirs exclusion into a single working [tool:pytest] section. Per review from @mandresm on PR #1483.
The previous commit (7a910f5) removed the dedicated workflow on the assumption that PR-0's click-only smoke tests didn't need it. But the rest of the PR stack (A1a through C2) extends this exact workflow's dependency-install line incrementally (xarray/netCDF4, cfgrib, duckdb, fastapi, pytz, ...) — it's the only thing running esm_catalog tests in CI for the whole stack, since the base install_requires pins ruamel.yaml.clib==0.2.7, which fails to build on Python 3.12, and the main esm-tools CI matrix only covers 3.8-3.11. Restoring it, repointed at tests/test_esm_catalog (and adding that path to the trigger filters). Also restore the tests/test_esm_catalog exclusion in [tool:pytest] norecursedirs (just relocated from src/esm_catalog) — once downstream PRs add pystac/xarray-importing tests there, the main suite's `pytest -v .` step (which doesn't install catalog extras) would otherwise fail to collect them.
…t scan The main esm-tools CI workflow runs `pytest --doctest-modules src`, which collects and executes doctests from every source module, not just tests/. The original norecursedirs entry excluded all of src/esm_catalog (not just its old tests/ subdir), which incidentally also kept the main suite from executing src/esm_catalog/uri.py's doctest example — that example imports universal-pathlib, an extras- only dependency the main suite doesn't install. Dropping that exclusion (in 7a910f5) broke `basic_tests` on every PR from A1a onward. Restoring it alongside the relocated tests/test_esm_catalog exclusion, matching the actual end-state norecursedirs.
|
Summary of how the review feedback above landed, since the back-and-forth in the threads (a couple of which I had to self-correct) is easier to follow as one note: Tests relocated — moved from Dedicated
Catalog deps stay under the Also fixed while rebasing: a pre-existing bug surfaced on Python 3.9 — All 13 PRs in the stack (#1483–#1496) have been rebased onto the corrected base and are green: 162 catalog tests passing on both Python 3.9 and 3.12, plus the full main esm-tools suite. |
|
Thanks for the summary. I'm going to have a look at it now. |
|
Hi @siligam, this is ready to be merged, but before merging it needs bumping and tests to finish. We have a bumping workflow that you'll see me trigger below. I am going to bump the version as a patch. It is not a patch but is not either a full feature so that's why I'll be using patch. |
|
#bump #patch |
PR-0 — esm_catalog package scaffold
First slice of breaking up #1473 (the 32k-line dump) into small, reviewable PRs, per @mandresm's review request. This PR is pure scaffold — no functionality yet — so the following feature PRs land on a clean, CI-tested foundation.
What's here (+102 lines, 9 files)
src/esm_catalog/__init__.py— package marker +__version__src/esm_catalog/cli.py— minimal Click group (esm-catalog); subcommands arrive in later PRssetup.py—esm-catalogconsole script + acatalogoptional extra (pystac/shapely/universal-pathlib). Nomcpextra — the MCP/LLM layer is being dropped from the product (archived on tagarchive/mcp-llm)src/esm_catalog/tests/test_smoke.py— import +--versionsmoke test.github/workflows/esm-catalog-tests.yml— dedicated CI job (installs.[catalog], runs the catalog tests on Py 3.9 + 3.12)setup.cfg— addssrc/esm_catalogto[tool:pytest] norecursedirsso the main esm_tools suite ignores catalog tests (the dedicated job above runs them).gitignore(*.duckdb),docs/esm_catalog_index.rststubNotes for review
catalogdeps are kept behind an optional extra so they don't touch the base install.[tool.pytest](dot) section insetup.cfgis left untouched (worth a separate cleanup; pytest already ignores it).Context
Part of the WP1 catalogue decomposition. Full plan: decomposition design. Next: PR-A1a (STAC data-model foundation), stacked on this branch.