Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix hatch matrix setup for minimal and optional dependencies#2872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
dstansby merged 10 commits intozarr-developers:mainfrommaxrjones:minimal-tests
Apr 16, 2025

Conversation

@maxrjones
Copy link
Member

I noticed after Martin's comment in#2774 (comment) that even the 'minimal' tests include optional dependencies including fsspec and universal_pathlib. I think it's worth only including the required dependencies and those necessary for running tests / type checking in the "minimal" test environment.

@github-actionsgithub-actionsbot added the needs release notesAutomatically applied to PRs which haven't added release notes labelFeb 27, 2025
@d-v-b
Copy link
Contributor

sounds good to me

@maxrjones
Copy link
MemberAuthor

Tests are failing because the environment name changed, I'll fix this in a bit

Copy link
Contributor

@dstansbydstansby left a comment

Choose a reason for hiding this comment

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

Very 👍 this

@maxrjonesmaxrjones marked this pull request as draftFebruary 28, 2025 21:48
@maxrjonesmaxrjones changed the titleRun minimal tests without fsspec, requests, aiohttpFix hatch matrix setup for minimal and optional dependenciesApr 12, 2025
Comment on lines 150 to +158
[[tool.hatch.envs.test.matrix]]
python = ["3.11","3.12","3.13"]
numpy = ["1.25","2.1"]
version = ["minimal"]

[[tool.hatch.envs.test.matrix]]
python = ["3.11","3.12","3.13"]
numpy = ["1.25","2.1"]
features = ["optional"]
deps = ["minimal","optional"]

[[tool.hatch.envs.test.matrix]]
python = ["3.11","3.12","3.13"]
numpy = ["1.25","2.1"]
features = ["gpu"]
[tool.hatch.envs.test.overrides]
matrix.deps.dependencies = [
{value ="zarr[remote, remote_tests, test, optional]",if = ["optional"]}
]
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I determined by looking at the old logs that there were no actual differences between the minimal and optional groups of the matrix. This override setup properly includes optional dependencies for the optional group and excludes them from the minimal group.

[[tool.hatch.envs.test.matrix]]
python = ["3.11","3.12","3.13"]
numpy = ["1.25","2.1"]
features = ["gpu"]
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

We separately have thetestgpu environment, so there's no need to include another gpu feature set in the regulartest matrix. I removed it because it only makes the setup more confusing.

dstansby reacted with thumbs up emoji
run:|
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} run-coverage
-name:Upload coverage
if:${{ matrix.dependency-set == 'optional' && matrix.os == 'ubuntu-latest' }}
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

The minimal environment will have less coverage than optional, so there's no value in uploading it to codecov

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a downside to uploading it? I think it might be worth just keeping all the uploads to keep the complexity of this file down.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

It seemed to me a tradeoff between complexity in the workflow and complexity in understanding the codecov logs -https://app.codecov.io/gh/zarr-developers/zarr-python/commit/ebadec01e74acdd5bc3273be771c20a0f6a67cce. But not many people will interact with those logs so I can remove this line

Copy link
Contributor

Choose a reason for hiding this comment

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

That's fair - I tend not to look at the logs, but agree that it makes the logs a bit easier. Lets leave the line in and I'll merge 🚢

@maxrjonesmaxrjones marked this pull request as ready for reviewApril 12, 2025 16:57
Copy link
Contributor

@dstansbydstansby left a comment

Choose a reason for hiding this comment

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

For simplicity, I think might be worth keeping the codecov upload? Let me know what you think either way - otherwise this is looking 👍

run:|
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} run-coverage
-name:Upload coverage
if:${{ matrix.dependency-set == 'optional' && matrix.os == 'ubuntu-latest' }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a downside to uploading it? I think it might be worth just keeping all the uploads to keep the complexity of this file down.

@dstansbydstansby merged commit5f49d24 intozarr-developers:mainApr 16, 2025
30 checks passed
@maxrjonesmaxrjones deleted the minimal-tests branchApril 16, 2025 14:30
d-v-b pushed a commit to d-v-b/zarr-python that referenced this pull requestApr 20, 2025
…velopers#2872)* Run minimal tests without fsspec, requests, aiohttp* Retain existing test env names* Use importorskip* Specify which matrix config to upload codecov on* Remove redundant gpu env* Add obstore to min_deps definition* Fix optional dependency set* Add remote_tests set to doctest
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@d-v-bd-v-bd-v-b approved these changes

+1 more reviewer

@dstansbydstansbydstansby approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

needs release notesAutomatically applied to PRs which haven't added release notes

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@maxrjones@d-v-b@dstansby

[8]ページ先頭

©2009-2025 Movatter.jp