Skip to content

Repair two snippets and ensure there is a validation script using data for each snippet - #18

Merged
danielfromearth merged 1 commit into
mainfrom
ducs-snippet-contract
Oct 2, 2026
Merged

danielfromearth merged 1 commit into
mainfrom
ducs-snippet-contract

Conversation

@danielfromearth

@danielfromearth danielfromearth commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the two defects in #17, and ensures there is a validation script and data variable assigned for all current snippets.

Note that runtime may take longer because assigning data will force an actual data read for each snippet.

(I'm thinking a future PR will consolidate the validation scripts into a single script, that is configurable across snippets.)

- access_gridded_hdf5.py: use dt[...].ds, and pass phony_dims="access"
  explicitly
- access_trajectory_hdf5.py: list h5py separately in the install line, since
  h5netcdf made it an optional extra in 1.8.0
- assign `data` in the 6 snippets lacking it, naming the array as read
- access_gridded_netcdf4.py: bind `data` to one time step and level, rather than grabbing the full
  global grid; also pin engine="h5netcdf" and drop the conditional
  that left `data` undefined
- add 6 validate_access_*.py wrappers reusing ducs_validation.validate()
- .gitignore: add *.h5, *.hdf5, *.tif, *.tiff
@danielfromearth danielfromearth changed the title fix(snippets): repair two snippets and apply the data contract Repair two snippets and ensure there is a validation script using data for each snippet Oct 1, 2026
@danielfromearth
danielfromearth requested review from ebolch, jschap1 and rupesh2 and removed request for rupesh2 October 1, 2026 20:06
@danielfromearth
danielfromearth merged commit 8cbeb77 into main Oct 2, 2026
2 checks passed
@danielfromearth
danielfromearth deleted the ducs-snippet-contract branch October 2, 2026 17:57
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