-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add support to python 3.11 #311
base: dev
Are you sure you want to change the base?
Add support to python 3.11 #311
Conversation
Hi, locally all the testes pass correctly (or fail because they are using connections I cannot access) so I would say it is all working. We should check with the workflows if everything is truly good. Tbh, I think this project could benefit of some modification in the setup.py / pyproject / version / dependencies organization. It seems to me that there is some duplication in the versioning and that the setup.py could be completely removed in favor of the pyproject. Moreover, having something like poetry to manage dependency could help automatize some of the things I did today :-) |
Hi @rodolfocarobene , thanks for filing a PR to solve this issue. I have a few comments/questions:
If you want to contribute further and reorganise setup.py / pyproject / version / dependencies, feel free to do so. I would be happy to help you integrate these changes as well. |
Sorry @KilianPoirier , I think I had slightly misunderstood the issue. I've tried it on a new environment and the installation of every specific package seemed to work. Please let me know if it is ok for you r if there are still modification required. (Sorry for the useless line diffs, my editor removes automatically leading spaces... If you want I can remove them) |
Hey @rodolfocarobene thank you for revisiting your PR and migrating all of the setup instructions to I have approved the test workflow but it seemed like it fails at installation. I think the best way to ensure that the test pass both locally and in the GH workflow is to use at least two environments, one with python 3.8 and one with a higher version, I think 3.12 should do the trick. I'll wait for the nest changes to approve the tests and review the code once the tests are clear. |
Hi, I was trying to fix the errors, but I noticed that mitiq is at the moment not compatible with Python 3.12... Since openqaoa-core requires it (in dev) I'm afraid that Python3.12 cannot be fully supported |
Alright, then I think it's fair to keep it to python 3.11, I also noticed that they recently dropped support for python 3.8. |
I think it makes sense, python 3.8 is a bit outdated right now. I'm working on the updates :-) |
Now the installation should work both for python3.9 and python3.11. |
Fixing dependencies once again (maybe one of the last time? :-)). For the moment I limited the version of some libraries, while I think we should instead modify the code to support higher versions of those libraries, but maybe in another PR. In particular I limited:
Locally the installation works fine, some tests of pyquil fail. In general because of connections, a couple for some other reason that I am having some trouble understanding: from openqaoa.backends.qaoa_device import create_device
device = create_device(location="qcs", name="7q-noisy-qvm")
>>>ValueError: Invalid device location, Choose from: dict_keys(['local', 'azure', 'aws', 'ibmq']) Also in the workflow the same error is being raised, is it a version thing or something else? |
Nice! Let's see how the workflow runs this time. I'm currently pushing some changes for the mitiq issue as you have noticed but other problems arose when fixing this, it may take a bit more time than expected. No worries though if the only error is this one on your side, I'll approve your PR and fix it myself. Concerning the QVM issue it may be due to a problem with pyquil, if you don't have the qvm installed separately, the tests won't pass locally. This should be caught by the GH workflow. |
There is still some problem with the pyquil tests... |
Hey @rodolfocarobene , the error seems to come from a faulty install of pyquil since the pyquil backends are not resolved in the list of backends in the tests. I also tried to branch out from your changes and test locally but the make command doesn't resolve. Have you tried looking into this? The makefile only runs an install of the Here is what happens when I try installing locally using your modified Maybe the first step to try and debug this would be to make changes one by one, first upgrading the version of python and related dependencies, making sure the tests pass both locally and on the GH workflow. Then, migrate all of the changes to the |
What version of python are you using? I don't see the see behavior... quite weird. |
Hey, @KilianPoirier, I've added the explicit location of the packages (for some reason it was required for me, but I suppose it doesn't hurt). |
Good news, the tests seem to pass! Nice job fixing all of the issues |
Sorry, I had forgot to check some stuff (mainly docs and workflows) that had some outdated stuff. At the same time, with the introduction of the Maybe in the future could be convenient a script to update the version (both of python and the packages) in all the repository at once. :-) |
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.
Mostly minor comments but I have a few questions concerning the versioning of the plugins.
Overall good job on the implementation! I think we're quite close to solving the issue :)
I just approved the PR and assigned you to the issue and bounty! |
Thanks @KilianPoirier ! It was a pleasure for me :-) . |
Fixes #307.
Description
For the moment I've just upgraded all the setup.py and the workflows.
I will remove this PR from draft mode as soon as I'm finished with the changes. In particular, I want to check that the code is all compatible with python3.11 or if modifications are required.
I've yet to check the correctness of the dependencies in the opeqaoa-core: they may be outdated or require changes with the python version
Checklist
Type of change
Please delete options that are not relevant.