vivarium-collective / vivarium-core

Core Interface and Engine for Vivarium
https://vivarium-core.readthedocs.io/
Apache License 2.0
25 stars 2 forks source link

support python 3.11 #226

Closed eagmon closed 1 year ago

eagmon commented 1 year ago

This PR is working to add Python 3.11 support for vivarium-core, including updating the setup.py classifiers, the GitHub workflows, and some requirements versions.


By creating this pull request, I agree to the Contributor License Agreement, which is available in CLA.md at the top level of this repository.

eagmon commented 1 year ago

Current status: the wrapt library is trying to import formatargspec from the inspect module, but this function was deprecated in Python 3.5 and has been removed from Python 3.11.

thalassemia commented 1 year ago

After updating the dependencies, I think everything now works for Python 3.9+. We could retain support for Python 3.8 by using trial-and-error to downgrade the versions of certain dependencies (Numpy, Pint, and maybe others). However, according to NEP-29, many big scientific computing packages are dropping 3.8 at this point, so I think it makes sense for us to do the same.

I also corrected a bug where parallelized Steps were not being properly terminated at the end of a simulation.

eagmon commented 1 year ago

This is fantastic! Thanks @thalassemia :-)

thalassemia commented 1 year ago

Is this ready to merge? It says that code owner review is required, and there are also all the Python 3.8 tests that I removed since we are dropping support for that.

eagmon commented 1 year ago

@thalassemia I think this looks good to merge. I am also blocked from merging since I opened this PR, but I can bypass protections if you think that's safe. Or @prismofeverything @U8NWXD could weigh in and approve.

thalassemia commented 1 year ago

@eagmon It looks safe to me. I'm upgrading vivarium-ecoli to Python 3.11 right now, so this would be nice to have ASAP.

eagmon commented 1 year ago

@thalassemia -- should we remove the GitHub tests for 3.8? They are holding up the checks. Edit: it looks like you did remove them from the workflows... Maybe rerun them again?

thalassemia commented 1 year ago

Yeah, we should. I don't know how to do it on my end (or if I have access).

eagmon commented 1 year ago

hmm, looks like they are stuck on there even though our workflow has been updated. I tried pushing a new commit to see if they would be removed. Let's just merge this when 3.9-3.11 pass.

eagmon commented 1 year ago

@thalassemia -- merged, and made a new release 1.5.7. Thank you so much for keep Vivarium up-to-date!