Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #8 from YosefLab/docs
Browse files Browse the repository at this point in the history
use simpler rtd theme
  • Loading branch information
adamgayoso authored Jun 8, 2021
2 parents 4714dbc + 762c927 commit 434b785
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 72 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ Skeleton repository for creating novel models with
[scvi-tools](https://www.scvi-tools.org/en/stable/). For questions about
using this skeleton, please use the scvi-tools
[forum](https://discourse.scvi-tools.org/).


Getting started development using this skeleton is similar to [getting started](https://docs.scvi-tools.org/en/stable/contributing/index.html) with scvi-tools.
78 changes: 78 additions & 0 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/* influenced by and borrowed from: https://github.com/cvxgrp/pymde/blob/main/docs_src/source/_static/css/custom.css */

@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&display=swap');

:root {
--sidebarcolor: #003262;
--sidebarfontcolor: #ffffff;
--sidebarhover: #295e97;

--bodyfontcolor: #333;
--webfont: 'Roboto';

--contentwidth: 1000px;
}

/* Fonts and text */
h1, h2, h3, h4, h5, h6 {
font-family: var(--webfont), 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
}

h2, h3, h4, h5, h6 {
padding-top: 0.25em;
margin-bottom: 0.5em;
}

h1 {
font-size: 225%;
}

body {
font-family: var(--webfont), 'Helvetica Neue', Helvetica, Arial, sans-serif;
color: var(--bodyfontcolor);
}

p {
font-size: 1em;
line-height: 150%;
}


/* Sidebar */
.wy-side-nav-search {
background-color: var(--sidebarcolor);
}

.wy-nav-side {
background: var(--sidebarcolor);
}

.wy-menu-vertical header, .wy-menu-vertical p.caption {
color: var(--sidebarfontcolor);
}

.wy-menu-vertical a {
color: var(--sidebarfontcolor);
}

.wy-side-nav-search > div.version {
color: var(--sidebarfontcolor);
}

.wy-menu-vertical a:hover {
background-color: var(--sidebarhover);
}

/* Main content */
.wy-nav-content {
max-width: var(--contentwidth);
}


html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list) > dt{
margin-bottom: 6px;
border-left: none;
background: none;
color: #555;
}
89 changes: 19 additions & 70 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Configuration file for the Sphinx documentation builder.
#
# scvi documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another
# directory, add these directories to sys.path here. If the directory is
# relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
#
import sys
from pathlib import Path

Expand Down Expand Up @@ -122,70 +110,31 @@
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "default"
pygments_style = "tango"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False


# -- Options for HTML output -------------------------------------------
# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_show_sourcelink = True
html_sidebars = {
"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]
}
html_theme = "sphinx_material"

# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
# documentation.
#
html_theme = "sphinx_rtd_theme"

html_show_sourcelink = False

html_show_copyright = False

display_version = True

# Set link name generated in the top bar.
html_title = "scvi-tools project skeleton"

# Material theme options (see theme.conf for more information)
html_theme_options = {
"base_url": "https://project.github.io/project",
# Set the color and the accent color
"color_primary": "white",
"color_accent": "light-blue",
"repo_type": "github",
# Set the repo location to get a badge with stats
"repo_url": "https://github.com/YosefLab/scvi-tools-skeleton",
"repo_name": "scvi-tools-skeleton",
"nav_links": [],
"html_minify": True,
"css_minify": True,
"nav_title": "scvi-tools-skeleton",
"globaltoc_depth": 3,
"globaltoc_collapse": True,
"globaltoc_includehidden": True,
"master_doc": False,
"logo_icon": "&#xe869",
}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

html_show_sphinx = False


# -- Options for HTMLHelp output ---------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = "skeletondoc"
html_css_files = [
"css/custom.css",
]

mathjax_config = {
"extensions": ["tex2jax.js"],
"jax": ["input/TeX", "output/HTML-CSS"],
"tex2jax": {
"inlineMath": [["$", "$"], ["\\(", "\\)"]],
"displayMath": [["$$", "$$"], ["\\[", "\\]"]],
"processEscapes": True,
},
}
html_favicon = "favicon.ico"
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ scikit-misc = {version = ">=0.1.3", optional = true}
scvi-tools = ">=0.10.0"
sphinx = {version = "^3.0", optional = true}
sphinx-autodoc-typehints = {version = "*", optional = true}
sphinx-material = {version = "*", optional = true}
sphinx-rtd-theme = {version = "*", optional = true}
typing_extensions = {version = "*", python = "<3.8"}

[tool.poetry.extras]
Expand All @@ -68,7 +68,7 @@ docs = [
"pydata-sphinx-theme",
"typing_extensions",
"sphinx-autodoc-typehints",
"sphinx-material",
"sphinx-rtd-theme",
]
tutorials = ["scanpy", "leidenalg", "python-igraph", "loompy", "scikit-misc"]

Expand Down

0 comments on commit 434b785

Please sign in to comment.