-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
MAINT: Use python
shim and clean up CI script calls
#29324
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
base: main
Are you sure you want to change the base?
Conversation
Was skimming through this repo and stumbled upon CI/CD .yml. Added some minor refactors which I think would make it a bit cleaner :) |
Fix the echo statement
8419cc9
to
4f0241d
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 reasonable to me, although I can't confirm the python command as I'm not sure how python is called in the circleci image..
@melissawm I confirmed it, all the All the python shims( |
@@ -52,7 +52,7 @@ jobs: | |||
- run: | |||
name: build NumPy | |||
command: | | |||
python3.11 -m venv venv | |||
python -m venv venv |
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 would prefer to leave this as is. We secifically must build the dicumentation with python 3.11 since we have distutils extensions. I wouldn’t want the version to change out from under us without it causing an obvious error
@@ -69,7 +69,7 @@ jobs: | |||
# Don't use -q, show warning summary" | |||
SPHINXOPTS="-W -n" spin docs | |||
if [[ $(find doc/build/html -type f | wc -l) -lt 1000 ]]; then | |||
echo "doc build failed: doc/build/html is empty" | |||
echo "doc build failed: doc/build/html is empty" >&2 |
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.
What is wrong with the way this is? Why force stderr?
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 might be helpful if the logs are being streamed to any observability tool where it is possible to monitor it easily based on stdout
or stderr
stream. Happy to remove it if it seems unnecessary.
echo calling python3 tools/refguide_check.py -v | ||
python3 tools/refguide_check.py -v | ||
echo "calling ./tools/refguide_check.py -v" | ||
./tools/refguide_check.py -v |
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.
If anything, I would prefer this specifically uses python 3.11 like above
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.
They all are symlinked to same python binary anyway configured in cimg/python:3.11.10
image. Thought it migth be cleaner to stick to just one common invocation format. Like how we are invoking pip
and not pip3
or pip3.11
. Unless I'm missing some obvious side effects.
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.
FWIW I agree with @mattip - the intentional explicitness of Python version is useful in this case. If anything were to change, I'd vote to add a comment to explain why things are the way they are!
MAINT: Use
python
shim and clean up CI script callspython3.11
andpython3
withpython
tools/refguide_check.py