-
Notifications
You must be signed in to change notification settings - Fork 373
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
run_all.py
: add --fast
, --separate
, and --close
#2054
Conversation
3f238cb
to
612bcb5
Compare
A few usage examples:
|
When I run Running I haven't reviewed the code yet, but seems to me there is a place or two where we need to add a wait. For instance, we need need to get the web browser time to connect to the |
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.
Really nice, but there are some weirdness, at least on my Mac!
I would also love for the text output of run_all.py
to be improved. Especially when running in sequential mode it would be good if each example was clearly delineated and marked, e.g. with a blank line and a `print("\nRunning {args}…")
scripts/run_all.py
Outdated
print(f"process exited with error code {returncode}") | ||
if wait: | ||
returncode = process.wait() | ||
print(f"process exited with error code {returncode}") |
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.
Any non-zero returncode should result in run_all.py
returning non-zero, and printing a big fat error message
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.
Changed this to assert instead. Not sure how I should do the same when running --separate
.
69e768c
to
71f7909
Compare
e0737a8
to
d159c7a
Compare
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.
Works great! ⭐
* add `--fast`, `--separate`, and `--close` * split `--save` into `--save` + `--load` * minor refactoring * assert that return code is non-zero when waiting * cast to int directly * reverse condition for `fast` in `collect_examples` * sort cherry-picked examples by name * rename `port` to `sdk_port` * add descriptions for ports * use built `rerun` binary directly + simplify args * wait for viewers to start + examples to finish * dont start viewer for `--save` * add `--quiet` to build commands * sleep instead of checking logs * capture output and print at the end * print what we are waiting for --------- Co-authored-by: Emil Ernerfeldt <[email protected]>
Fixes #1945
run_all.py
script--fast
flag which limits examples to just cherry-picked examples--separate
flag which runs each example in a separate viewer--web
, this opens a new tab for each example--save
, this opens a new window for each example--close
flag which closes all open viewers when the examples finish runningThe refactoring mainly consisted of moving the viewer starting logic into a class which can be used as a context manager in a
with
statement. It also finds and uses free ports every time it's started, which makes running it much more consistent (no moreport already in use
warnings).Checklist
PR Build Summary: https://build.rerun.io/pr/2054