Skip to content

Conversation

@asaites
Copy link
Contributor

@asaites asaites commented Sep 9, 2025

  • Moves the crate rigetti-pyo3 to a subdirectory
  • Adds source for optipy crate
  • Updates Cargo, knope, Makefile.tomls, and the CI workflow to make sense with the workspace

Closes: #60

Copy link

@windsurf-bot windsurf-bot bot left a comment

Choose a reason for hiding this comment

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

💡 To request another review, post a new comment with "/windsurf-review".

allow = [ "MPL-2.0",]
name = "webpki-roots"
version = "*"

Copy link

Choose a reason for hiding this comment

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

The MPL-2.0 license exception for webpki-roots has been removed, but MPL-2.0 wasn't added to the general allowed licenses list. If this dependency is still used in the project, this could cause license compliance issues when running cargo deny check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With it in the configuration, cargo deny --workspace check gives

warning[license-exception-not-encountered]: license exception was not encountered

so it seems unneeded.

@asaites asaites force-pushed the 60-feat-migrate-optipy branch from 28194f6 to 0ef35d7 Compare September 11, 2025 02:31
@asaites asaites force-pushed the 60-feat-migrate-optipy branch from b57ba1c to ebe0022 Compare September 11, 2025 03:38
@asaites asaites merged commit 0a36ae6 into main Sep 11, 2025
5 checks passed
@asaites asaites deleted the 60-feat-migrate-optipy branch September 11, 2025 03:44
@asaites asaites restored the 60-feat-migrate-optipy branch September 11, 2025 03:48
tool: cargo-msrv,cargo-make
- run: cargo make msrv-verify
tool: cargo-msrv
- run: cargo make --cwd rigetti-pyo3 msrv-verify
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not apply these to optipy as well?


jobs:
prepare-release:
if: ${{ ! (github.event_name == 'push' && contains(github.event.head_commit.message, 'prepare release [skip ci]' )) }}
Copy link
Contributor

Choose a reason for hiding this comment

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

For readability, I would have preferred this, assuming it parses correctly

if: ${{ github.event_name != 'push' || ! contains(github.event.head_commit.message, 'prepare release [skip ci]' ) }}

Comment on lines +9 to +10
jobs:
publish-rigetti-pyo3:
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't have applied at the time of the PR, but with Rust 1.90 we now have cargo publish --workspace

same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2022 Rigetti Computing
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably needs bumped to 2025


### What about stubs?

If you're also use `pyo3_stub_gen` to generate Python stub files,
Copy link
Contributor

Choose a reason for hiding this comment

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

"also using"


If you're also use `pyo3_stub_gen` to generate Python stub files,
this macro strips those attributes, too,
and by default, the macro strips both attributes of both creates.
Copy link
Contributor

Choose a reason for hiding this comment

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

"crates"

Comment on lines +85 to +97
!(id == "pyo3"
|| id == "new"
|| id == "getter"
|| id == "setter"
|| id == "pyclass"
|| id == "pymethods"
|| id == "pyfunction"
|| id == "pymodule"
|| id == "staticmethod"
|| id == "classmethod"
|| id == "classattr"
|| id == "args"
|| id == "gen_stub")
Copy link
Contributor

Choose a reason for hiding this comment

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

Would have suggested using either

["pyo3", "new", ...].iter().all(|name| id != name)

or

// array must be sorted
// returns `Err` if not found
["pyo3", "new", ...].binary_search(id).is_err()

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.

Migrate quil-rs/optipy to this repo

4 participants