Supporting downloading datasets not in manifest#345
Merged
Conversation
…e adapters Moves them closer to the actual Charon API request/response and makes the Resource/Dataset/Narrative model classes no longer tied to Charon's response format. The latter will be handy when manually instantiating them in another location outside of the current places in _ls(), but also make it easier when/if we move to another resource listing API.
… aren't in the manifest
This allows downloading of datasets like
https://nextstrain.org/enterovirus/d68/vp1/2020-01-23
https://nextstrain.org/nextclade/sars-cov-2/21L
and others, as reasonably expected.¹ It also will, with one more minor
tweak to follow, allow downloading of past snapshots of resources (e.g.
/zika@2023-01-01).
Switches from an assert on expected media type to a conditional
UserError, supported by the new Resource.__str__() method, since for
single resource downloads we no longer have the assurance of knowing it
exists already.
¹ <https://bedfordlab.slack.com/archives/C01LCTT7JNN/p1667970567194279>
…esources Using the same @YYYY-MM-DD suffix syntax as on the web. Support for this server-side is recently landed.¹ ¹ <nextstrain/nextstrain.org#719>
jameshadfield
approved these changes
Jan 18, 2024
Member
jameshadfield
left a comment
There was a problem hiding this comment.
Functionality seems good by inspection
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.
(Based upon #333 for less in-flight conflict.)
Checklist