-
Notifications
You must be signed in to change notification settings - Fork 20
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
view: Support narratives #240
Conversation
Reduces friction and potential confusion e.g. over the URL reported by Nextstrain CLI vs. the URL reported by Auspice. If there's only a single dataset or narrative available, then open it directly. Otherwise, rely on Auspice's dataset/narrative listing page for folks to get where they're going.
…file paths …instead of a single directory path. This will let us use them with pre-filtered lists of files to see what's a dataset and what's a narrative.
The data directories used by Auspice will be inferred from the file's path and the given dataset or narrative will be opened in a browser by default (instead of Auspice's dataset/narrative listing). This makes the UX for viewing a specific dataset or narrative much nicer, with fewer steps and a more direct translation of intent into invocation (e.g. "I want to view this dataset" vs. "I want to view this dataset, so I have to specify its parent directory").
de0ef0c
to
a0f3ad1
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.
Very cool 🤩
|
||
|
||
# Avoid text-mode browsers | ||
TERM = environ.pop("TERM", None) |
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 went down a tiny rabbit hole of what TERM
means. Finally found it being used in the webbrowser code for registering browers 😄
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.
Also learned that webbrowser checks BROWSER
for user specified browser. This works with nextstrain view
to use a specific browser rather than the default!
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.
Yep, TERM
is an old and very standard environment variable. BROWSER
is a less old but still pretty conventional variable. That's, of course, why Python's webbrowser module uses them. :-)
…ored Suggested by @joverlee521 in review.
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.
Looks good from reading through the code 👍
See commit messages for details. The summaries:
Related issue(s)
#128
Testing