forked from nextstrain/nextstrain.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sources: Remodel Datasets and Narratives using a Resources with Subre…
…sources interface Refactors the common bits shared by the Dataset and Narrative classes into a parent class, Resource, and the special "type" handling of Datasets (main, root-sequence, etc) into Subresources. Narratives also gain Subresources, but only support a single type for now (md). Sources now own URL generation; subresources know their own basename but delegate to the Source for the full URL. Resource and Subresource classes are interfaces which provide a partial implementation of required properties and methods. The upshot of the interfaces is that new endpoint code will be able to deal with Datasets and Narratives interchangeably. Subresource also provides a place to attach more info about each "type" than just a URL.
- Loading branch information
Showing
4 changed files
with
114 additions
and
74 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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