Skip to content
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

Targeted Python versions #33

Closed
ml-evs opened this issue Oct 11, 2023 · 3 comments · Fixed by #34
Closed

Targeted Python versions #33

ml-evs opened this issue Oct 11, 2023 · 3 comments · Fixed by #34

Comments

@ml-evs
Copy link
Member

ml-evs commented Oct 11, 2023

Quick Q for @gpetretto, which Python version are we targeting with jobflow-remote? Jobflow itself is 3.8+, which is what we have been testing until recently, but there is quite a lot of 3.10+ code (just nicer type hints really). I guess given that the normal way of using jobflow-remote is inside the submission scripts, which share an environment with the real "science" code, we should try to be as forgiving as possible... If we want to stick with 3.8+ (i.e., just follow jobflow from now on) I can make a PR that "downgrades" the code.

@utf
Copy link
Collaborator

utf commented Oct 11, 2023

Now that numpy/scipy/matplotlib have all moved to Python 3.9+, my plan is transition jobflow in that direction too. Especially since we rely and monty and maggma which likely constrain us to Python 3.9+ in the future.

In terms of type hints, in case you're not aware, you can use:

from __future__ import annotations

to get most of the nice features of Python 3.10 type hints.

@gpetretto
Copy link
Contributor

Thanks @ml-evs for raising the point and @utf for providing some indications about the future plans. Even though I agree that in general it would be better to be forgiving in terms of requirements, if jobflow is already planning to drop support for 3.8 it is probably not worth spending time to make jobflow-remote compatible with it.

One note about the annotations. I think I have tried to use the from __future__ import annotations import in all the modules, but I could not use it in the modules where typer was used. I don't remember exactly what was the problem, but somehow avoiding the new annotation types and removing the future import fixed the issue. However I had only manually tested with python 3.9+. Is it in the cli module that python 3.8 fails? Or somewhere else?

@ml-evs
Copy link
Member Author

ml-evs commented Oct 11, 2023

Okay, this sounds reasonable to me. I will extract some of the parts of #27 that modify the CI so we can at least see robustly what is working right now and what isn't, then continue with making sure that at least 3.9+ works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants