-
Notifications
You must be signed in to change notification settings - Fork 429
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
Add Allure reporting, update Python version test matrix, and prune test_api_build.py #4621
Conversation
We require contributors to sign our Contributor License Agreement and we don't have one on file for @sven6002. In order for us to review and merge your code, please e-sign the Contributor License Agreement PDF. We then need to manually verify your signature. We will ping the bot to refresh the PR status when we have confirmed your signature. |
@@ -1 +1 @@ | |||
I am a bad file that should not pass compileall. | |||
"I am a bad file that should not pass compileall" |
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 am a bad file that should not pass compileall" | |
I am a bad file that should not pass compileall. |
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.
it is a .py
file it will fail to recognize the file itself... it wont matter what is inside the file..
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 used for tests that compile .py
to .pyc
via conda_build.post.compile_missing_pyc
.
f2_bad.py
is intentionally a Python script with invalid syntax.
We test that compile_missing_pyc
does not produce the corresponding .pyc
for it but also does not fail the build.
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.
Ah I see, the test is effectively doing:
python -Wi -m py_compile f1.py f2_bad.py f3.py
Unfortunately, Python 3.10 reworked py_compile so it stops compiling after encountering the first error. We can silence the error with the new --quiet
argument but that doesn't result in the remaining files being compiled.
So it doesn't look like this test is possible anymore without batching the compiling in which case the test feels moot?
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.
no \ on macosx
Python 3.10 and numpy 1.16 are not compatible so to move forward with supporting Python 3.10 and soon 3.11 we will need to also bump up the default numpy variant.
These tests utilized a bad glob pattern that assumes only 2 digit Python version (e.g., py37, py38, py39) but fails for valid 3 digit versions (e.g., py310, py311).
'python': f'{sys.version_info.major}.{sys.version_info.minor}', | ||
'numpy': '1.16', | ||
"python": f"{sys.version_info.major}.{sys.version_info.minor}", | ||
"numpy": "1.21", |
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.
The default numpy variant (1.16) is not compatible with Python 3.10, i.e., the following fails:
$ conda create -n scratch python=3.10 numpy=1.16
so we bump the minimum variant up to 1.21 (the minimum numpy variant was last bumped up in Jan 2021 from 1.11 to 1.16 in ff35940):
$ conda search 'numpy * py310*'
Loading channels: done
# Name Version Build Channel
numpy 1.21.2 py310h2cbf25c_0 pkgs/main
numpy 1.21.2 py310h7b614ad_0 pkgs/main
numpy 1.21.5 py310h1ad2b02_1 pkgs/main
numpy 1.21.5 py310h1ad2b02_2 pkgs/main
numpy 1.21.5 py310h6c44a92_3 pkgs/main
numpy 1.21.5 py310hdcd3fac_1 pkgs/main
numpy 1.21.5 py310hdcd3fac_2 pkgs/main
numpy 1.21.5 py310hdcd3fac_3 pkgs/main
numpy 1.22.3 py310h1ad2b02_0 pkgs/main
numpy 1.22.3 py310hdcd3fac_0 pkgs/main
numpy 1.23.1 py310h6c44a92_0 pkgs/main
numpy 1.23.1 py310hdcd3fac_0 pkgs/main
numpy 1.23.3 py310h6c44a92_0 pkgs/main
numpy 1.23.3 py310h6c44a92_1 pkgs/main
numpy 1.23.3 py310hc1140d4_0 pkgs/main
numpy 1.23.3 py310hc1140d4_1 pkgs/main
numpy 1.23.4 py310h9638375_0 pkgs/main
numpy 1.23.4 py310he50c29a_0 pkgs/main
conda list -p "%PREFIX%" --canonical | ||
if errorlevel 1 exit 1 | ||
conda list -p "%PREFIX%" --canonical | grep "conda-build-test-numpy-build-run-1\.0-py..h......._0" |
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 glob pattern is problematic once we start testing with Python 3.10. Notice the py..h
pattern near the end, this will successfully match py38 and py39 but not py310 or py311. Replaced this explicit pattern with a more fuzzy py.*
pattern.
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 not within the scope of this PR.. I'll make the change for it in the next ticket..
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 was required to get tests to pass (and has already been implemented in this PR, see fac2add)
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 a side effect of changing the Python versions being tested
1d33952
to
df41ef4
Compare
@kenodegard thanks for making the tests pass. Let's figure out how to merge this PR and do any improvements in a new short-lived PR. |
Dooone |
Description
Miscellaneous improvements:
test_api_build.py
Resolves #4558
Checklist - did you ...
Add a file to thenews
directory (using the template) for the next release's release notes?