-
Notifications
You must be signed in to change notification settings - Fork 97
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tests' broken python version matrix #947
Conversation
I will automatically update this comment whenever this PR is modified
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, I think we're still missing something. Here's what I see in the 3.13 int. tests in the "Run integration tests" step of the workflow:
Run nox -s integration-tests -- --cov=*** --cov-report=term-missing --capture=no --tb=native --log-cli-level=INFO
nox -s integration-tests -- --cov=*** --cov-report=term-missing --capture=no --tb=native --log-cli-level=INFO
shell: /usr/bin/bash -e {0}
env:
UV_CACHE_DIR: /home/runner/work/_temp/setup-uv-cache
pythonLocation: /opt/hostedtoolcache/Python/3.11.11/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.11/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.11/x64
Python[2](https://github.com/nsidc/earthaccess/actions/runs/13247621820/job/36977882662#step:7:2)_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.11/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.11/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/[3](https://github.com/nsidc/earthaccess/actions/runs/13247621820/job/36977882662#step:7:3).11.11/x64/lib:/opt/hostedtoolcache/Python/3.13.1/x6[4](https://github.com/nsidc/earthaccess/actions/runs/13247621820/job/36977882662#step:7:4)/lib
Could this be an issue with how we're calling nox
itself? Is there something we need to pass to nox
to tell it to use the correct python version?
This does appear to be a Nox problem. I personally am against using Nox in CI because it introduces an extra layer of indirection to reason about. I'm not sure how to resolve this without removing Nox. Any idea? |
I believe this line: is setting up nox itself using the matrix python version, which according to the docs should use the same python version for its environments: But, I think we can just force it by adding:
To the nox command: |
Looks like the wntrblm/nox action isn't respecting the python version at all. Here's it's supposed to use python 3.10 to setup nox, but it uses 3.11 |
I don't understand why we're doing uv setup and nox setup, so I removed uv. Let's see what happens. |
Also worth reading this: wntrblm/nox#735 I'll circle back around to this later today if it's still open |
Looks like that's not how this works.
This very not maintainable. It requires a significant amount of knowledge of the nooks and crannies of Nox do complex CI things like this. I'd like to remove Nox and go back to running the tests directly in CI using |
Sounds good to me. |
I would pose, that if we can't figure out how to use nox in CI, then it's not really something we should expect our users to figure out. Ergo the dogfooding principle: https://en.wikipedia.org/wiki/Eating_your_own_dog_food |
Using nox in CI is significantly different than using it as a user -- I don't see any way an end-user can run in to this problem, and I don't think we expect (or want) end-users to be testing with every version of Python unless they are comfortable doing that. We should absolutely be dogfooding Nox locally. That's how I run tests. |
@chuckwondo @jhkennedy tests are running on the correct version now! |
Unit tests are also all running on 3.11. Working on that too |
Co-authored-by: Joseph H Kennedy <me@jhkennedy.org>
Co-Authored-By: Joseph H Kennedy <me@jhkennedy.org>
1cf3750
to
b81c2b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! The CI setup is definitely a lot more straightforward now. 🥇
faa295b
to
b81c2b6
Compare
Woops, pushed a commit to the wrong PR, so force-pushed to HEAD~1. |
Use a separate cache for each python version matrix value.
Pull Request (PR) draft checklist - click to expand
contributing documentation
before getting started.
title such as "Add testing details to the contributor section of the README".
Example PRs: #763
example
closes #1
. SeeGitHub docs - Linking a pull request to an issue.
CHANGELOG.md
with details about your change in a section titled## Unreleased
. If such a section does not exist, please create one. FollowCommon Changelog for your additions.
Example PRs: #763
README.md
with details of changes to theearthaccess interface, if any. Consider new environment variables, function names,
decorators, etc.
Click the "Ready for review" button at the bottom of the "Conversation" tab in GitHub
once these requirements are fulfilled. Don't worry if you see any test failures in
GitHub at this point!
Pull Request (PR) merge checklist - click to expand
Please do your best to complete these requirements! If you need help with any of these
requirements, you can ping the
@nsidc/earthaccess-support
team in a comment and wewill help you out!
Request containing "pre-commit.ci autofix" to automate this.
📚 Documentation preview 📚: https://earthaccess--947.org.readthedocs.build/en/947/