Fix/cmip7 use metadata not cmip6 tables#261
Draft
JanStreffing wants to merge 6 commits intoprep-releasefrom
Draft
Fix/cmip7 use metadata not cmip6 tables#261JanStreffing wants to merge 6 commits intoprep-releasefrom
JanStreffing wants to merge 6 commits intoprep-releasefrom
Conversation
The entry_points() API changed between Python 3.9 and 3.10: - Python 3.9: entry_points() returns dict-like object - Python 3.10+: entry_points(group='name') with keyword argument Use try/except to detect the API version at runtime. Fixes TypeError: entry_points() got an unexpected keyword argument 'group'
…6_table-based approach - Use user-specified CMIP7_DReq_metadata file for DataRequest loading - Fix cmip6_cmor_table -> cmip6_table key mismatch in table.py - Extract table IDs from cmip6_table values not compound name prefix - Add warning when rules have no matching data_request_variables - Add debug logging to find_matching_rule for troubleshooting This partially addresses the architectural issue where CMIP7 is forced into CMIP6's table-based structure. Full compound name matching still needs implementation (see CMIP7_ARCHITECTURE_ISSUE.md). Fixes silent failure where rules were dropped with no user feedback.
Add step-by-step failure scenario showing: - Silent failure symptoms - Root cause discovery process (3 layered bugs) - Log output at each debugging stage - Key symptoms and workarounds
The branch fixes immediate bugs (silent failure, config ignored) but architectural issues persist (cmip6_table dependency, partial matching).
- Index variables by full compound name instead of cmip6_table - Implement exact compound name matching for CMIP7 (find_matching_rule_cmip7) - Generate synthetic table headers from variable metadata - Remove dependency on cmip6_table field for CMIP7 data loading - Add comprehensive unit tests for synthetic header generation - Maintain full backward compatibility with CMIP6 and existing CMIP7 metadata Resolves critical AttributeError for table_header in CMIP7 processing. Addresses architectural issues identified in CMIP7_ARCHITECTURE_ISSUE.md. Tests: 15 passed, 1 skipped
JanStreffing
commented
Mar 30, 2026
|
|
||
| table_ids = set( | ||
| v.get("cmip6_cmor_table") for v in all_var_info["Compound Name"].values() if v.get("cmip6_cmor_table") | ||
| v.get("cmip6_table") for v in all_var_info["Compound Name"].values() if v.get("cmip6_table") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor CMIP7 to use native compound name architecture
merge after #257