Conversation
Contributor
Author
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
joverlee521
approved these changes
Dec 6, 2022
|
|
||
|
|
||
| # Avoid text-mode browsers | ||
| TERM = environ.pop("TERM", None) |
Contributor
There was a problem hiding this comment.
I went down a tiny rabbit hole of what TERM means. Finally found it being used in the webbrowser code for registering browers 😄
Contributor
There was a problem hiding this comment.
Also learned that webbrowser checks BROWSER for user specified browser. This works with nextstrain view to use a specific browser rather than the default!
Contributor
Author
There was a problem hiding this comment.
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.
jameshadfield
approved these changes
Dec 7, 2022
Member
jameshadfield
left a comment
There was a problem hiding this comment.
Looks good from reading through the code 👍
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
See commit messages for details. The summaries:
Related issue(s)
#128
Testing