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 dep version parsing #1461

Merged
merged 6 commits into from
Jan 15, 2025
Merged

Conversation

joeycarter
Copy link
Contributor

Context: At the end of a release cycle, it would be convenient to comment out the pennylane and lightning versions in the .dep-versions file, as so:

jax=0.4.28
...

# For a custom PL version, update the package version here and at
# 'doc/requirements.txt
# pennylane=0.41.0-dev1

# For a custom LQ/LK version, update the package version here and at
# 'doc/requirements.txt'
# lightning=0.41.0-dev1

This allows keeping the correct format in place without explicitly pinning the package version. However, comments are not currently recognized when the .dep-versions file is parsed in setup.py.

Description of the Change: Replace the old file parsing, which performed simple string splitting based on the number of characters after jax=, pennylane= and lightning=, with more robust regex-based parsing that also allows for lines to be commented out.

The pennylane and lightning versions introduced at the end of the PennyLane/Lightning 0.40.0 release cycle have also been commented out.

Use regular expressions rather than string splitting for improved
robustness and to allow for deps to be commented out.
@joeycarter joeycarter requested a review from dime10 January 15, 2025 18:23
Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md on your branch with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@joeycarter
Copy link
Contributor Author

There are failures using the Lightning Kokkos backend, I think because the CI action is pinning PennyLane-Lightning-Kokkos==0.39.0. We can try bumping this to 0.40.0 and see if this fixes the issue. I've opened a separate PR for this: #1462.

The PL min release in setup.py was input as a float when it should have
been input as a string. For example, `release = 0.40` is interpreted as
`release = 0.4`, which is not the same!
Copy link
Contributor

@dime10 dime10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 🙏

@joeycarter joeycarter merged commit 7d3a680 into main Jan 15, 2025
43 checks passed
@joeycarter joeycarter deleted the joeycarter/update-dep-version-parsing branch January 15, 2025 20:37
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 this pull request may close these issues.

2 participants