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

Weird looking arg-parser logic in examples #2217

Closed
jleibs opened this issue May 25, 2023 · 2 comments · Fixed by #2398
Closed

Weird looking arg-parser logic in examples #2217

jleibs opened this issue May 25, 2023 · 2 comments · Fixed by #2398
Labels
😤 annoying Something in the UI / SDK is annoying to use examples Issues relating to the Rerun examples 🏎️ Quick Issue Can be fixed in a few hours or less

Comments

@jleibs
Copy link
Member

jleibs commented May 25, 2023

The minimal example now contains the code:

_, unknown = __import__("argparse").ArgumentParser().parse_known_args()
[__import__("logging").warning(f"unknown arg: {arg}") for arg in unknown]

with no comment or other explanation.

I believe this may be a workaround to keep things from failing in conjunction with the run-all script, but this seems like the wrong approach. This complexity should be moved into the runner, not obscuring the example code.

@jleibs jleibs added 😤 annoying Something in the UI / SDK is annoying to use examples Issues relating to the Rerun examples labels May 25, 2023
@nikolausWest
Copy link
Member

We should really try to avoid making our examples less clear in order to make it easer for devs to run all examples. Better to put that complexity in our helper scripts

@emilk
Copy link
Member

emilk commented May 30, 2023

100%. This is the run_all.py script passing too many arguments blindly to all examples. Easily fixed there.

@emilk emilk added the 🏎️ Quick Issue Can be fixed in a few hours or less label May 30, 2023
@emilk emilk changed the title Weird looking arg-parser logic in minimal example Weird looking arg-parser logic in examples Jun 12, 2023
@emilk emilk self-assigned this Jun 12, 2023
emilk added a commit that referenced this issue Jun 13, 2023
### What
Closes #2217

Remove weird-looking argument parsing in examples. We only added them in
#1927 because of `run_all.py`.

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2398

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/26bc44f/docs
Examples preview: https://rerun.io/preview/26bc44f/examples
<!-- pr-link-docs:end -->
@emilk emilk removed their assignment Jun 14, 2023
emilk added a commit that referenced this issue Jun 15, 2023
### What
Closes #2217

Remove weird-looking argument parsing in examples. We only added them in
#1927 because of `run_all.py`.

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2398

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/26bc44f/docs
Examples preview: https://rerun.io/preview/26bc44f/examples
<!-- pr-link-docs:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😤 annoying Something in the UI / SDK is annoying to use examples Issues relating to the Rerun examples 🏎️ Quick Issue Can be fixed in a few hours or less
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants