-
Notifications
You must be signed in to change notification settings - Fork 9
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
gh-468: fix virtualenv in testing #471
base: main
Are you sure you want to change the base?
Conversation
@@ -7,8 +7,12 @@ | |||
import nox | |||
|
|||
# Options to modify nox behaviour | |||
nox.options.default_venv_backend = "uv|virtualenv" |
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.
Fixed my issues locally using uv
astral-sh/uv#6579
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.
I remember we could not use uv
because of astral-sh/uv#1794
I am surprised that it is working now. We still use the --prefer-binary
flag in our tests -
glass/.github/test-constraints.txt
Line 10 in f6cfde4
--prefer-binary |
.github/workflows/test.yml
Outdated
- name: Install ubuntu dependencies for fitsio | ||
run: |- | ||
sudo apt-get update | ||
sudo apt-get install -y libbz2-dev |
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.
@@ -38,7 +38,7 @@ jobs: | |||
- name: Cache nox | |||
uses: actions/cache@v4 | |||
with: | |||
key: test-${{ hashFiles('pyproject.toml') }} | |||
key: test-${{ hashFiles('pyproject.toml') }}-${{ env.pythonLocation }} |
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.
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.
This is weird. I have never encountered this bug before.
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.
Thanks for digging into this, @paddyroddy! See my comments below -
@@ -38,7 +38,7 @@ jobs: | |||
- name: Cache nox | |||
uses: actions/cache@v4 | |||
with: | |||
key: test-${{ hashFiles('pyproject.toml') }} | |||
key: test-${{ hashFiles('pyproject.toml') }}-${{ env.pythonLocation }} |
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.
This is weird. I have never encountered this bug before.
@@ -166,7 +166,7 @@ def trapezoid_product( | |||
y = np.interp(x, *f) | |||
for f_ in ff: | |||
y *= np.interp(x, *f_) | |||
return np.atleast_1d(np.trapezoid(y, x, axis=axis)) | |||
return np.trapezoid(y, x, axis=axis) # type: ignore[no-any-return] |
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.
Should the mypy fixes be another PR?
@@ -7,8 +7,12 @@ | |||
import nox | |||
|
|||
# Options to modify nox behaviour | |||
nox.options.default_venv_backend = "uv|virtualenv" |
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.
I remember we could not use uv
because of astral-sh/uv#1794
I am surprised that it is working now. We still use the --prefer-binary
flag in our tests -
glass/.github/test-constraints.txt
Line 10 in f6cfde4
--prefer-binary |
Fixes #468, #479. The problem initially why the tests were failing was esheldon/fitsio#413 esheldon/fitsio#414. I have solved this by reinstating #396.
However, the tests were failing (just for
3.11
) for a very nichenox
bug wntrblm/nox#735. I'm still not particularly happy withnox
, the ecosystem seems immature. I considered switching totox
#475, as I haven't had those issues before. However, this proved a bit tricky as I didn't want to change too much how we currently our running things, and we're relying on a fair bit of Python logic. In the end, this comment wntrblm/nox#735 (comment) referred to about modifying the cache and that seems to have solved the issue.