Skip to content

Commit

Permalink
Make the Clade class public (#72)
Browse files Browse the repository at this point in the history
Having Clade as a public class means we can use it
for type checking. For example, the target data
scripts we're writing for the variant-nowcast-hub
will benefit from typing the object returned by
CladeTime.assign_clades().
  • Loading branch information
bsweger authored Dec 13, 2024
1 parent a81ef59 commit ec8a764
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/reference/clade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
Clade
==========

.. autoclass:: cladetime._clade.Clade
.. autoclass:: cladetime.clade.Clade
:members:
3 changes: 2 additions & 1 deletion src/cladetime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@

# must import Tree before CladeTime
from cladetime.tree import Tree
from cladetime.clade import Clade
from cladetime.cladetime import CladeTime
from cladetime.util.reference import _docker_installed

__all__ = ["CladeTime", "Tree"]
__all__ = ["Clade", "CladeTime", "Tree"]

# tells us package to consider DC a state
os.environ["DC_STATEHOOD"] = "1"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/cladetime/cladetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import structlog

from cladetime import Tree, sequence
from cladetime._clade import Clade
from cladetime.clade import Clade
from cladetime.exceptions import CladeTimeDateWarning, CladeTimeInvalidURLError, CladeTimeSequenceWarning
from cladetime.util.config import Config
from cladetime.util.reference import _get_clade_assignments, _get_date, _get_nextclade_dataset, _get_s3_object_url
Expand Down Expand Up @@ -235,7 +235,7 @@ def assign_clades(self, sequence_metadata: pl.LazyFrame, output_file: str | None
Returns
-------
:class:`cladetime._clade.Clade`
:class:`cladetime.clade.Clade`
A Clade object that contains detailed and summarized information
about clades assigned to the sequences in sequence_metadata.
Expand Down

0 comments on commit ec8a764

Please sign in to comment.