-
Notifications
You must be signed in to change notification settings - Fork 198
Add interactive playground for users to try rustworkx #1451
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
Open
IvanIsCoding
wants to merge
114
commits into
Qiskit:main
Choose a base branch
from
IvanIsCoding:jupyterlite-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
114 commits
Select commit
Hold shift + click to select a range
00eaf75
Modernize setup.py
IvanIsCoding 576a886
Farewell to retworkx
IvanIsCoding 1a15354
Add release note about retworkx removal
IvanIsCoding 13cec34
Move even more data to pyproject.toml
IvanIsCoding e7d69d6
PEP 639 says this is deprecated
IvanIsCoding 90112c6
Add dependency groups later
IvanIsCoding d569676
Move even from setup.py to pyproject.toml
IvanIsCoding fd814cb
Migrate all setup.py to pyproject.toml
IvanIsCoding ec03072
Move nox dependencies to pyproject.toml
IvanIsCoding caf72e6
Document new way to do debug builds now that we no longer use setup.py
IvanIsCoding ae29d4a
Better way to phrase the documentation
IvanIsCoding 8b5532e
Remove duplicate section
IvanIsCoding 51baa2e
Try updating setuptools for coverage job
IvanIsCoding a9fde4f
Add docs dependency group as well
IvanIsCoding b8e2efe
Make description the same as the paper
IvanIsCoding 5f52826
This doesn't work yet
IvanIsCoding 24334f2
Pin uv in CI
IvanIsCoding 7205151
Make workflow work with newer Python versions
IvanIsCoding df87b8f
Pass frozen via environment variables
IvanIsCoding af22a8e
Update CONTRIBUTING.md to mention uv.lock procedures
IvanIsCoding 91ee307
Explicitly install rustworkx and use debug mode
IvanIsCoding 2f28c9e
Use multiple threads in sphinx
IvanIsCoding 7cf5e4b
Don't make -j auto mandatory in CI
IvanIsCoding ca2263d
Document how to build faster in the guide
IvanIsCoding 349f34b
Fix typo
IvanIsCoding b0eb530
Merge branch 'main' into modernize-setup
IvanIsCoding 3c67cdb
Revert retworkx code
IvanIsCoding 3177208
Say this will be the last retworkx release
IvanIsCoding d3c3d1e
Trying to make retworkx work
IvanIsCoding 93fc909
retworkx has its own setup.py
IvanIsCoding 9749294
Account for new directory when publishing
IvanIsCoding 9cd1112
Document setuptools-rust
IvanIsCoding bbd37bc
Merge remote-tracking branch 'upstream/main' into modernize-setup
IvanIsCoding 91f5f10
Merge branch 'modernize-setup' into new-uv-branch
IvanIsCoding 87305de
Edit message saying it is the final release
IvanIsCoding f8e97dd
sunset -> retired
IvanIsCoding c85ed90
Endline
IvanIsCoding a49906a
Merge branch 'main' into modernize-setup
IvanIsCoding cd3849e
Merge branch 'modernize-setup' into new-uv-branch
IvanIsCoding d0e79da
Frozen is implied
IvanIsCoding 3009010
Merge branch 'main' into modernize-setup
IvanIsCoding 49df6ad
Merge branch 'main' into modernize-setup
IvanIsCoding 23d306e
Merge branch 'main' into modernize-setup
IvanIsCoding 1041709
Merge branch 'main' into modernize-setup
IvanIsCoding 6ac2a82
Merge remote-tracking branch 'upstream/main' into new-uv-branch
IvanIsCoding 6e88243
Merge branch 'main' into modernize-setup
IvanIsCoding 8a894ad
Ensure setuptools-rust is up-to-date
IvanIsCoding bc17616
Use setuptools>=70.1.0 and remove wheel
IvanIsCoding 2040aa1
Merge branch 'modernize-setup' into new-uv-branch
IvanIsCoding 6979c6b
Merge branch 'main' into modernize-setup
IvanIsCoding 979849c
Apply suggestions from code review
IvanIsCoding de999e1
Black
IvanIsCoding 318f95e
Merge branch 'main' into modernize-setup
IvanIsCoding 6fd352e
Merge branch 'main' into new-uv-branch
IvanIsCoding 03408bf
Merge branch 'main' into modernize-setup
IvanIsCoding 4cfa29c
Merge branch 'main' into new-uv-branch
IvanIsCoding 112654b
Merge branch 'main' into modernize-setup
IvanIsCoding 5444392
Merge branch 'modernize-setup' into new-uv-branch
IvanIsCoding e9a8cfe
Merge remote-tracking branch 'upstream/main' into new-uv-branch
IvanIsCoding 03c42c7
Use dependency groups in CI
IvanIsCoding dcb4010
Merge branch 'dependency-groups' into new-uv-branch
IvanIsCoding 51ddf4f
Trying a newer setup-tools
IvanIsCoding 26002fb
Merge branch 'dependency-groups' into new-uv-branch
IvanIsCoding dc0c0ff
Fix coverage
IvanIsCoding b4b06fa
Merge branch 'dependency-groups' into new-uv-branch
IvanIsCoding 85694e2
Merge branch 'main' into dependency-groups
IvanIsCoding 3377305
Merge branch 'main' into new-uv-branch
IvanIsCoding e174a57
testinfra -> releaseinfra
IvanIsCoding 39fb357
Merge branch 'dependency-groups' into new-uv-branch
IvanIsCoding 2c48049
Pip 25.1 arrives by default on GitHub
IvanIsCoding 334f24b
Merge branch 'dependency-groups' into new-uv-branch
IvanIsCoding 57e5896
Merge remote-tracking branch 'upstream/main' into new-uv-branch
IvanIsCoding db87094
Fix py-project toml
IvanIsCoding 7cea72b
Merge branch 'main' into new-uv-branch
IvanIsCoding 5279876
Merge branch 'main' into new-uv-branch
IvanIsCoding 50be6e9
Try adding jupyterlite-sphinx
IvanIsCoding 6c6f1af
Add jupyterlite-sphinx
IvanIsCoding 28791ec
Add bare minimum config
IvanIsCoding b4ce1f9
Add playground
IvanIsCoding a041dd7
Fix playground underline
IvanIsCoding 12caf51
Fix playground
IvanIsCoding 673152a
Fix name
IvanIsCoding 0ea2f29
Include in toctree
IvanIsCoding b345590
Minor fixes
IvanIsCoding f8887f4
Add draw in hopes the demo works slightly better
IvanIsCoding a54250d
Make playground just print version
IvanIsCoding 688850f
Check wheel from .json actually exists
IvanIsCoding 531d98f
Make displaying the Petersen Graph be the default demo
IvanIsCoding c9304d3
Update uv in uv.lock
IvanIsCoding 0ca6725
Merge branch 'new-uv-branch' into jupyterlite-docs
IvanIsCoding 981fbf6
Use uv 0.7.8
IvanIsCoding d9d5ad0
Use uv 0.7.8 (pyproject.toml)
IvanIsCoding 4437d3e
Merge branch 'new-uv-branch' into jupyterlite-docs
IvanIsCoding e4f1d82
Merge remote-tracking branch 'upstream/main' into jupyterlite-docs
IvanIsCoding 5b6fe20
Bump pyodide to 0.27.6
IvanIsCoding 1a1ffda
Simplify playground
IvanIsCoding 20a4ecf
Just import rustworkx
IvanIsCoding d5bce88
Merge remote-tracking branch 'upstream/main' into jupyterlite-docs
IvanIsCoding 3e0d0c7
Use stable version of jupyterlite and related deps
IvanIsCoding 78cc79c
Merge branch 'main' into jupyterlite-docs
IvanIsCoding ab3b19c
Merge branch 'main' into jupyterlite-docs
IvanIsCoding b94c1f1
Merge branch 'main' into jupyterlite-docs
IvanIsCoding 6eef9a2
Merge branch 'main' into jupyterlite-docs
IvanIsCoding 2192fa3
Merge branch 'main' into jupyterlite-docs
IvanIsCoding a26a50a
Merge branch 'main' into jupyterlite-docs
IvanIsCoding 36e3596
Merge remote-tracking branch 'upstream/main' into jupyterlite-docs
IvanIsCoding c3c9e59
Bump dependencies
IvanIsCoding cd6de91
Use rustworkx that comes with pyodide
IvanIsCoding 7ac27f7
Uv lock details
IvanIsCoding 133fd9e
Merge remote-tracking branch 'upstream/main' into jupyterlite-docs
IvanIsCoding f9795a0
Apply suggestions from code review
IvanIsCoding f3439b4
Add note that WASM is experimental
IvanIsCoding 83717dc
Minor grammar
IvanIsCoding 6d8818d
Merge branch 'main' into jupyterlite-docs
IvanIsCoding File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,3 +25,5 @@ rustworkx-core/Cargo.lock | |
| **/.DS_Store | ||
| venv/ | ||
| .python-version | ||
| .jupyterlite.doit.db | ||
| docs/source/.cache | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "LiteBuildConfig": { | ||
| "no_sourcemaps": true, | ||
| "no_unused_shared_packages": true, | ||
| "apps": ["repl"] | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| .. _rustworkx_playground: | ||
|
|
||
| #################### | ||
| Rustworkx Playground | ||
| #################### | ||
|
|
||
| Welcome to the Rustworkx Playground! This is an interactive environment where you can | ||
| experiment with Rustworkx in your browser. | ||
|
|
||
| .. replite:: | ||
| :kernel: python | ||
| :height: 600px | ||
| :prompt: Try it! | ||
| :prompt_color: #6929c4 | ||
|
|
||
| import piplite | ||
| await piplite.install("rustworkx") | ||
|
|
||
| import rustworkx as rx | ||
| print(f"Rustworkx Playground with version: {rx.__version__}") | ||
|
|
||
| .. note:: | ||
| The `rustworkx` version in the playground is not always the latest. Verify the deployed | ||
| version with `rustworkx.__version__`. | ||
|
|
||
| .. note:: | ||
| The `rustworkx` WASM version in the playground is experimental. If you find any issues, please | ||
| report them at https://github.com/Qiskit/rustworkx/issues. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I might have asked this before but is there a path to building the correct package as part of the docs build? It's not like a rustworkx build takes us that long and we already do it a bunch in CI. So we could then have different versions bundled for each docs build so it always matches.
Looking at the recipe you contributed to pyodide: https://github.com/pyodide/pyodide-recipes/blob/main/packages/rustworkx/meta.yaml it doesn't seem too complicated.
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.
So, I think the path to have the latest commit from
mainin is to:nox -edocswith the wheel built frompixi run build_pyodideI think the biggest blockers are that #1449 uses Rust nightly (well, not quite but
RUSTC_BOOTSTRAPis almost that with a pinned rustc). Moreover, setting upemscriptenis a ritual that I will only accept in CI with some tool likepixiornixpkgs. It needs a lockfile in my opinion, too many parts can break