NESTCollaboration / nestpy

Raw Python bindings to the NEST library using pybind11.
GNU General Public License v3.0
13 stars 19 forks source link

Integrated testing for multiple python versions #80

Closed JoranAngevaare closed 2 years ago

JoranAngevaare commented 2 years ago

Does nestpy work with python3.10?

I was wondering if python3.10 was working with nestpy. To test, I wrote a short github action, that allows for easy extension to other python versions. I also added a few that are specified in the setup.py (only py3.4 wasn't working for some reason). You can see the tests on https://github.com/JoranAngevaare/nestpy/pull/1, I think the actions aren't run here because this PR is from my own fork.

It appears that python3.10 is working on the master branch based on the testing 🎉! I will now try to figure out why it's failing on straxen: https://github.com/XENONnT/straxen/pull/878

If you like github actions and you could adds this PR to your testing suite, it's free. If you don't because travis is working fine, please ignore my pull request.

Edit

Why does nestpy not work on py3.10?

Not sure, but it seems installing nestpy from source, rather than pip install nestpy==1.5.0, fixes the issue.

Failing test on this PR

Seems unrelated to this PR since other PRs and current master branch are also failing.

sophiafarrell commented 2 years ago

Hey Joran, the failed build is not your fault on nestpy linux, it is related to a separate issue we're having. GItHub actions may fix the issue long-term, actually, if we can replace all our travis builds with GitHub actions..

sophiafarrell commented 2 years ago

Just an idea @JoranAngevaare , do you think the answer on why the pip install nestpy==1.5.0 isn't working is simply because we didn't build a package for python3.10 for that version, so it's pointing to a non-existent distribution? In that case, we'd have to include 3.10 in the builds suite, then it should work (assuming I'm right.)

JoranAngevaare commented 2 years ago

@sophiafarrell , might very well be, I don't immediately see where you actually do the builds. Do you also build py2.7, py3.6-py3.9?

I made a dummy PR where I test all these python versions and it indeed seems to only be py3.10 that doesn't work:

replace all our travis builds with GitHub actions..

I think so, let me add mac-os. I tried windows too since it's in your setup.py but I don't think it's working

JoranAngevaare commented 2 years ago

@sophiafarrell , I included macos successfully into the testing: https://github.com/JoranAngevaare/nestpy/pull/3, or all of the tests: https://github.com/JoranAngevaare/nestpy/runs/5064146452?check_suite_focus=true

I can also show you how to do the release procedure to pipy super easily using actions (see e.g. https://github.com/XENONnT/reprox/blob/master/.github/workflows/pypi_install.yml)

sophiafarrell commented 2 years ago

Thanks a lot! What's the quotations around 3.10 in the new test?

In the tests, don't know why with 3.10 it's dropping us back to find nestpy v.1.4.8... https://github.com/JoranAngevaare/nestpy/runs/5063978048?check_suite_focus=true#step:5:10

JoranAngevaare commented 2 years ago

Thanks a lot! What's the quotations around 3.10 in the new test?

Yeah it's the integer str conversion, otherwise you end up with py3.1 (not kidding).

In the tests, don't know why with 3.10 it's dropping us back to find nestpy v.1.4.8... https://github.com/JoranAngevaare/nestpy/runs/5063978048?check_suite_focus=true#step:5:10

Oh I hadn't seen this, good catch. I honestly don't know, I'd personally make a new (pre)release to test it

sophiafarrell commented 2 years ago

I'm going to merge this ahead of us working today so it's in.