Skip to content

Commit

Permalink
Merge branch 'documentation-sphinx' into docs-update
Browse files Browse the repository at this point in the history
  • Loading branch information
pluflou authored Apr 23, 2024
2 parents abc0dba + 3faf14a commit b1c8ff8
Show file tree
Hide file tree
Showing 22 changed files with 1,396 additions and 377 deletions.
25 changes: 25 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py
fail_on_warning: true

# Install regular dependencies.
# Then, install special pinning for RTD.
python:
install:
- requirements: requirements.txt
- method: pip
path: .

74 changes: 74 additions & 0 deletions docs/source/_static/solardatatools.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/* Main page overview cards */

.sd-card {
background: #fff;
border-radius: 0;
padding: 30px 10px 20px 10px;
margin: 10px 0px;
}

.sd-card .sd-card-header {
text-align: center;
}

.sd-card .sd-card-header .sd-card-text {
margin: 0px;
}

.sd-card .sd-card-img-top {
height: 52px;
width: 52px;
margin-left: auto;
margin-right: auto;
}

.sd-card .sd-card-header {
border: none;
background-color: white;
color: #150458 !important;
font-size: var(--pst-font-size-h5);
font-weight: bold;
padding: 2.5rem 0rem 0.5rem 0rem;
}

.sd-card .sd-card-footer {
border: none;
background-color: white;
}

.sd-card .sd-card-footer .sd-card-text {
max-width: 220px;
margin-left: auto;
margin-right: auto;
}

/* Dark theme tweaking */
html[data-theme=dark] .sd-card img[src*='.svg'] {
filter: invert(0.82) brightness(0.8) contrast(1.2);
}

/* Main index page overview cards */
html[data-theme=dark] .sd-card {
background-color:var(--pst-color-background);
}

html[data-theme=dark] .sd-shadow-sm {
box-shadow: 0 .1rem 1rem rgba(250, 250, 250, .6) !important
}

html[data-theme=dark] .sd-card .sd-card-header {
background-color:var(--pst-color-background);
color: #150458 !important;
}

html[data-theme=dark] .sd-card .sd-card-footer {
background-color:var(--pst-color-background);
}

html[data-theme=dark] h1 {
color: var(--pst-color-primary);
}

html[data-theme=dark] h3 {
color: #0a6774;
}
4 changes: 4 additions & 0 deletions docs/source/acknowledgment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Acknowledgment
--------------

This work supported by the U.S. Department of Energy's Office of Energy Efficiency and Renewable Energy (EERE) under the Solar Energy Technologies Office Award Number 38529.
39 changes: 32 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@
# 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 sphinx_rtd_theme
import pydata_sphinx_theme
import os
import sys
from datetime import date

sys.path.insert(0, os.path.abspath("../.."))


# -- Project information -----------------------------------------------------

project = "Solar Data Tools"
copyright = "2021, Bennet Meyers"
copyright = '%s, Bennet Meyers' % date.today().year
author = "Bennet Meyers"


Expand All @@ -29,27 +30,51 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["sphinx_rtd_theme", "sphinx.ext.autodoc", "sphinx.ext.napoleon"]
extensions = [
"sphinx_design",
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"nbsphinx" # for notebooks integration
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
templates_path = [
"_templates"
]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
exclude_patterns = [
"_build",
"Thumbs.db",
".DS_Store"
]


# -- 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 = "sphinx_rtd_theme"
html_theme = "pydata_sphinx_theme"

# 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 = []
#html_title = f"{project} v{release}"
html_static_path = ['_static']
html_css_files = ["solardatatools.css"]
html_copy_source = False

master_doc = "index"

# 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_options = {
"external_links": [],
"navbar_align": "left",
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
"show_version_warning_banner": True,
}
31 changes: 31 additions & 0 deletions docs/source/images/api.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/source/images/contributor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b1c8ff8

Please sign in to comment.