Skip to content

Commit

Permalink
Formatting and theme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bsweger committed Oct 10, 2024
1 parent c299ba9 commit c659e17
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 22 deletions.
30 changes: 13 additions & 17 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from datetime import date

# Configuration file for the Sphinx documentation builder.

# -- Project information

project = "Cladetime"
copyright = "2024, Reich Lab @ The University of Massachusetts Amherst"
copyright = f"{date.today().year}, Reich Lab @ The University of Massachusetts Amherst"
author = "Reich Lab"

release = "0.1"
Expand All @@ -28,18 +30,24 @@

templates_path = ["_templates"]

# These folders are copied to the documentation's HTML output
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_static_path = ["_static"]
html_theme = "furo"
html_favicon = "images/reichlab.png"
html_title = "Cladetime"

# These folders are copied to the documentation's HTML output
html_theme_options = {
"announcement": """
<a style=\"text-decoration: none; color: white;\"
href=\"https://reichlab.io">
<img src=\"/en/latest/_static/reichlab.png\"/> This is an announcement!
</a>
""",
"sidebar_hide_name": True,
"light_logo": "banner.svg",
"dark_logo": "dark-logo.svg",
"light_logo": "images/reichlab.png",
"dark_logo": "images/reichlab.png",
"navigation_with_keys": True,
}

# from https://myst-parser.readthedocs.io/en/latest/syntax/optional.html
Expand All @@ -63,18 +71,6 @@
# Test code blocks only when explicitly specified
doctest_test_doctest_blocks = ""

# -- Options for HTML output

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = "furo"
html_favicon = "images/reichlab.png"
html_title = "Cladetime"
html_theme_options = {}

# html_js_files = [
# "js/custom.js",
# ]

# -- Options for EPUB output
epub_show_urls = "footnote"
4 changes: 3 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
Cladetime
===============

Cladetime is a lightweight Python library for manipulating SARS-CoV-2 sequence and clade data provided by [nextstrain.org](https://nextstrain.org/).
Cladetime is a lightweight Python library for manipulating SARS-CoV-2 sequence and clade data provided by
`nextstrain.org <https://nextstrain.org/>`_.

Contents
--------

.. toctree::
:titlesonly:

Home <self>
user-guide
16 changes: 12 additions & 4 deletions docs/user-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ Cladetime
Installing
------------

cladetime can be installed with [pip])(https://pip.pypa.io/): ::
cladetime can be installed with `pip <https://pip.pypa.io/>`_:

.. code-block:: bash
pip install git+https://github.com/reichlab/cladetime.git
Finding Nextstrain SARS-CoV-2 sequences and sequence metadata
--------------------------------------------------------------

Cladetime provides a CladeTime class that provides a lightweight interface to nextstrain.org files. ::
Cladetime provides a CladeTime class that provides a lightweight interface to nextstrain.org files.

.. code-block:: python
from cladetime import CladeTime
Expand Down Expand Up @@ -42,10 +46,14 @@ Cladetime provides a CladeTime class that provides a lightweight interface to ne
Working with SARS-CoV-2 sequence metadata
------------------------------------------

The CladeTime class also provides a Polars LazyFrame object that points to the Nextstrain's sequence metadata file. This file is in .tsv format and contains information about the sequences, such as their collection date, host, and location.
The CladeTime class also provides a Polars LazyFrame object that points to the Nextstrain's sequence metadata file.
This file is in .tsv format and contains information about the sequences, such as their collection date,
host, and location.

The metadata also includes a clade assignment for each sequence. Nextstrain assigns clades based on a reference tree, and the reference tree varies over time. ::
The metadata also includes a clade assignment for each sequence. Nextstrain assigns clades based on a reference tree,
and the reference tree varies over time.

.. code-block:: python
import polars as pl
from cladetime import CladeTime
Expand Down

0 comments on commit c659e17

Please sign in to comment.