Skip to content

Commit

Permalink
Clean up sphinx config
Browse files Browse the repository at this point in the history
  • Loading branch information
bsweger committed Oct 11, 2024
1 parent df86eaf commit 26b8004
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 26 deletions.
Binary file added docs/_static/cladetime_logo dark_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/cladetime_logo_light_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/reichlab_favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 22 additions & 23 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import os
import sys
from datetime import date

# Configuration file for the Sphinx documentation builder.

# -- Project information

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

# Add cladetime location to the path, so we can use autodoc to
Expand All @@ -19,7 +18,6 @@
# FIXME: get the version dynamically
version = "0.1.0"


# -- General configuration

extensions = [
Expand All @@ -40,12 +38,22 @@

templates_path = ["_templates"]

# The root toctree document.
root_doc = "index"

# Test code blocks only when explicitly specified
doctest_test_doctest_blocks = ""

# Only look for source files in the docs directory
# include_patterns = ["**/docs"]

# 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_favicon = "_static/reichlab_favicon.png"
html_title = "Cladetime"
html_last_updated_fmt = "%Y-%m-%d"

# These folders are copied to the documentation's HTML output
html_theme_options = {
Expand All @@ -55,24 +63,12 @@
This is an announcement!
</a>
""",
"light_logo": "reichlab.png",
"dark_logo": "reichlab.png",
"sidebar_hide_name": True,
"light_logo": "cladetime_logo_light_mode.png",
"dark_logo": "cladetime_logo_dark_mode.png",
"navigation_with_keys": True,
}

# Order sidebar content, placing ads in the left sidebar
# html_sidebars = {
# "**": [
# "sidebar/brand.html",
# "sidebar/search.html",
# "sidebar/scroll-start.html",
# "sidebar/navigation.html",
# "sidebar/scroll-end.html",
# "sidebar/ethical-ads.html",
# ]
# }


# from https://myst-parser.readthedocs.io/en/latest/syntax/optional.html
myst_enable_extensions = [
"amsmath",
Expand All @@ -88,11 +84,14 @@
# Open Graph metadata
ogp_title = "cladetime documentation"
ogp_type = "website"
ogp_social_cards = {"image": "images/reichlab.png", "line_color": "#F09837"}
ogp_description = "cladetime is a user-friendly library for accessing Sars-Cov-2 clade data from Nextstrain."
ogp_social_cards = {"image": "_static/cladetime_logo_light_mode.png", "line_color": "#F09837"}
ogp_description = "Cladetime is a Python interface for accessing Nextstraing Sars-Cov-2 sequence and clade data."

# Test code blocks only when explicitly specified
doctest_test_doctest_blocks = ""
# Warn about all references to unknown targets
nitpicky = True
nitpick_ignore = [
("py:class", "datetime"),
]


# -- Options for EPUB output
Expand Down
Binary file removed docs/images/reichlab.png
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Cladetime can be installed with `pip <https://pip.pypa.io/>`_:
Usage
-----

The CladeTime :class:`CladeTime` class provides a lightweight wrapper around historical and current
The CladeTime :any:`CladeTime` class provides a lightweight wrapper around historical and current
SARS-CoV-2 GenBank sequence and sequence metadata created by `nextstrain.org's <https://nextstrain.org/>`_
daily workflow pipeline.

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cladetime.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CladeTime
==========

.. automodule:: cladetime.CladeTime
.. autoclass:: cladetime.CladeTime
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ docs = [
"furo",
"matplotlib",
"myst-parser",
"sphinx",
"sphinx>=5.0,<6.0",
"sphinx-copybutton",
"sphinxext-opengraph",
]
Expand Down

0 comments on commit 26b8004

Please sign in to comment.