Skip to content

Clarify install docs for Gadi/submodules; add actionable submodule error - #607

Merged
rbeucher merged 2 commits into
mainfrom
docs/gadi-analysis3-and-submodule-install-fix
Aug 11, 2026
Merged

Clarify install docs for Gadi/submodules; add actionable submodule error#607
rbeucher merged 2 commits into
mainfrom
docs/gadi-analysis3-and-submodule-install-fix

Conversation

@rbeucher

Copy link
Copy Markdown
Member

Summary

  • A user hit ModuleNotFoundError: No module named 'access_moppy.vocabularies.CMIP6_CVs' after pip install . from a local clone. Root cause: vocabularies/CMIP6_CVs (and the other CV/table dirs) are git submodules, and a clone made without initialising them ships an empty package-data glob, so the CMOR CVs/tables go missing at runtime. Verified PyPI's published wheel already bundles this data correctly (unaffected).
  • README/docs: add an NCI Gadi installation section pointing at the ACCESS-NRI conda/analysis3-latest module (no pip install needed), and document git clone --recurse-submodules / git submodule update --init --recursive for source installs.
  • vocabulary_processors.py: wrap the importlib.resources.files() calls used to load CV/table data in a _vocab_files() helper so a missing-submodule ModuleNotFoundError gets an actionable message instead of a bare traceback.

Test plan

  • pixi run -e dev pytest tests/ -k "vocabulary" -q — 180 passed
  • Manually loaded CMIP6Vocabulary for Amon.pr to confirm normal loading still works
  • Simulated a missing submodule module path to confirm the new error message fires
  • Downloaded the published PyPI wheel and confirmed vocabularies/CMIP6_CVs/ etc. are already bundled correctly

🤖 Generated with Claude Code

A user hit ModuleNotFoundError for access_moppy.vocabularies.CMIP6_CVs
after `pip install .` from a local clone: the vocabularies/ directories
are git submodules, and a clone made without initialising them ships an
empty package-data glob, so the CMOR CVs/tables go missing at runtime.
PyPI/conda distributions already bundle this data correctly and are
unaffected.

- README/docs: add an NCI Gadi section pointing at the ACCESS-NRI
  conda/analysis3-latest module (no pip install needed), and document
  `git clone --recurse-submodules` / `git submodule update --init
  --recursive` for source installs.
- vocabulary_processors.py: wrap the importlib.resources.files() calls
  used to load CV/table data in a _vocab_files() helper that turns a
  missing-submodule ModuleNotFoundError into an actionable message.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.1%. Comparing base (2b0d546) to head (b0a8e05).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/access_moppy/vocabulary_processors.py 50.0% 9 Missing ⚠️

❌ Your patch status has failed because the patch coverage (50.0%) is below the target coverage (90.0%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #607     +/-   ##
=======================================
- Coverage   75.1%   75.1%   -0.0%     
=======================================
  Files         38      38             
  Lines       8070    8075      +5     
  Branches    1517    1517             
=======================================
+ Hits        6061    6064      +3     
- Misses      1688    1690      +2     
  Partials     321     321             
Flag Coverage Δ
unit 75.1% <50.0%> (-<0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rbeucher
rbeucher merged commit 2d540b9 into main Aug 11, 2026
2 checks 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.

1 participant