Skip to content

Add multiplatform testing builds#438

Draft
Zeitsperre wants to merge 26 commits into
masterfrom
add-platforms
Draft

Add multiplatform testing builds#438
Zeitsperre wants to merge 26 commits into
masterfrom
add-platforms

Conversation

@Zeitsperre

@Zeitsperre Zeitsperre commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator

Pull Request Checklist:

  • This PR addresses an already opened issue (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • HISTORY.rst has been updated (with summary of main changes)

What kind of change does this PR introduce?:

  • Adds macOS builds to CI testing suite

Does this PR introduce a breaking change?:

No.

Other information:

The testing data is fetched currently from two different repositories. unix-style file locking is used when gathering these files, which isn't available on Windows. Additionally, xesmf is not available on Windows either (conda).

Will try seeing if tox builds could potentially work on Windows, otherwise I'll adjust the metadata to suggest that clisops doesn't support Windows.

@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 15886172993

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 87.164%

Totals Coverage Status
Change from base Build 15885127333: 0.0%
Covered Lines: 3110
Relevant Lines: 3568

💛 - Coveralls

@Zeitsperre Zeitsperre self-assigned this Jun 26, 2025
@Zeitsperre

Copy link
Copy Markdown
Collaborator Author

@cehbrecht Consider this PR a WIP; I need to get access to a Windows computer to see what's up, but essentially, there should be a simple way to load UNIX-style file paths on Windows and still have everything work as intended.

@Zeitsperre Zeitsperre marked this pull request as draft June 30, 2025 19:59
Zeitsperre and others added 18 commits July 8, 2025 17:21
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the project’s CI pipeline toward multi-platform coverage (macOS + Windows alongside Linux) and updates the test harness/data-fetching utilities to better support running the test suite across different OS environments.

Changes:

  • Expand GitHub Actions test matrices to include macOS and Windows (PyPI/tox) and macOS (conda/micromamba), with per-OS caching.
  • Rework test-data gathering in tests/conftest.py and clisops/utils/testing.py (data registry handling, cache dir plumbing, worker coordination).
  • Update many tests and dataset-opening helpers to use xarray.open_mfdataset(..., data_vars="all", ...) to stabilize multi-file dataset behavior.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
.github/workflows/main.yml Adds OS matrices and per-OS caching for tox/conda jobs.
clisops/__version__.py Updates copyright year.
clisops/project_utils.py Adjusts path handling for deducing projects, base dirs, ds-id mapping, and URL-to-path mapping.
clisops/utils/dataset_utils.py Improves typing and opener kwargs; changes empty-input exception type.
clisops/utils/testing.py Refactors test-data cache defaults/env handling, registry fetching, and adds custom Pooch downloader headers.
tests/conftest.py Reworks session-level test-data gathering/copying and removes older base fixtures.
tests/test_core_regrid.py Removes an unused fixture parameter.
tests/test_core_subset.py Tweaks open_mfdataset options for multi-file datasets.
tests/test_dataset_utils.py Adds data_vars="all" to multiple open_mfdataset calls.
tests/test_file_namers.py Adds data_vars="all" to open_mfdataset calls used in naming tests.
tests/test_ops_average.py Adds data_vars="all" and re-enables aux-variable test using portable paths.
tests/test_ops_subset.py Makes dataset loader more explicit about decoding and uses portable file paths.
tests/test_ops_xarray_mean.py Adds data_vars="all" when opening multi-file datasets.
tests/test_output_utils.py Adds data_vars="all" for multi-file open in test helper.
tests/test_project_utils.py Adjusts some project/path tests for portability and xarray opening behavior.
Comments suppressed due to low confidence (1)

.github/workflows/main.yml:201

  • This step is labeled macOS but is conditioned on ubuntu-latest, and it caches Linux paths (~/.cache/...) instead of the macOS ~/Library/Caches/... paths used elsewhere in this workflow. This makes macOS caching ineffective.
        if: matrix.os == 'ubuntu-latest'
        with:
          path: |
            ~/.cache/mini-esgf-data
            ~/.cache/xclim-testdata

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread clisops/utils/testing.py Outdated
Comment thread clisops/utils/testing.py Outdated
Comment thread clisops/project_utils.py
Comment on lines 126 to +128
if self._base_dir:
self._ds_id = ".".join(self._data_path.replace(self._base_dir, self._project).strip("/").split("/"))
relative_path = os.path.relpath(self._data_path, self._base_dir)
self._ds_id = ".".join(relative_path.split(os.sep))

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@copilot Can you propose a fix here?

Comment thread clisops/project_utils.py Outdated
Comment thread clisops/project_utils.py
Comment thread tests/test_project_utils.py Outdated
Comment on lines +85 to +89
cmip5_base_dir = Path(project_utils.get_project_base_dir("cmip5"))
assert Path("/mnt/lustre/work/kd0956/CMIP5/data/cmip5").match(str(cmip5_base_dir))

c3s_cordex_base_dir = project_utils.get_project_base_dir("c3s-cordex")
assert c3s_cordex_base_dir == "/mnt/lustre/work/ik1017/C3SCORDEX/data/c3s-cordex"
c3s_cordex_base_dir = Path(project_utils.get_project_base_dir("c3s-cordex"))
assert Path("/mnt/lustre/work/ik1017/C3SCORDEX/data/c3s-cordex").match(str(c3s_cordex_base_dir))
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Outdated
Zeitsperre and others added 3 commits June 19, 2026 19:11
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
@Zeitsperre

Copy link
Copy Markdown
Collaborator Author

I've gone as far as I can without a Windows VM. Will try getting one soon to finish this.

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