Skip to content

Conversation

@pp-mo
Copy link
Owner

@pp-mo pp-mo commented Aug 11, 2025

Shadow to #145
Just to preview tests for that, since CI runs here !

@valeriupredoi

This comment was marked as outdated.

@valeriupredoi
Copy link
Contributor

nevermind, the test I was saying it fails locally is fine, I was using a dev Xarray where I'd mess things up - all fine for me locally:

==== 786 passed, 49 skipped, 109 warnings in 22.59s ======

This is with most of the deps installed from conda-forge - see attached env file. I really strongly recommend you folks use conda-forge deps and not PyPI ones, those are always a bit blergh from many causes. Do you want me to pop a conda env file and create the env from that?

condaenv_ncdata.txt

@valeriupredoi
Copy link
Contributor

ah I can't push to branch, but here is aht I was just about to push: in the GHA workflow, pop a call to a minimal environment file:

        with:
          miniforge-version: latest
          activate-environment: testenv
          environment-file: environment.yml

and get dask (at least) from conda forge in a conda environment.yml:

---
name: ncdata
channels:
  - conda-forge
  - nodefaults

dependencies:
  - dask
  - netCDF4

I can help you get those test deps to be test deps in the pyproject toml file afterwards, but I reckon stuff like xarray and dask should definitely be installed in the main dev env and from conda-forge 🍺

@valeriupredoi
Copy link
Contributor

valeriupredoi commented Aug 11, 2025

nevermind my blabbering above - I had to go use your full test suite - that test is not from ncdata, it's from iris sample data testing, I can see it failing now, locally and on forked GHA, sorry for having been Thomas the Unbeliever 😆

# Zarr2 metadata
if "axis" not in var.attrs:
std_axes = ["latitude", "longitude", "time"]
if not list(set(var.attrs.values()) & set(std_axes)):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if not list(set(var.attrs.values()) & set(std_axes)):
if not [s for s in std_axes if s in str(var.attrs.values())]:

Copy link
Contributor

@valeriupredoi valeriupredoi Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will fix that failing test, and all the almost 1000 tests pass now 😃 The problem is that this method (and the previous approach) are not 100% exhaustive in figuring out which are coords that should have realized data, so a few of these warnings will be raised for those that the check misses them, but beats me how I can create a bulletproof check, given the variety of names and metadata, and differences between Zarr2 and Zarr3 (alas, most of them don't raise the warning)

@pp-mo
Copy link
Owner Author

pp-mo commented Aug 13, 2025

NB As explained valeriupredoi#2 I actually think it's better to go back to #145.
Please see my responses there ...

@pp-mo pp-mo closed this Aug 13, 2025
@pp-mo pp-mo deleted the pp__add_warning_and_tests branch August 14, 2025 14:17
@scitools-ci scitools-ci bot removed this from 🚴 Peloton Sep 11, 2025
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.

3 participants