Skip to content

Commit

Permalink
Merge pull request USEPA#393 from dbhart/docs-theme
Browse files Browse the repository at this point in the history
Docs theme
  • Loading branch information
kaklise authored Nov 16, 2023
2 parents 733feed + 68136ed commit 7c5a6a0
Show file tree
Hide file tree
Showing 116 changed files with 1,521 additions and 935 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ temp*
examples/*.inp
wntr/tests/*.png

documentation/_local
documentation/apidoc
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1>
<img src="https://raw.githubusercontent.com/usepa/wntr/main/documentation/figures/logo.jpg" width="375">
<img src="https://raw.githubusercontent.com/usepa/wntr/main/documentation/_static/logo.jpg" width="375">
</h1><br>

[![build](https://github.com/USEPA/WNTR/workflows/build/badge.svg)](https://github.com/USEPA/WNTR/actions/workflows/build_tests.yml)
Expand Down
Binary file added documentation/_static/epa_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added documentation/_static/snl_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions documentation/_static/wntr-favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions documentation/_templates/autosummary/base.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% if objtype == 'property' %}
:orphan:
{% endif %}

{{ objname | escape | underline}}

.. rubric:: *module* :mod:`{{ module }}`

.. currentmodule:: {{ module }}

{% if objtype == 'property' %}
property
{% endif %}

.. auto{{ objtype }}:: {{ fullname | replace(module + ".", module + "::") }}
37 changes: 37 additions & 0 deletions documentation/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{{ objname | escape | underline}}

.. rubric:: *module* :mod:`{{ module }}`

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}

{% block methods %}
{% if methods %}
.. HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
.. autosummary::
{% for item in all_methods %}
{%- if not item.startswith('_') or item in ['__call__'] %}
{{ name }}.{{ item }}
{%- endif -%}
{%- endfor %}
{% endif %}
{% endblock %}

{% block attributes %}
{% if attributes %}
.. HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
.. autosummary::
{% for item in all_attributes %}
{%- if not item.startswith('_') %}
{{ name }}.{{ item }}
{%- endif -%}
{%- endfor %}
{% endif %}
{% endblock %}

{% if methods or attributes %}
~~~~~~~~~~~~~~~~~~~~~~~~~~~
{% endif %}
34 changes: 34 additions & 0 deletions documentation/_templates/autosummary/exception.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{{ objname | escape | underline}}

.. rubric:: *module* :mod:`{{ module }}`

.. currentmodule:: {{ module }}

.. autoexception:: {{ objname }}
:no-inherited-members:

{% block methods %}
{% if methods %}
.. HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
.. autosummary::
{% for item in all_methods %}
{%- if not item.startswith('_') or item in ['__call__'] %}
{{ name }}.{{ item }}
{%- endif -%}
{%- endfor %}
{% endif %}
{% endblock %}

{% block attributes %}
{% if attributes %}
.. HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
.. autosummary::
{% for item in all_attributes %}
{%- if not item.startswith('_') %}
{{ name }}.{{ item }}
{%- endif -%}
{%- endfor %}
{% endif %}
{% endblock %}
73 changes: 73 additions & 0 deletions documentation/_templates/autosummary/module.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{{ fullname | escape | underline}}

.. automodule:: {{ fullname }}
:exclude-members: {% for item in attributes %}{{ item }}, {% endfor %}{% for item in functions %}{{ item }}, {% endfor %}{% for item in classes %}{{ item }}, {% endfor %}{% for item in exceptions %}{{ item }}, {% endfor %}

{% block attributes %}
{% if attributes %}
.. rubric:: {{ _('Module Attributes') }}

.. autosummary::
:toctree:
:template: autosummary/base.rst
{% for item in attributes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block functions %}
{% if functions %}
.. rubric:: {{ _('Functions') }}

.. autosummary::
:nosignatures:
:toctree:
:template: autosummary/base.rst
{% for item in functions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block classes %}
{% if classes %}
.. rubric:: {{ _('Classes') }}

.. autosummary::
:nosignatures:
:toctree:
:template: autosummary/class.rst
{% for item in classes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block exceptions %}
{% if exceptions %}
.. rubric:: {{ _('Exceptions') }}

.. autosummary::
:nosignatures:
:toctree:
:template: autosummary/exception.rst
{% for item in exceptions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block modules %}
{% if modules %}
.. rubric:: Modules

.. autosummary::
:toctree:
:recursive:
:template: autosummary/module.rst
{% for item in modules %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
2 changes: 1 addition & 1 deletion documentation/acknowledgements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
\clearpage

Acknowledgements
======================================
================

WNTR is developed through a collaboration between U.S. Environmental Protection Agency, Sandia National
Laboratories, and the open-source community. The U.S. Environmental Protection Agency acknowledges the
Expand Down
30 changes: 26 additions & 4 deletions documentation/acronyms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,46 @@
Abbreviations
======================================

**API**: Application programming interface
**AML**: algebraic modeling system

**CSV**: Comma-separated values
**API**: application programming interface

**CRS**: coordinate reference system

**CSV**: comma-separated values

**DD**: demand-driven `(DDA now the preferred term)`

**DDA**: demand-driven analysis

**EPA**: Environmental Protection Agency

**GIS**: Geographic information system
**EPANET**: a water network modeling tool, see :cite:t:`ross00` and :cite:t:`rwts20`

**GIS**: geographic information system

**HDF**: Hierarchical Data Format

**IDE**: Integrated development environment
**IDE**: integrated development environment

**INP file**: a text input file for EPANET

**I/O**: input and output

**JSON**: JavaScript Object Notation

**PDA**: pressure-driven analysis

**PDD**: pressure dependent demand `(PDA now the preferred term)`

**SCADA**: supervisory control And data acquisition

**SI**: International System of Units

**SQL**: Structured Query Language

**US**: United States

**UTM**: Universal Transverse Mercator

**WNTR**: Water Network Tool for Resilience
7 changes: 0 additions & 7 deletions documentation/apidoc/wntr.epanet.io.rst

This file was deleted.

18 changes: 0 additions & 18 deletions documentation/apidoc/wntr.epanet.rst

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/apidoc/wntr.epanet.toolkit.rst

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/apidoc/wntr.epanet.util.rst

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/apidoc/wntr.gis.geospatial.rst

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/apidoc/wntr.gis.network.rst

This file was deleted.

15 changes: 0 additions & 15 deletions documentation/apidoc/wntr.gis.rst

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/apidoc/wntr.graphics.color.rst

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/apidoc/wntr.graphics.curve.rst

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/apidoc/wntr.graphics.layer.rst

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/apidoc/wntr.graphics.network.rst

This file was deleted.

Loading

0 comments on commit 7c5a6a0

Please sign in to comment.