Skip to content

Commit

Permalink
Add intersphinx mapping
Browse files Browse the repository at this point in the history
This changeset explores the world of intersphinx mapping.
It adds a reference to the nextstrain docs (which are
also sphinx-based) in case we need it, and it adds an
external polars reference to a CladeTime docstring
  • Loading branch information
bsweger committed Oct 22, 2024
1 parent dd824e5 commit 46edae9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@
github_repository = "cladetime"

intersphinx_mapping = {
"nextstrain": ("https://docs.nextstrain.org/en/latest", None),
"polars": ("https://docs.pola.rs/api/python/stable", None),
"python": ("https://docs.python.org/3/", None),
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
"polars": ("https://docs.pola.rs/api/python/stable", None),
}
intersphinx_disabled_domains = ["std"]

Expand Down
13 changes: 6 additions & 7 deletions src/cladetime/cladetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class CladeTime:
Parameters
----------
sequence_as_of : datetime.datetime | str | None
Sets the versions of Nextstrain SARS-CoV-2 genome sequence
and sequence metadata files that will be used by
CladeTime properties and methods. Can be a datetime object or a
Sets the versions of Nextstrain SARS-CoV-2 genome sequence and
sequence metadata files that will be used by CladeTime
properties and methods. Can be a datetime object or a
string in YYYY-MM-DD format, both of which will be treated as
UTC. The default value is the current time.
tree_as_of : datetime.datetime | str | None
Expand Down Expand Up @@ -102,9 +102,8 @@ def sequence_as_of(self, date) -> None:
def tree_as_of(self) -> datetime:
"""
datetime.datetime : The date and time (UTC) used to retrieve the NextStrain
reference tree. :any:`get_reference_tree<get_reference_tree>`
uses this date to get the reference tree that was current as
of this date.
reference tree. :py:obj:`cladetime.Tree.tree`
contains the reference tree that was current as of this date.
"""
return self._tree_as_of

Expand Down Expand Up @@ -150,7 +149,7 @@ def sequence_metadata(self):
@sequence_metadata.getter
def sequence_metadata(self) -> pl.LazyFrame:
"""
:class:`polars.LazyFrame` : A Polars LazyFrame that references
:external+polars:std:doc:`polars.LazyFrame<reference/lazyframe/index>` : A Polars LazyFrame that references
:any:`url_sequence_metadata<url_sequence_metadata>`
"""
if self.url_sequence_metadata:
Expand Down

0 comments on commit 46edae9

Please sign in to comment.