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

Document how to run Python examples #6218

Closed

Conversation

emilk
Copy link
Member

@emilk emilk commented May 3, 2024

There was documentation there, but I couldn't understand it. Thankfully Jeremy told me the magic incantation, so I decided to write it down in a way that I can understand.

I decided to remove the -e examples part of it, since everything seems to work without it and because this is the docs for the examples environment says it is WIP:

rerun/pixi.toml

Lines 39 to 40 in 0ac38a4

# Example environment (WIP)
examples = ["examples-common", "maturin-build"]

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

To run all checks from main, comment on the PR with @rerun-bot full-check.

There was documentation there, but I couldn't understand it.
Thankfully Jeremy told me the magic incantation, so I decided
to write it down later.
@emilk emilk added 📖 documentation Improvements or additions to documentation 🧑‍💻 dev experience developer experience (excluding CI) exclude from changelog PRs with this won't show up in CHANGELOG.md labels May 3, 2024
Copy link

github-actions bot commented May 3, 2024

Deployed docs

Commit Link
0e74ba1 https://landing-kbqhxnndq-rerun.vercel.app/docs

@abey79 abey79 self-requested a review May 3, 2024 15:16
Copy link
Contributor

@abey79 abey79 left a comment

Choose a reason for hiding this comment

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

Although that might work, I'm not convinced it's simpler, and it's certainly not how it was intended.

Comment on lines +13 to +16
pixi shell
pixi run py-build
pip install examples/python/minimal
minimal
Copy link
Contributor

Choose a reason for hiding this comment

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

well that's not really the intended way. All examples are already installed in the examples environment, which just needs to have a compatible rerun-sdk there, so:

pixi run -e examples py-build
pixi run -e examples minimal

Comment on lines +22 to +25
pixi shell
pip install rerun-sdk==0.15.1
pip install examples/python/minimal
minimal
Copy link
Contributor

Choose a reason for hiding this comment

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

Likewise.

pixi run -e examples pip install rerun-sdk==0.15.1
pixi run -e examples minimal

@emilk
Copy link
Member Author

emilk commented May 6, 2024

It seems like @abey79 convinced @jleibs that pixi shell is not the best recommendation, and that the summary should be

pixi run -e examples py-build
pixi run -e examples minimal

@abey79
Copy link
Contributor

abey79 commented May 6, 2024

It seems like @abey79 convinced @jleibs that pixi shell is not the best recommendation, and that the summary should be

pixi run -e examples py-build
pixi run -e examples minimal

To clarify, pixi shell is fine. What I find inappropriate is to advertise using pixi's default environment as a recipient to install random stuff, including examples. Our pixi.toml declares an examples environment that is made for that, and offers isolation from the other pixi environments.

So both are perfectly fine imo:

pixi run -e examples py-build
pixi run -e examples minimal

and:

pixi shell -e examples
pixi run py-build
pixi run minimal

The latter case works because pixi run recognises that one of its environment has been activated and uses it instead of default.

@emilk
Copy link
Member Author

emilk commented May 31, 2024

Closed by #6466 (review)

@emilk emilk closed this May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍💻 dev experience developer experience (excluding CI) 📖 documentation Improvements or additions to documentation exclude from changelog PRs with this won't show up in CHANGELOG.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants