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

Update requirements: support networkx 3.0 #6047

Closed
cqc-melf opened this issue Mar 31, 2023 · 15 comments · Fixed by #6105
Closed

Update requirements: support networkx 3.0 #6047

cqc-melf opened this issue Mar 31, 2023 · 15 comments · Fixed by #6105
Labels
kind/health For CI/testing/release process/refactoring/technical debt items

Comments

@cqc-melf
Copy link

Description of the issue
You are currently using the old networkx~=2.4 version in the cirq-core python package. Would it be possible for you to upgrade to networkx~=3.0?

See file cirq-core/requirements.txt

Cirq version
1.1.0

@cqc-melf cqc-melf added the kind/health For CI/testing/release process/refactoring/technical debt items label Mar 31, 2023
@mpharrigan mpharrigan changed the title Update requirements networks 3.0 Update requirements: support networkx 3.0 May 23, 2023
@mpharrigan
Copy link
Collaborator

Does anyone know why this restriction is in place? git blame is not helpful. @cqc-melf did you try manually installing networkx and seeing if any of the tests break?

@vtomole
Copy link
Collaborator

vtomole commented May 23, 2023

Does anyone know why this restriction is in place?

Looks like we have a conflict with pyquil

  pyquil 3.5.1 depends on networkx<3.0 and >=2.5

@mpharrigan
Copy link
Collaborator

surely this shouldn't affect cirq-core

@vtomole
Copy link
Collaborator

vtomole commented May 23, 2023

It should not. I would guess we only pinned it to pass our CI/CDs. Will test locally.

@vtomole
Copy link
Collaborator

vtomole commented May 23, 2023

Just confirmed that cirq-core tests pass with networkx==3.1

@cqc-melf
Copy link
Author

Thank you for taking a look! I have not run any tests, if there is something I can do to help you, please let me know!

@cqc-melf
Copy link
Author

Does anyone know why this restriction is in place?

Looks like we have a conflict with pyquil

  pyquil 3.5.1 depends on networkx<3.0 and >=2.5

Not sure if you have seen this, I have already reported a similar problem to pyquil

rigetti/pyquil#1553

@vtomole
Copy link
Collaborator

vtomole commented May 24, 2023

We can update cirq-core's networkx version to >=3.0 but unfortunately we won't be able to deploy it until pyquil also updates theirs.

@mpharrigan
Copy link
Collaborator

What does "deploy" mean here?

I'd imagine we'd want to ship networkx>=2.4 since I think you're saying our code base works with both networkx 2 and 3

@vtomole
Copy link
Collaborator

vtomole commented May 24, 2023

Our code base works with both networkx 2 and 3 but our checks don't work with networkx==3. This means that we won't be able to merge the update to the master branch.

@mpharrigan
Copy link
Collaborator

We don't have a CI check that tests cirq-core in isolation? In any event I think it's kindof pathological to kneecap our library because we don't have our testing infrastructure set up properly.

@vtomole
Copy link
Collaborator

vtomole commented May 24, 2023

Looks like loosening the requirements to >=2 instead of >=3 fixes this issue: #6105

@vtomole
Copy link
Collaborator

vtomole commented May 24, 2023

We don't have a CI check that tests cirq-core in isolation? In any event I think it's kindof pathological to kneecap our library because we don't have our testing infrastructure set up properly.

The actual problem is that the pinned networkx version in cirq-core is too strict. My bad.

@vtomole
Copy link
Collaborator

vtomole commented May 24, 2023

@cqc-melf Please let us know if this version of cirq-core fixes your issue.

@cqc-melf
Copy link
Author

Thank you all for the update! I will try this in the next days!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/health For CI/testing/release process/refactoring/technical debt items
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants