Skip to content

Commit

Permalink
Move get_reference_tree to Tree class
Browse files Browse the repository at this point in the history
  • Loading branch information
bsweger committed Oct 21, 2024
1 parent 46f7081 commit 1ed35f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/cladetime/cladetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,3 @@ def _validate_as_of_date(self, as_of: str) -> datetime:
raise CladeTimeInvalidDateError(f"Date must be after May 1, 2023: {as_of_date}")

return as_of_date

def get_reference_tree(self) -> dict:
"""Return a reference tree used for SARS-CoV-2 clade assignments
Retrieves the reference tree that was current as of
:any:`tree_as_of<tree_as_of>`.
This method is not yet implemented.
Returns
-------
dict
"""
return {self.tree_as_of: "not implemented"}
14 changes: 14 additions & 0 deletions src/cladetime/util/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,17 @@ def _get_url_ncov_metadata(self):
self._clade_time._config.nextstrain_ncov_metadata_key,
self.as_of,
)[1]

def get_reference_tree(self) -> dict:
"""Return a reference tree used for SARS-CoV-2 clade assignments
Retrieves the reference tree that was current as of
:any:`tree_as_of<tree_as_of>`.
This method is not yet implemented.
Returns
-------
dict
"""
return {self.tree_as_of: "not implemented"}

0 comments on commit 1ed35f8

Please sign in to comment.