Skip to content

Commit 3e90aa1

Browse files
authored
Updated documentation and simple example config (sandialabs#86)
* bump action versions * Minor updates to documentation, including the use of sphinxcontrib.bibtex * update simple example config to support np * removed version number from figure * updated release notes * Added documentation requirements
1 parent e64b09a commit 3e90aa1

14 files changed

+217
-55
lines changed

documentation/applications.rst

+7-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ For PV systems, the translation dictionary can be used to group data
1313
according to the system architecture, which can include multiple strings and modules.
1414
The time filter can be defined based on sun position and system location.
1515
The data objects used in Pecos are compatible with `PVLIB <http://pvlib-python.readthedocs.io/>`_, which can be used to model PV
16-
systems [SHFH16]_.
16+
systems :cite:p:`pvlib`.
1717
Pecos also includes functions to compute PV specific metrics (i.e. insolation,
1818
performance ratio, clearness index) in the :class:`~pecos.pv` module.
1919
The International Electrotechnical Commission (IEC) has developed guidance to measure
2020
and analyze energy production from PV systems.
21-
Klise et al. [KlSC17]_ describe an application of IEC 61724-3, using
21+
Klise et al. :cite:p:`klise17` describe an application of IEC 61724-3, using
2222
Pecos and PVLIB.
2323
Pecos includes a PV system example in the `examples/pv <https://github.com/sandialabs/pecos/tree/main/examples/pv>`_ directory.
2424

@@ -34,4 +34,9 @@ Fossil energy systems
3434
In partnership with National Energy Technology Laboratory (NETL), Pecos was extended to demonstrate real-time monitoring of coal-fired power plants in support of the Department of Energy's `Institute for the Design of Advanced Energy Systems (IDAES) <https://idaes.org/>`_.
3535
As part of this demonstration, streaming algorithms were added to Pecos to facilitate near real-time analysis using continuous data streams.
3636

37+
Water treatment systems
38+
-----------------------
39+
40+
As part of a Water Research Foundation Project, Pecson et al. :cite:p:`wrf24` used Pecos to develop a real-time
41+
event detection system for direct potable reuse at the San Diego North City Pure Water Demonstration Facility.
3742

documentation/conf.py

+37-9
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,32 @@
4040
'sphinx.ext.autosummary',
4141
'sphinx.ext.napoleon',
4242
'sphinx.ext.intersphinx',
43-
]
44-
45-
napoleon_use_rtype = False
46-
viewcode_import = True
43+
'sphinx_design',
44+
'sphinxcontrib.bibtex'
45+
]
46+
47+
add_function_parentheses = True
48+
add_module_names = False
49+
python_display_short_literal_types = True
50+
51+
toc_object_entries = True
52+
toc_object_entries_show_parents = 'hide'
53+
54+
napoleon_google_docstring = True
55+
napoleon_numpy_docstring = True
56+
napoleon_include_init_with_doc = True
57+
napoleon_include_private_with_doc = False
58+
napoleon_include_special_with_doc = False
59+
napoleon_use_admonition_for_examples = False
60+
napoleon_use_admonition_for_notes = False
61+
napoleon_use_admonition_for_references = True
62+
napoleon_preprocess_types = False
63+
napoleon_use_ivar = True
64+
napoleon_use_param = True
65+
napoleon_use_rtype = True
66+
napoleon_use_keyword = False
67+
68+
# viewcode_import = False
4769
numpydoc_show_class_members = True
4870
numpydoc_class_members_toctree = False
4971
autodoc_member_order = 'bysource'
@@ -70,6 +92,10 @@
7092
copyright = u'2016, National Technology & Engineering Solutions of Sandia, LLC (NTESS)'
7193
author = u'Sandia National Laboratories'
7294

95+
bibtex_bibfiles = ['references.bib']
96+
bibtex_default_style = 'plain'
97+
bibtex_reference_style = 'label'
98+
7399
# The version info for the project you're documenting, acts as replacement for
74100
# |version| and |release|, also used in various other places throughout the
75101
# built documents.
@@ -84,7 +110,7 @@
84110
#
85111
# This is also used if you do content translation via gettext catalogs.
86112
# Usually you set "language" from the command line for these cases.
87-
language = None
113+
language = 'en'
88114

89115
# There are two options for replacing |today|: either, you set today to some
90116
# non-false value, then it is used:
@@ -138,17 +164,19 @@ def setup(app):
138164
import sphinx_rtd_theme
139165
html_theme = 'sphinx_rtd_theme'
140166
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
141-
html_style = 'pecos.css'
167+
html_style = 'pecos.css'
142168
else:
169+
def setup(app):
170+
app.add_css_file( "pecos.css")
143171
html_theme = 'default'
144172
# html_context = {
145173
# 'css_files': ['_static/pecos.css'],
146-
# }
174+
# }
147175

148176
# Theme options are theme-specific and customize the look and feel of a theme
149177
# further. For a list of options available for each theme, see the
150178
# documentation.
151-
#html_theme_options = {}
179+
html_theme_options = {}
152180

153181
# Add any paths that contain custom themes here, relative to this directory.
154182
#html_theme_path = []
@@ -162,7 +190,7 @@ def setup(app):
162190

163191
# The name of an image file (relative to this directory) to place at the top
164192
# of the sidebar.
165-
#html_logo = 'figures/logo.jpg'
193+
#html_logo = 'figures/logo.png'
166194

167195
# The name of an image file (within the static path) to use as favicon of the
168196
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32

documentation/developers.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ Developers
44
The following services are used for software quality assurance:
55

66
* The software repository is hosted on GitHub at https://github.com/sandialabs/pecos.
7+
* Bug reports and feature requests can be submitted to https://github.com/sandialabs/pecos/issues.
78
* Automated testing is run using GitHub Actions at https://github.com/sandialabs/pecos/actions.
89
* Test coverage statistics are collected using Coveralls at https://coveralls.io/github/sandialabs/pecos.
9-
* The current release is hosted on PyPI at https://pypi.python.org/pypi/pecos.
10+
* The current release is hosted on PyPI at https://pypi.python.org/pypi/pecos and conda-forge at https://anaconda.org/conda-forge/pecos.
1011

1112
Tests can be run locally using pytest::
1213

documentation/environment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: pecos
22
dependencies:
3-
- python=3.9
3+
- python=3.11
44
- numpy
55
- pandas
66
- pytz
-6.08 KB
Loading

documentation/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ Citing Pecos
3232
--------------
3333
To cite Pecos, use one of the following references:
3434

35-
* K.A. Klise and J.S. Stein (2016), Performance Monitoring using Pecos, Technical Report SAND2016-3583, Sandia National Laboratories, Albuquerque, NM.
36-
* K.A. Klise and J.S. Stein (2016), Automated Performance Monitoring for PV Systems using Pecos, 43rd IEEE Photovoltaic Specialists Conference (PVSC), Portland, OR, June 5-10. `pdf <http://www.pvsc-proceedings.org./download.php?year=2016&file=907>`_
35+
* K.A. Klise and J.S. Stein (2016), Performance Monitoring using Pecos, Technical Report SAND2016-3583, Sandia National Laboratories, Albuquerque, NM. :cite:p:`klise16a`
36+
* K.A. Klise and J.S. Stein (2016), Automated Performance Monitoring for PV Systems using Pecos, 43rd IEEE Photovoltaic Specialists Conference (PVSC), Portland, OR, June 5-10. :cite:p:`klise16b` `pdf <http://www.pvsc-proceedings.org./download.php?year=2016&file=907>`_
3737

3838
Contents
3939
------------

documentation/installation.rst

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Installation
22
======================================
33

4-
Pecos requires Python (tested on 3.8, 3.9, and 3.10) along with several Python
4+
Pecos requires Python (tested on 3.9, 3.10, 3.11, and 3.12) along with several Python
55
package dependencies. Information on installing and using Python can be found at
66
https://www.python.org/. Python distributions, such as Anaconda,
77
are recommended to manage the Python interface.
@@ -51,27 +51,27 @@ Dependencies
5151

5252
Required Python package dependencies include:
5353

54-
* Pandas [Mcki13]_: used to analyze and store time series data,
54+
* Pandas :cite:p:`pandas`: used to analyze and store time series data,
5555
http://pandas.pydata.org/
56-
* Numpy [VaCV11]_: used to support large, multi-dimensional arrays and matrices,
56+
* Numpy :cite:p:`numpy`: used to support large, multi-dimensional arrays and matrices,
5757
http://www.numpy.org/
58-
* Jinja [Rona08]_: used to generate HTML templates,
59-
http://jinja.pocoo.org/
60-
* Matplotlib [Hunt07]_: used to produce figures,
58+
* Jinja :cite:p:`jinja`: used to generate HTML templates,
59+
https://jinja.palletsprojects.com/
60+
* Matplotlib :cite:p:`matplotlib`: used to produce figures,
6161
http://matplotlib.org/
62-
* Setuptools: used to install the pecos package, https://setuptools.pypa.io/
62+
* Setuptools :cite:p:`setuptools`: used to install the pecos package, https://setuptools.pypa.io/
6363

6464
Optional Python packages dependencies include:
6565

66-
* minimalmodbus: used to collect data from a modbus device,
66+
* minimalmodbus :cite:p:`minimalmodbus`: used to collect data from a modbus device,
6767
https://minimalmodbus.readthedocs.io
68-
* sqlalchemy: used to insert data into a MySQL database,
68+
* sqlalchemy :cite:p:`sqlalchemy`: used to insert data into a MySQL database,
6969
https://www.sqlalchemy.org/
70-
* pyyaml: used to store configuration options in human readable data format,
70+
* pyyaml :cite:p:`pyyaml`: used to store configuration options in human readable data format,
7171
http://pyyaml.org/
72-
* PVLIB [SHFH16]_: used to simulate the performance of photovoltaic energy systems,
72+
* PVLIB :cite:p:`pvlib`: used to simulate the performance of photovoltaic energy systems,
7373
http://pvlib-python.readthedocs.io/
74-
* Plotly [SPHC16]_: used to produce interactive scalable figures,
74+
* Plotly :cite:p:`plotly`: used to produce interactive scalable figures,
7575
https://plot.ly/
7676

7777
All other dependencies are part of the Python Standard Library.

documentation/overview.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and generate reports which include performance metrics, test results, and graphi
99
The software can be customized for specific applications.
1010
Some high-level features include:
1111

12-
* Pecos uses Pandas DataFrames [Mcki13]_ to store and analyze time series data. This dependency
12+
* Pecos uses Pandas DataFrames :cite:p:`pandas` to store and analyze time series data. This dependency
1313
facilitates a wide range of analysis options and date-time functionality.
1414

1515
* Data column names can be easily reassigned to common names through the use of a

documentation/qc_tests.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ Custom streaming analysis can be run using the following example.
342342
The custom function below, ``nearest_neighbor``, determines if the current data point is within 3 standard
343343
deviations of data in a 10 minute history window.
344344
In this case, metadata returns the distance from each column in the current data point to its nearest neighbor in the history.
345-
This is similar to the multivariate nearest neighbor algorithm used in CANARY [HMKC07]_.
345+
This is similar to the multivariate nearest neighbor algorithm used in CANARY :cite:p:`canary`.
346346

347347
.. doctest::
348348
:hide:

documentation/reference.rst

+17-23
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
1-
References
2-
==============
3-
..
4-
Citations begins with 4 letters:
5-
one author: first 4 letters of name
6-
two authors: first 2 letters of author1, first 2 letters of author 2
7-
three authors: first 2 letters of author1, first letter of author 2, first letter of author 3
8-
four authors: first letter of each author
9-
more than four authors: first letter of first four authors
10-
11-
The next two digits are the year (century ignored)
12-
13-
If the 6 digits match another citation, add a lower case letter (a, b, ...)
1+
.. raw:: latex
142

15-
.. [HMKC07] Hart, D., McKenna, S.A., Klise, K., Cruz, V., & Wilson, M. (2007) Water quality event detection systems for drinking water contamination warning systems: Development testing and application of CANARY, World Environmental and Water Resources Congress (EWRI), Tampa, FL, May 15-19.
3+
\clearpage
164

17-
.. [Hunt07] Hunter, J.D. (2007). Matplotlib: A 2D graphics environment. Computing in Science & Engineering, 3(9), 90-95.
5+
.. only:: html
186

19-
.. [KlSt16a] Klise, K.A., Stein, J.S. (2016). Performance Monitoring using Pecos, Technical Report SAND2016-3583, Sandia National Laboratories.
7+
References
8+
==========
209

21-
.. [KlSt16b] Klise, K.A., Stein, J.S. (2016). Automated Performance Monitoring for PV Systems using Pecos, 43th Photovoltaic Specialists Conference (PVSC), Portland, OR, June 5-10.
10+
.. raw:: latex
2211

23-
.. [KlSC17] Klise, K.A., Stein, J.S., Cunningham, J. (2017). Application of IEC 61724 Standards to Analyze PV System Performance in Different Climates, 44th Photovoltaic Specialists Conference (PVSC), Washington, DC, June 25-30.
12+
\begingroup
13+
\def\section#1#2{}
14+
\def\chapter#1#2{}
15+
\begin{thebibliography}{1234}
2416

25-
.. [Mcki13] McKinney W. (2013). Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython. O'Reilly Media, 1 edition, 466P.
17+
.. raw:: html
2618

27-
.. [Rona08] Ronacher, A. (2008). Template Designer Documentation, http://jinja.pocoo.org/docs/dev/templates/ accessed July 1, 2016.
19+
<div>
2820

29-
.. [SHFH16] Stein, J.S., Holmgren, W.F., Forbess, J., & Hansen, C.W. (2016). PVLIB: Open Source Photovoltaic Performance Modeling Functions for Matlab and Python, 43rd Photovoltaic Specialists Conference (PVSC), Portland, OR, June 5-10.
21+
.. bibliography::
3022

31-
.. [SPHC16] Sievert, C., Parmer, C., Hocking, T., Chamberlain, S., Ram, K., Corvellec, M., and Despouy, P. (2016). plotly: Create interactive web graphics via Plotly’s JavaScript graphing library [Software].
3223

33-
.. [VaCV11] van der Walt, S., Colbert, S.C., & Varoquaux, G. (2011). The NumPy array: A structure for efficient numerical computation. Computing in Science & Engineering, 13, 22-30.
24+
.. raw:: latex
25+
26+
\end{thebibliography}
27+
\endgroup

documentation/references.bib

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
@techreport{klise16a,
2+
title={{Performance Monitoring using Pecos}},
3+
author={Klise, Katherine A and Stein, Joshua S},
4+
year={2016},
5+
number = {SAND2016-3583},
6+
institution={Sandia National Laboratories, Albuquerque, NM}
7+
}
8+
9+
@inproceedings{klise16b,
10+
title={{Automated performance monitoring for PV systems using Pecos}},
11+
author={Klise, Katherine A and Stein, Joshua S},
12+
booktitle={{2016 IEEE 43rd Photovoltaic Specialists Conference (PVSC)}},
13+
pages={3431--3435},
14+
year={2016},
15+
organization={IEEE}
16+
}
17+
18+
@inproceedings{klise17,
19+
title={{Application of IEC 61724 standards to analyze PV system performance in different climates}},
20+
author={Klise, Katherine A and Stein, Joshua S and Cunningham, Joseph},
21+
booktitle={{2017 IEEE 44th Photovoltaic Specialists Conference (PVSC)}},
22+
pages={3161--3166},
23+
year={2017},
24+
organization={IEEE}
25+
}
26+
27+
@techreport{wrf24,
28+
title={{Integration of High-Frequency Performance Data for Microbial and Chemical Compound Control in Potable Reuse Treatment Systems}},
29+
author={Pecson, Brian and Pisarenko, Aleks and Walker, Troy},
30+
year={2024},
31+
number = {Project #4954},
32+
institution={Water Research Foundation, Alexandria, VA}
33+
}
34+
35+
@inproceedings{canary,
36+
title={{CANARY: A water quality event detection algorithm development tool}},
37+
author={Hart, David and McKenna, Sean A and Klise, Katherine and Cruz, Victoria and Wilson, Mark},
38+
booktitle={{World Environmental and Water Resources Congress 2007: Restoring Our Natural Habitat}},
39+
pages={1--9},
40+
year={2007}
41+
}
42+
43+
@article{matplotlib,
44+
author={Hunter, John D},
45+
title={{Matplotlib: A 2D graphics environment}},
46+
journal={Computing in Science \& Engineering},
47+
volume={9},
48+
number={03},
49+
pages={90--95},
50+
year={2007},
51+
publisher={IEEE Computer Society}
52+
}
53+
54+
@inproceedings{pandas,
55+
author = {McKinney, Wes},
56+
title = {{Data structures for statistical computing in Python}},
57+
booktitle = {{Proceedings of the 9th Python in Science Conference}},
58+
pages = {56 - 61},
59+
year = {2010},
60+
editor = {St\'efan van der Walt and Jarrod Millman},
61+
}
62+
63+
@inproceedings{pvlib,
64+
author={Stein, Joshua S and Holmgren, William F and Forbess, Jessica and Hansen, Clifford W},
65+
title={{PVLIB: Open source photovoltaic performance modeling functions for Matlab and Python}},
66+
booktitle={{2016 IEEE 43rd Photovoltaic Specialists Conference (PVSC)}},
67+
pages={3425--3430},
68+
year={2016},
69+
organization={IEEE}
70+
}
71+
72+
@online{plotly,
73+
author = {Plotly Technologies Inc.},
74+
title = {{Collaborative data science}},
75+
publisher = {Plotly Technologies Inc.},
76+
address = {Montreal, QC},
77+
year = {2015},
78+
url = {https://plot.ly}
79+
}
80+
81+
@article{numpy,
82+
author = {Charles R. Harris and K. Jarrod Millman and St{\'{e}}fan J.
83+
van der Walt and Ralf Gommers and Pauli Virtanen and David
84+
Cournapeau and Eric Wieser and Julian Taylor and Sebastian
85+
Berg and Nathaniel J. Smith and Robert Kern and Matti Picus
86+
and Stephan Hoyer and Marten H. van Kerkwijk and Matthew
87+
Brett and Allan Haldane and Jaime Fern{\'{a}}ndez del
88+
R{\'{i}}o and Mark Wiebe and Pearu Peterson and Pierre
89+
G{\'{e}}rard-Marchant and Kevin Sheppard and Tyler Reddy and
90+
Warren Weckesser and Hameer Abbasi and Christoph Gohlke and
91+
Travis E. Oliphant},
92+
title = {{Array programming with NumPy}},
93+
year = {2020},
94+
month = sep,
95+
journal = {Nature},
96+
volume = {585},
97+
number = {7825},
98+
pages = {357--362},
99+
doi = {10.1038/s41586-020-2649-2},
100+
publisher = {Springer Science and Business Media {LLC}},
101+
}
102+
103+
@online{sqlalchemy,
104+
author = {Bayer, Michael},
105+
title = {{The Architecture of Open Source Applications (Volume 2) SQLAlchemy}},
106+
url = {https://aosabook.org/en/v2/sqlalchemy.html}
107+
}
108+
109+
@online{minimalmodbus,
110+
author = {Berg, Jonas and others},
111+
title = {{MinimalModbus}},
112+
url = {https://minimalmodbus.readthedocs.io/en/stable/authors.html}
113+
}
114+
115+
@online{pyyaml,
116+
author = {Simonov, Kirill and others},
117+
title = {PyYAML},
118+
url = {https://github.com/yaml/pyyaml/graphs/contributors}
119+
}
120+
121+
@online{jinja,
122+
author = {Ronacher, Armin and others},
123+
title = {Jinja},
124+
url = {https://github.com/pallets/jinja/graphs/contributors}
125+
}
126+
127+
@online{setuptools,
128+
author = {Eby, Phillip and Ippolito, Bob and others},
129+
title = {Setuptools},
130+
url = {https://setuptools.pypa.io/en/latest/history.html#credits}
131+
}

0 commit comments

Comments
 (0)