Skip to content

Commit

Permalink
added auto doc req file and updated steps for setup
Browse files Browse the repository at this point in the history
  • Loading branch information
deronsmith committed Jul 18, 2024
1 parent c1e58ce commit 3757d0c
Show file tree
Hide file tree
Showing 38 changed files with 307 additions and 1,905 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ jobs:
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme myst_parser sphinx-click
pip install -r doc-requirements.txt
- name: Sphinx build
run: |
python -m build
pip install dist\esat-2024.0.1-cp312-cp312-linux_x86_64.whl
sphinx-apidoc -o docs esat
sphinx-apidoc -o docs eval
sphinx-build -M html . docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
11 changes: 6 additions & 5 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import os
import sys
from datetime import datetime
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(1, os.path.abspath('..'))
sys.path.insert(2, os.path.abspath(os.path.join("..", "esat")))
sys.path.insert(3, os.path.abspath(os.path.join("..", "eval")))
sys.path.insert(0, os.path.abspath("."))
sys.path.insert(1, os.path.abspath(os.path.join('.', 'esat')))
# sys.path.insert(2, os.path.abspath(os.path.join(".", "esat")))
sys.path.insert(2, os.path.abspath(os.path.join(".", "eval")))


# -- Project information -----------------------------------------------------
Expand All @@ -17,7 +17,8 @@
project = 'Environmental Source Apportionment Toolkit (ESAT)'
copyright = '2024, EPA'
author = 'Deron Smith'
release = datetime.now().strftime("%m/%d/%Y")
version = str(datetime.now().year)
release = "0.1a"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
11 changes: 11 additions & 0 deletions doc-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
fastcluster==1.2.6
fuzzy-c-means==1.7.0
myst_parser==3.0.1
numpy==1.26.4
pandas==2.2.0
plotly==5.22.0
scipy==1.14.0
sphinx==7.4.6
sphinx-click==6.0.0
sphinx_rtd_theme==2.0.0
tqdm==4.66.4
Binary file added docs/doctrees/.pytest_cache/README.doctree
Binary file not shown.
Binary file modified docs/doctrees/README.doctree
Binary file not shown.
Binary file modified docs/doctrees/docs/cli.doctree
Binary file not shown.
Binary file modified docs/doctrees/docs/esat.cli.doctree
Binary file not shown.
Binary file modified docs/doctrees/docs/esat.data.doctree
Binary file not shown.
Binary file modified docs/doctrees/docs/esat.doctree
Binary file not shown.
Binary file modified docs/doctrees/docs/esat.error.doctree
Binary file not shown.
Binary file modified docs/doctrees/docs/esat.model.doctree
Binary file not shown.
Binary file modified docs/doctrees/docs/esat.rotational.doctree
Binary file not shown.
Binary file modified docs/doctrees/docs/eval.doctree
Binary file not shown.
Binary file modified docs/doctrees/docs/modules.doctree
Binary file not shown.
Binary file modified docs/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/doctrees/index.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 905dd1daf8b115872569f488ac4a69b1
config: 0c27b2fe9c7950e44a6a7aa429929cac
tags: 645f666f9bcd5a90fca523b33c5a78b7
116 changes: 116 additions & 0 deletions docs/html/.pytest_cache/README.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pytest cache directory &mdash; Environmental Source Apportionment Toolkit (ESAT) 0.1a documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" />


<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=88a2ef70"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
</head>

<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >



<a href="../index.html" class="icon icon-home">
Environmental Source Apportionment Toolkit (ESAT)
</a>
<div class="version">
2024
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Documentation</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../index.html">Welcome to EPA ESAT’s Documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="../README.html">Environmental Source Apportionment Toolkit (ESAT)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../docs/modules.html">Python API</a></li>
<li class="toctree-l1"><a class="reference internal" href="../docs/cli.html">Command Line Interface</a></li>
</ul>

</div>
</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">Environmental Source Apportionment Toolkit (ESAT)</a>
</nav>

<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">pytest cache directory</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/.pytest_cache/README.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<section id="pytest-cache-directory">
<h1>pytest cache directory<a class="headerlink" href="#pytest-cache-directory" title="Link to this heading"></a></h1>
<p>This directory contains data from the pytest’s cache plugin,
which provides the <code class="docutils literal notranslate"><span class="pre">--lf</span></code> and <code class="docutils literal notranslate"><span class="pre">--ff</span></code> options, as well as the <code class="docutils literal notranslate"><span class="pre">cache</span></code> fixture.</p>
<p><strong>Do not</strong> commit this to version control.</p>
<p>See <a class="reference external" href="https://docs.pytest.org/en/stable/how-to/cache.html">the docs</a> for more information.</p>
</section>


</div>
</div>
<footer>

<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2024, EPA.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.


</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>

</body>
</html>
7 changes: 5 additions & 2 deletions docs/html/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Environmental Source Apportionment Toolkit (ESAT) &mdash; Environmental Source Apportionment Toolkit (ESAT) 06/03/2024 documentation</title>
<title>Environmental Source Apportionment Toolkit (ESAT) &mdash; Environmental Source Apportionment Toolkit (ESAT) 0.1a documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />

Expand All @@ -15,7 +15,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=f6960e4d"></script>
<script src="_static/documentation_options.js?v=88a2ef70"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
Expand All @@ -36,6 +36,9 @@
<a href="index.html" class="icon icon-home">
Environmental Source Apportionment Toolkit (ESAT)
</a>
<div class="version">
2024
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
Expand Down
8 changes: 8 additions & 0 deletions docs/html/_sources/.pytest_cache/README.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# pytest cache directory #

This directory contains data from the pytest's cache plugin,
which provides the `--lf` and `--ff` options, as well as the `cache` fixture.

**Do not** commit this to version control.

See [the docs](https://docs.pytest.org/en/stable/how-to/cache.html) for more information.
2 changes: 1 addition & 1 deletion docs/html/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
VERSION: '06/03/2024',
VERSION: '0.1a',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
7 changes: 4 additions & 3 deletions docs/html/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const Search = {

htmlToText: (htmlString, anchor) => {
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
for (const removalQuery of [".headerlinks", "script", "style"]) {
for (const removalQuery of [".headerlink", "script", "style"]) {
htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() });
}
if (anchor) {
Expand Down Expand Up @@ -328,13 +328,14 @@ const Search = {
for (const [title, foundTitles] of Object.entries(allTitles)) {
if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) {
for (const [file, id] of foundTitles) {
let score = Math.round(100 * queryLower.length / title.length)
const score = Math.round(Scorer.title * queryLower.length / title.length);
const boost = titles[file] === title ? 1 : 0; // add a boost for document titles
normalResults.push([
docNames[file],
titles[file] !== title ? `${titles[file]} > ${title}` : title,
id !== null ? "#" + id : "",
null,
score,
score + boost,
filenames[file],
]);
}
Expand Down
Loading

0 comments on commit 3757d0c

Please sign in to comment.