Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
199 data request 20km regional projections for cordex cmip6 queenslan…
…d future climate science (#219) * Updated .gitignore to include some vs code settings * * Added type hints * Replaced a couple of try/excepts with .get in `src/access_nri_intake/catalog/translators.py` * Updated a misleading docstring * More type hints * Type hint upddates * Updated data_vars => variables in parse_access_ncfile to allow coordinate variable searching & indexing * Updated all the builders to use a dataclass rather than a tuple: likely to be necessary for passing around coordinates as well as data variables as we begin to make coordinates indexable - I think we'll begin to get confused about what belongs where. * - Updated the builders to use separate coordinate & variables dataclasses that are fed into a dataclass holding all the coordinate and data variables from a netCDF file. - Updated tests so that they are all passing: tests now expect to find coordinate variables from the netCDF files as well as data variables. - Some minor changes to make code more readable - changed long tuples to dataclasses & dictionaries where possible. * - Added mypy checks for 3.9..3.12. Note type hints fail on Python3.9 due to use of '|' type union syntax - might be worth consideration? - Removed a couple of unused imports, cleaned up some comments * Rewrote type hints to be compatible with Python3.9 (T | None => Optional[T], etc) * Fixed some issues tests weren't catching * Renamed => - makes indexing more consistent * Fixed a couple of issues relating to changing from coords => coord in search (forgot to test) * Add cmip6_ig45 to catalog * - Moved coordinate variables back into variables (simpler interface) - Updated tests to better respect moving coordinate variables back into variables - Moved mypy setup stuff into to 'pre-commit-config.yaml' * Cleaned up _cmip_realm_translator & added sorting to test (order unimportant, causing unnecessary test failures) * Added _DispatchKeys dataclass to hold tagnames * Refactored a bunch of the translations out to the DefaultTranslator * Updated translators.py to include CordexTranslator, added config/cordex.yaml and config/metadata_sources/cordex-ig45/metadata.yaml * Working cordex translator * Revert "Merge branch '660-coordinate-variables' into 199-data-request-20km-regional-projections-for-cordex-cmip6-queensland-future-climate-science" This reverts commit 27e460f, reversing changes made to 0c96e28. * - Updated tests (covered missing lines introduced by refactor found by sentry) - Updated cmip6.yaml as a different translator is required for Cordex experiments as main CMIP6 experiments. * - Renamed experiment in metadata.yaml - Updated path for cordex.yaml file * Add missing newlines to end of yaml & json files --------- Co-authored-by: Marc White <[email protected]>
- Loading branch information