-
Notifications
You must be signed in to change notification settings - Fork 39
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
Passing python version from "interpreter matrix" to mamba #1417
Conversation
Ok. Im not sure that this is the right way of doing things but now the tests at least runs with python 3.8. If we think that this is a good, fix we should also do the same with the other actions, and possibly then add the other python versions to the matrix. What do you think ? |
6642e1c
to
e670926
Compare
@@ -12,7 +12,7 @@ jobs: | |||
strategy: | |||
max-parallel: 5 | |||
matrix: | |||
python-version: ["3.8"] | |||
python-version: ["3.8", "3.9", "3.10", "3.11"] |
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.
So I added python "3.9", "3.10", "3.11" so that we are certain that we are not introducing some incompatibility somewhere
@@ -1,8 +1,4 @@ | |||
--- | |||
|
|||
default_language_version: | |||
python: python3.8 # This should be set to the lowest Python version that we support. |
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.
Removed the default language so that we are using the python version of the virtual environment. This will make creation of the development environment and the management of the CI easier.
We will still run pre-commit
with the lowest supported python version, currently python 3.8, in the CI
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 not convinced by this. Feels like there would be discrepancy between behaviour locally and on the CI, it might alienate people (I know I would be annoyed if tests pass locally but not on the CI).
I guess we finally don't need to update the UI action as the aim is not to test and lint python code. So this should be fine. |
e670926
to
67acd83
Compare
Thanks for working on this. This is something I have wanted to do for a long time but never got around to doing. |
67acd83
to
acf2e63
Compare
Ok, this looks good now :). |
43c6546
to
9ff1942
Compare
@rhfogh, @elmjag, @fabcor-maxiv @oldfielj-ansto :), what do you think ? |
I like this change! |
This outside my expertise |
@@ -1,8 +1,4 @@ | |||
--- | |||
|
|||
default_language_version: | |||
python: python3.8 # This should be set to the lowest Python version that we support. |
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 not convinced by this. Feels like there would be discrepancy between behaviour locally and on the CI, it might alienate people (I know I would be annoyed if tests pass locally but not on the CI).
Hm, so how should we manage I thought that if there are some errors (and I guess it will happen in some occasions) one have to run pre-commit under python 3.8 sort of manually Sort of related, are people testing against all python versions locally as well ? |
That is tricky indeed. I will try to see how other projects solve this. Maybe we should pin the Python version to our lowest supported version (3.8) in
I am not sure what you mean. If I understood correctly, with this change, what would happen is that pre-commit checks would be fine locally but would fail on GitHub. From there, I am not sure people would immediately think they need to rewrite code for Python 3.8. That is not obvious.
No, I do not, and I do not think my colleagues do it either. Typically in some projects I have seen, tox or nox is used and that makes this very easy to do locally. I am not sure we should do this for MXCuBE, though. |
With this change If we pin python to 3.8 in |
d647b5b
to
6589a1d
Compare
What I suggest is that, if you agree, we merge this for now. You can follow up with neater solution for how to handle the |
Yes, I am fine with merging this, all in all it is an improvement because it catches things that used to slip through. The discrepancy issue I mentioned would probably be rare, and at least it would be caught, not slip through. |
Passing python version from interpreter matrix to mamba