Skip to content

Commit

Permalink
Merge branch 'aggregated_filters_for_trials' into dependabot/pip/pill…
Browse files Browse the repository at this point in the history
…ow-10.3.0
  • Loading branch information
mdeceglie committed Jul 5, 2024
2 parents 4a5e805 + ac3574f commit 2724c66
Show file tree
Hide file tree
Showing 45 changed files with 13,383 additions and 9,537 deletions.
6 changes: 6 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ignoring Paths
# --------------
# which folders/files to ignore
ignore:
- setup.py
- versioneer.py
7 changes: 7 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@
# see https://flake8.pycqa.org/en/latest/user/options.html

[flake8]
# E203 is not PEP8 compliant https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#slices
# Is excluded from flake8's own config https://flake8.pycqa.org/en/latest/user/configuration.html
extend-ignore = E203
max-line-length = 99
max-doc-length = 99
per-file-ignores =
# rdtools.x.y imported but unused
__init__.py:F401
# invalid escape sequence '\s'
versioneer.py:W605
exclude =
docs
.eggs
build
6 changes: 5 additions & 1 deletion .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,8 @@ jobs:
pip install --timeout=300 ${{ matrix.env }}
- name: Test with pytest ${{ matrix.env }}
run: |
pytest
python -m pytest --cov=./ --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ rdtools.egg-info*
.\#*

*.pickle

# ignore vscode settings
.vscode/
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<img src="./docs/sphinx/source/_images/logo_horizontal_highres.png" width="500" alt="RdTools logo"/>

Master branch:
[![Build Status](https://github.com/NREL/rdtools/workflows/pytest/badge.svg?branch=master)](https://github.com/NREL/rdtools/actions?query=branch%3Amaster)
Master branch:
[![Build Status](https://github.com/NREL/rdtools/workflows/pytest/badge.svg?branch=master)](https://github.com/NREL/rdtools/actions?query=branch%3Amaster)

Development branch:
Development branch:
[![Build Status](https://github.com/NREL/rdtools/workflows/pytest/badge.svg?branch=development)](https://github.com/NREL/rdtools/actions?query=branch%3Adevelopment)

Code coverage:
[![codecov](https://codecov.io/gh/NREL/rdtools/graph/badge.svg?token=K2HDjFkBws)](https://codecov.io/gh/NREL/rdtools)

RdTools is an open-source library to support reproducible technical analysis of
time series data from photovoltaic energy systems. The library aims to provide
best practice analysis routines along with the building blocks for users to
Expand Down Expand Up @@ -33,8 +36,8 @@ and the specific DOI coresponding to that version from [Zenodo](https://doi.org/

- Michael G. Deceglie, Ambarish Nag, Adam Shinn, Gregory Kimball,
Daniel Ruth, Dirk Jordan, Jiyang Yan, Kevin Anderson, Kirsten Perry,
Mark Mikofski, Matthew Muller, Will Vining, and Chris Deline
RdTools, version {insert version}, Compuer Software,
Mark Mikofski, Matthew Muller, Will Vining, and Chris Deline,
RdTools, version {insert version}, Computer Software,
https://github.com/NREL/rdtools. DOI:{insert DOI}

The underlying workflow of RdTools has been published in several places.
Expand All @@ -57,11 +60,11 @@ appropriate:
Detection Techniques in AC Power Time Series," 2021 IEEE 48th Photovoltaic
Specialists Conference (PVSC), pp. 1638-1643 2021, DOI: [10.1109/PVSC43889.2021.9518733](https://doi.org/10.1109/PVSC43889.2021.9518733).


## References
The clear sky temperature calculation, `clearsky_temperature.get_clearsky_tamb()`, uses data
from images created by Jesse Allen, NASA’s Earth Observatory using data courtesy of the MODIS Land Group.
https://neo.sci.gsfc.nasa.gov/view.php?datasetId=MOD_LSTD_CLIM_M
from images created by Jesse Allen, NASA’s Earth Observatory using data courtesy of the MODIS Land Group.
https://neo.sci.gsfc.nasa.gov/view.php?datasetId=MOD_LSTD_CLIM_M
https://neo.sci.gsfc.nasa.gov/view.php?datasetId=MOD_LSTN_CLIM_M

Other useful references which may also be consulted for degradation rate methodology include:
Expand Down
8,138 changes: 4,025 additions & 4,113 deletions docs/TrendAnalysis_example_pvdaq4.ipynb

Large diffs are not rendered by default.

937 changes: 937 additions & 0 deletions docs/cods_example.ipynb

Large diffs are not rendered by default.

8,315 changes: 4,075 additions & 4,240 deletions docs/degradation_and_soiling_example_pvdaq_4.ipynb

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions docs/notebook_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ decorator==4.3.0
defusedxml==0.7.1
entrypoints==0.2.3
html5lib==1.0.1
ipykernel==4.8.2
ipython==8.10.0
ipykernel==6.29.4
ipython==8.23.0
ipython-genutils==0.2.0
ipywidgets==7.3.0
jedi==0.16.0
Jinja2==3.0.0
Jinja2==3.1.3
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==6.1.7
jupyter-console==6.4.0
jupyter-core==4.11.2
jupyterlab-pygments==0.2.2
jupyter-client==8.6.1
jupyter-console==6.6.3
jupyter-core==5.7.2
jupyterlab-pygments==0.3.0
lxml==4.9.1
MarkupSafe==2.0.0
mistune==2.0.3
Expand All @@ -30,17 +30,17 @@ nbconvert==7.0.0
nbformat==5.1.0
nest-asyncio==1.5.5
notebook==6.4.12
numexpr==2.8.0
pandocfilters==1.4.2
numexpr==2.10.0
pandocfilters==1.5.1
parso==0.5.2
pexpect==4.6.0
pickleshare==0.7.5
prometheus-client==0.3.0
prompt-toolkit==3.0.30
prompt-toolkit==3.0.43
ptyprocess==0.6.0
pycparser==2.20
Pygments==2.15.0
pyzmq==22.2.1
pyzmq==26.0.2
qtconsole==4.3.1
Send2Trash==1.8.0
simplegeneric==0.8.1
Expand All @@ -49,7 +49,7 @@ terminado==0.8.3
testpath==0.3.1
tinycss2==1.1.1
tornado==6.3.3
traitlets==5.0.0
traitlets==5.14.3
wcwidth==0.1.7
webencodings==0.5.1
widgetsnbextension==3.3.0
29 changes: 21 additions & 8 deletions docs/sphinx/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Submodules
==========

RdTools is organized into submodules focused on different parts of the data
analysis workflow.
analysis workflow.

.. autosummary::
:toctree: generated/

analysis_chains
degradation
soiling
soiling
availability
filtering
normalization
Expand All @@ -41,8 +41,9 @@ Object-oriented end-to-end analysis
analysis_chains.TrendAnalysis.plot_soiling_interval
analysis_chains.TrendAnalysis.plot_soiling_monte_carlo
analysis_chains.TrendAnalysis.plot_pv_vs_irradiance


analysis_chains.TrendAnalysis.plot_degradation_timeseries


Degradation
===========

Expand Down Expand Up @@ -71,6 +72,10 @@ Soiling
annual_soiling_ratios
SRRAnalysis
SRRAnalysis.run
soiling_cods
CODSAnalysis
CODSAnalysis.iterative_signal_decomposition
CODSAnalysis.run_bootstrap


System Availability
Expand All @@ -81,7 +86,7 @@ System Availability

.. autosummary::
:toctree: generated/

AvailabilityAnalysis
AvailabilityAnalysis.run
AvailabilityAnalysis.plot
Expand All @@ -95,15 +100,22 @@ Filtering

.. autosummary::
:toctree: generated/

clip_filter
quantile_clip_filter
logic_clip_filter
xgboost_clip_filter
clearsky_filter
csi_filter
pvlib_clearsky_filter
poa_filter
tcell_filter
normalized_filter
two_way_window_filter
insolation_filter
hampel_filter
directional_tukey_filter
hour_angle_filter


Normalization
Expand All @@ -120,7 +132,6 @@ Normalization
irradiance_rescale
normalize_with_expected_power
normalize_with_pvwatts
normalize_with_sapm
pvwatts_dc_power
sapm_dc_power
delta_index
Expand Down Expand Up @@ -161,8 +172,10 @@ Plotting
:toctree: generated/

degradation_summary_plots
degradation_timeseries_plot
soiling_monte_carlo_plot
soiling_interval_plot
soiling_rate_histogram
availability_summary_plots
tune_filter_plot
tune_filter_plot

4 changes: 4 additions & 0 deletions docs/sphinx/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
RdTools Change Log
==================
.. include:: changelog/pending.rst
.. include:: changelog/v2.2.0-beta.2.rst
.. include:: changelog/v2.2.0-beta.1.rst
.. include:: changelog/v2.1.8.rst
.. include:: changelog/v2.1.7.rst
.. include:: changelog/v2.1.6.rst
.. include:: changelog/v2.1.5.rst
.. include:: changelog/v2.1.4.rst
.. include:: changelog/v2.2.0-beta.0.rst
.. include:: changelog/v2.1.3.rst
.. include:: changelog/v2.1.2.rst
.. include:: changelog/v2.1.1.rst
Expand Down
37 changes: 37 additions & 0 deletions docs/sphinx/source/changelog/pending.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
*******
pending
*******

Breaking changes
------------
These changes have the potential to change answers in existing scripts
when compared with older versions of RdTools

* Use the pvlib method for clear sky detection by default in :py:func:`~rdtools.analysis_chains.TrendAnalysis` (:pull:`412`)

Enhancements
------------
* Added a new wrapper function for clearsky filters (:pull:`412`)
* Improve test coverage, especially for the newly added filter capabilities (:pull:`413`)
* Added codecov.yml configuration file (:pull:`420`)

Bug fixes
---------
* Fix typos in citation section of the readme file (:issue:`414`, :pull:`421`)

Requirements
------------
* Specified versions in ``requirements.txt`` and ``docs/notebook_requirements.txt`` have been updated (:pull:`412`)
* Increase maximum version of pvlib to <0.12 (:pull:`423`)
* Update fonttools version to 4.43.0 in ``requirements.txt`` (:pull:`404`)
* Update jinja2 from 3.0.0 to 3.1.3 in ``notebook_requirements.txt`` (:pull:`405`)

Deprecations
------------
* Removed :py:func:`~rdtools.normalization.sapm_dc_power` (:pull:`419`)
* Removed :py:func:`~rdtools.normalization.normalize_with_sapm` (:pull:`419`)

Contributors
------------
* Martin Springer (:ghuser:`martin-springer`)
* Michael Deceglie (:ghuser:`mdeceglie`)
4 changes: 2 additions & 2 deletions docs/sphinx/source/changelog/v2.1.0.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
************************
***************************
v2.1.0 (September 17, 2021)
************************
***************************

API Changes
-----------
Expand Down
33 changes: 33 additions & 0 deletions docs/sphinx/source/changelog/v2.2.0-beta.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
**********************************
v2.2.0-beta.0 (September 14, 2022)
**********************************

Enhancements
------------
* Specifying ``detailed=True`` in :py:func:`rdtools.plotting.degradation_summary_plots`
now shows the number of year-on-year slopes in addition to color coding points
(:issue:`298`, :pull:`324`)
* The Combined estimation Of Degradation and Soiling (CODS) algorithm is implemented
in the soiling module and illustrated in an example notebook (:pull:`150`, :pull:`333`)
* Circular block bootstrapping added as a method for calculating uncertainty in
``degradation_year_on_year()`` via the ``Uncertainty_method`` argument (:pull:`150`)
* New plotting functions :py:func:`rdtools.analysis_chains.TrendAnalysis.plot_degradation_timeseries`
in TrendAnalysis object and :py:func:`rdtools.plotting.degradation_timeseries_plot`
to plot time series degradation trend. (:issue:`334`, :pull:`335`)

Testing
-------
* Added a CI notebook check (:pull:`270`)

Requirements
------------
* Upgrade the notebook environment from python 3.7 to python 3.10.
(:issue:`319`, :pull:`326`)
* Bump ``sphinx`` version from 3.2 to 4.5 and ``nbsphinx`` version
from 0.8.5 to 0.8.8 in the optional ``[doc]`` requirements (:pull:`317`, :pull:`325`)
* ``arch`` and ``filterpy`` added as dependencies (:pull:`150`)
* minimum version of ``numpy`` increased to 1.16 and minimum version of
statsmodels increased to 0.11.1 (:pull:`150`)
* A number of updates to the environments specified in ``requirements.txt``,
``requirements-min.txt``, and ``docs/notebook_requirements.txt``
(:pull:`326`, :pull:`314`, :pull:`337`)
7 changes: 7 additions & 0 deletions docs/sphinx/source/changelog/v2.2.0-beta.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
********************************
v2.2.0-beta.1 (December 7, 2022)
********************************

Enhancements
------------
* Added framework for running aggregated filters in ``analysis_chains.py`` (:pull:`348`)
23 changes: 23 additions & 0 deletions docs/sphinx/source/changelog/v2.2.0-beta.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
********************************
v2.2.0-beta.2 (December 1, 2023)
********************************

Enhancements
------------
* Return CODS results without bootstrapping when soiling signal
is small but raise warning ``soiling.py`` (:issue:`367` :pull:`400`)

Bug fixes
---------
* Fix flake8 missing whitespaces ``bootstrap_test.py``, ``soiling_cods_test.py`` (:pull:`400`)
* Specify dtype for seasonal samples ``soiling.py`` (:pull:`400`)
* Update deprecated `check_less_precise` to `rtol` ``soiling_cods_test.py`` (:pull:`400`)

Requirements
------------
* Bump arch to 5.6.0 in ``requirements.txt``

Contributors
------------
* Martin Springer (:ghuser:`martin-springer`)
* Michael Deceglie (:ghuser:`mdeceglie`)
1 change: 1 addition & 0 deletions docs/sphinx/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ This page shows example usage of the RdTools analysis functions.
examples/degradation_and_soiling_example_pvdaq_4
examples/TrendAnalysis_example_pvdaq4
examples/system_availability_example
examples/cods_example
3 changes: 3 additions & 0 deletions docs/sphinx/source/examples/cods_example.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "../../../cods_example.ipynb"
}
1 change: 0 additions & 1 deletion docs/sphinx/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,5 @@ Indices and tables


.. links and references
.. _release: https://github.com/NREL/rdtools/releases
.. _github: https://github.com/NREL/rdtools
Loading

0 comments on commit 2724c66

Please sign in to comment.