Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0 Release #448

Open
wants to merge 443 commits into
base: master
Choose a base branch
from
Open
Changes from 30 commits
Commits
Show all changes
443 commits
Select commit Hold shift + click to select a range
0881f46
statsmodels requirment
martin-springer Aug 21, 2024
a2f1b8a
clean up conftest imports
martin-springer Aug 21, 2024
141180f
update requirements to latest
martin-springer Aug 21, 2024
31f5d7c
downgrade scipy requirement
martin-springer Aug 21, 2024
47df017
increase pandas to 2.0.3
martin-springer Aug 21, 2024
08a5363
remove tables from requirements-min
martin-springer Aug 21, 2024
2665e6b
migrate filepath to importlib_resources
martin-springer Aug 21, 2024
cba2d16
upgrade scipy in requirements min
martin-springer Aug 21, 2024
ca8f776
update nbval
martin-springer Aug 21, 2024
213efe7
update setup.py classifiers
martin-springer Aug 21, 2024
54e7fc9
bump scipy in requirements min
martin-springer Aug 21, 2024
b7aea08
bump numpy in requirements min
martin-springer Aug 21, 2024
c21b6df
bump notebook-checks to python 3.12
martin-springer Aug 21, 2024
0151789
bump all requirements min
martin-springer Aug 21, 2024
d98b8bf
add joblib and threadpoolctl to requirements-min for scikit-learn
martin-springer Aug 21, 2024
a5f7b7e
update system availability notebook to work with new pandas
martin-springer Aug 21, 2024
755f18b
Update requirements with numpy 2 and pandas 2.2.2
mdeceglie Sep 6, 2024
c042985
Use pandas bug work around
mdeceglie Sep 6, 2024
5e94cdc
replace depricated fillna() method
mdeceglie Sep 6, 2024
f8c5363
Exclude python 3.9 with base requirements from pytest
mdeceglie Sep 6, 2024
9188488
Delete legacy notebook
mdeceglie Sep 10, 2024
2b4748f
update the nanoseconds pandas alias
mdeceglie Sep 10, 2024
ff5ee23
fix deprecations
mdeceglie Sep 11, 2024
df4e176
Fix mistake in filtering docstrings
mdeceglie Sep 11, 2024
0434744
fix deprecations
mdeceglie Sep 11, 2024
c1cacfc
update the nanoseconds pandas alias
mdeceglie Sep 10, 2024
3f3e93a
Delete legacy notebook
mdeceglie Sep 10, 2024
ab42b19
Call out aggregated filters in docstrings
mdeceglie Sep 11, 2024
9857ef9
Add allowed filter keys to TrendAnalysis docstring
mdeceglie Sep 11, 2024
7d3929d
pd deprecation fixes in filtering.py
martin-springer Sep 11, 2024
e7fa479
Fix deprecations
mdeceglie Sep 11, 2024
a60cfbe
Overhaul trend analysis notebook
mdeceglie Sep 11, 2024
8eb38c8
pd deprecation fixes in availability.py
martin-springer Sep 11, 2024
f2b7f9d
fix pd fillna downcasting warning
martin-springer Sep 11, 2024
2d2c7c4
exclude py 3.9 min requirements from tests
martin-springer Sep 11, 2024
2ae914e
pd deprecations in tests
martin-springer Sep 11, 2024
78ac2ba
update actions/upload-artifact to v4
martin-springer Sep 11, 2024
e3d51ea
update actions/upload-artifact to v4
martin-springer Sep 11, 2024
3aac61a
Merge branch 'add-new-python-versions-to-testing-matrix' of https://g…
martin-springer Sep 11, 2024
13d8d1b
revert deploy update
martin-springer Sep 11, 2024
3b1d6ad
remove leftover print statement
martin-springer Sep 11, 2024
97e5599
Update README.md
mdeceglie Sep 17, 2024
521cfaf
Docs overview page update
mdeceglie Sep 17, 2024
a256ee1
Deal with pandas future warnings
mdeceglie Sep 17, 2024
9a6546e
Notebook overhaul
mdeceglie Sep 17, 2024
cc8c100
Merge branch 'new_notebooks' of https://github.com/NREL/rdtools into …
mdeceglie Sep 17, 2024
3be8231
Update sphinx docs for notebooks
mdeceglie Sep 17, 2024
f1a9170
update nbval action
mdeceglie Sep 17, 2024
e2f4295
update example data url
mdeceglie Sep 20, 2024
ec6cc81
Update NSRDB notebook to use online file
mdeceglie Sep 20, 2024
34c1c1e
update minimum pandas version
mdeceglie Sep 20, 2024
397e513
update setup.py to agree with requirements-min.txt
mdeceglie Sep 20, 2024
7e66423
fix long lines
mdeceglie Sep 20, 2024
c849ca9
fix typo from last commit
mdeceglie Sep 20, 2024
7530443
add comma to nbval workflow
martin-springer Sep 25, 2024
66e6dad
update actions/upload-artifact@v4
martin-springer Sep 25, 2024
4e38389
revert requirements min
martin-springer Sep 25, 2024
cde4aa1
increase min statsmodel version
martin-springer Sep 25, 2024
30200ac
bump min matplotlib version
martin-springer Sep 25, 2024
7ef685b
bump min numpy version
martin-springer Sep 25, 2024
769f493
bump min scipy version
martin-springer Sep 25, 2024
9c0c72b
bump min h5py version
martin-springer Sep 25, 2024
7c06342
bump min scitkit-learn
martin-springer Sep 25, 2024
99077c0
bumping min statsmodels version further up
martin-springer Sep 25, 2024
80e59f2
bump min pandas further
martin-springer Sep 25, 2024
d534011
bump min pandas further
martin-springer Sep 25, 2024
57e5131
fix for pandas new ME alias to allow pandas<2
martin-springer Sep 25, 2024
ab2be45
update file url in notebooks
martin-springer Sep 25, 2024
9fd5163
limit nbval to nbval<=0.9.6
martin-springer Sep 25, 2024
4223d04
bump minimum pvlib requirement
martin-springer Oct 10, 2024
df11d0f
re-run notebooks
martin-springer Oct 10, 2024
88f8541
update versions in readthedocs
martin-springer Oct 10, 2024
7a17492
update documentation requirements
martin-springer Oct 10, 2024
b0a730d
add tz to test_hour_angle_filter (pvlib 0.11.1)
martin-springer Oct 10, 2024
69ef31b
fix hour_angle_filter test
martin-springer Oct 10, 2024
6615004
re-run notebooks on linux
martin-springer Oct 10, 2024
a39bb06
add date and time stamp to nbval sanitization rules
martin-springer Oct 11, 2024
5f9d474
update github actions
martin-springer Oct 11, 2024
e53ab5d
Merge branch 'aggregated_filters_for_trials' into add-new-python-vers…
martin-springer Oct 11, 2024
7636ad3
update changelog
martin-springer Oct 11, 2024
06eff91
bump min pvlib requirement in setup.py
martin-springer Oct 14, 2024
a92032c
update rollup_period docstrings in availability.py
martin-springer Oct 14, 2024
841cbec
Merge pull request #428 from NREL/add-new-python-versions-to-testing-…
mdeceglie Oct 14, 2024
665a524
Merge branch 'aggregated_filters_for_trials' into new_notebooks
mdeceglie Oct 14, 2024
bf53a17
Change version name in availability example
mdeceglie Oct 14, 2024
11639e6
remove experimental warning from availability
mdeceglie Oct 15, 2024
e4cfddf
remove availability is experimental warning from plotting module
mdeceglie Oct 15, 2024
97b2b1e
Remove extra line (style fix)
mdeceglie Oct 15, 2024
4b30122
add availability warning removal to change log
mdeceglie Oct 15, 2024
ad95657
Run and polish notebooks
mdeceglie Oct 15, 2024
a37ff1b
add ability to seed CircularBlockBootstrap
mdeceglie Oct 16, 2024
69e6798
add missing comma
mdeceglie Oct 16, 2024
892dd53
Run notebooks with bootstrap seed
mdeceglie Oct 16, 2024
09c215b
updated the xgboost model + removed experimental filter warnings
Oct 16, 2024
232fb55
change minimum version of arch to 5.0
mdeceglie Oct 16, 2024
66c3f1a
updated model to v1.6.0
Oct 16, 2024
b00d6ff
change approach to pandas future warning in CODS
mdeceglie Oct 16, 2024
a21b261
Merge branch 'aggregated_filters_for_trials' into xgboost-update
kperrynrel Oct 16, 2024
7672ff3
fixing up unit test to not look for experimental filtering warning
Oct 16, 2024
7f1e7da
Merge branch 'xgboost-update' of https://github.com/kperrynrel/rdtool…
Oct 16, 2024
3fa4fef
update min version of xgboost
mdeceglie Oct 16, 2024
a816d43
add to change log
mdeceglie Oct 16, 2024
a46b348
Merge pull request #431 from kperrynrel/xgboost-update
mdeceglie Oct 16, 2024
db3ccdd
Merge branch 'aggregated_filters_for_trials' into new_notebooks
mdeceglie Oct 16, 2024
2ddfed6
run notebooks
mdeceglie Oct 16, 2024
d6025f8
remove verbose cods output
mdeceglie Oct 16, 2024
e916cd3
Review changes
mdeceglie Oct 17, 2024
62ff1d9
Merge pull request #429 from NREL/new_notebooks
mdeceglie Oct 17, 2024
a4fa291
remove sub-daily check code
mdeceglie Oct 17, 2024
9a8a979
documentation minor fixes
mdeceglie Oct 17, 2024
ce0a810
Update contributors
mdeceglie Oct 17, 2024
fbaa49b
review changes
mdeceglie Oct 21, 2024
4c28f83
add closing backtick
mdeceglie Oct 21, 2024
16e23e6
roll back sphinx version
mdeceglie Oct 21, 2024
b5666e7
Doc updates
mdeceglie Oct 25, 2024
7cccb84
Remove scare quotes
mdeceglie Oct 25, 2024
6ca0fce
update changelog for beta release
mdeceglie Oct 28, 2024
b3927da
Merge pull request #390 from NREL/aggregated_filters_for_trials
mdeceglie Oct 29, 2024
edb8615
set lw to 0 in plotting.degradation_summary_plots
martin-springer Oct 30, 2024
6c8e04c
add CITATION.cff file
martin-springer Oct 30, 2024
ffb6150
add origin to resample
martin-springer Nov 6, 2024
54fa744
add checks to ta filter arguments
martin-springer Nov 6, 2024
fd635a0
update changelog
martin-springer Nov 6, 2024
0da2f0f
remove hour_angle filter from default list
martin-springer Nov 6, 2024
8affd0d
fix _aggregate starting timestamp
martin-springer Nov 20, 2024
9d6092f
Bump tornado from 6.3.3 to 6.4.2 in /docs
dependabot[bot] Nov 22, 2024
0c21b87
add warning when power_expected is passed to clearsky workflow
martin-springer Dec 2, 2024
6627f97
update changelog
martin-springer Dec 2, 2024
c90b587
correct PR number in changelog
martin-springer Dec 2, 2024
6ad3f64
update degradation_summary_plots label to f-strings
martin-springer Dec 2, 2024
173c47d
add pvlib clearsky filter test in analysis chain
martin-springer Dec 4, 2024
9f664c7
update changelog
martin-springer Dec 4, 2024
7f1d3c0
update default window length in pvlib_clearsky_filter docstring
martin-springer Dec 4, 2024
68d3fc4
fix ci interval
martin-springer Dec 4, 2024
9ae16c3
Merge pull request #440 from NREL/fix_issue_#235
mdeceglie Dec 10, 2024
569f276
implementation of initial suggestion
martin-springer Dec 11, 2024
6de4c43
add Quyen and remove version and date
martin-springer Dec 11, 2024
b342255
update reference in readme
martin-springer Dec 11, 2024
dccd412
add Noah
martin-springer Dec 11, 2024
10ce591
Merge branch 'development' into fix_issue_#313
martin-springer Dec 11, 2024
0052423
update logic filter
martin-springer Dec 11, 2024
1670fc6
introduce robust utility functions
martin-springer Dec 12, 2024
523ef28
fix downcasting warning
martin-springer Dec 12, 2024
690e777
add unit tests
martin-springer Dec 12, 2024
596f584
restrict scikit-learn < 1.6
martin-springer Dec 12, 2024
d02cf90
Merge branch 'development' into fix_issue_#305
martin-springer Dec 12, 2024
65c973c
re-run notebook
martin-springer Dec 12, 2024
a0d9ebc
Merge branch 'development' into fix_issue_#408
martin-springer Dec 12, 2024
d86787b
Merge branch 'development' into fix_issue_#313
martin-springer Dec 12, 2024
a34b967
Merge branch 'development' into fix_issue_#376
martin-springer Dec 12, 2024
461387d
Merge branch 'development' into fix_issue_#271
martin-springer Dec 12, 2024
b502be4
Merge branch 'development' into fix_issue_#370
martin-springer Dec 12, 2024
f9a1916
Merge branch 'development' into fix_issue_#377
martin-springer Dec 12, 2024
1e164c7
Merge branch 'development' into dependabot/pip/docs/tornado-6.4.2
martin-springer Dec 12, 2024
c565db0
update changelog
martin-springer Dec 12, 2024
85a68bb
another try
martin-springer Dec 12, 2024
834d10c
move changes to pending changlog
martin-springer Dec 18, 2024
8f327cb
re-run TrendAnalysis notebooks
martin-springer Dec 18, 2024
482d0c2
move changes to pending changlog
martin-springer Dec 18, 2024
6632de1
move changes to pending changelog
martin-springer Dec 18, 2024
a10dd60
move changes to pending changlog
martin-springer Dec 18, 2024
9430250
move changes to pending changelog 3
martin-springer Dec 18, 2024
b7d34f7
add unit tests for ValidatedFilterDict
martin-springer Dec 18, 2024
3295776
move changes to pending changlog
martin-springer Dec 18, 2024
dcbf652
move changes to pending changelog 3
martin-springer Dec 18, 2024
2fc733d
move changes to pending changelog 4
martin-springer Dec 18, 2024
58eab97
add test energy from power shifted data
martin-springer Dec 18, 2024
eb91970
move changes to pending changlog
martin-springer Dec 18, 2024
28f6d0d
move changes to pending changelog 3
martin-springer Dec 18, 2024
6857539
move changes to pending changelog 4
martin-springer Dec 18, 2024
6bb6953
move changes to pending changelog 5
martin-springer Dec 18, 2024
175dfe6
move changes to pending changlog
martin-springer Dec 18, 2024
3a6b90c
move changes to pending changelog 3
martin-springer Dec 18, 2024
e9ba905
move changes to pending changelog 4
martin-springer Dec 18, 2024
1abc00f
move changes to pending changelog 5
martin-springer Dec 18, 2024
57d56d5
move changes to pending changelog 6
martin-springer Dec 18, 2024
6041951
move changes to pending changlog
martin-springer Dec 18, 2024
3b7e8e6
move changes to pending changelog 3
martin-springer Dec 18, 2024
1158026
move changes to pending changelog 4
martin-springer Dec 18, 2024
1a2fb62
move changes to pending changelog 5
martin-springer Dec 18, 2024
54d85a5
move changes to pending changelog 6
martin-springer Dec 18, 2024
27a888b
move changes to pending changelog 7
martin-springer Dec 18, 2024
e1e4b52
move changes to pending changlog
martin-springer Dec 18, 2024
dc373e0
move changes to pending changelog 3
martin-springer Dec 18, 2024
05625eb
move changes to pending changelog 4
martin-springer Dec 18, 2024
0c0f19b
move changes to pending changelog 5
martin-springer Dec 18, 2024
11b76c6
move changes to pending changelog 6
martin-springer Dec 18, 2024
829a06f
move changes to pending changelog 7
martin-springer Dec 18, 2024
966a3f6
update code to utility function
martin-springer Dec 18, 2024
55cfae0
test_sensor_analysis_nans
martin-springer Dec 18, 2024
7f00aaf
update changelog
martin-springer Dec 18, 2024
43dffd4
change nbval workflow command?
martin-springer Dec 18, 2024
d569509
adjust tests to new frequency conventions and address some more downc…
martin-springer Dec 18, 2024
7dce7c2
delete left over line
martin-springer Dec 18, 2024
fb78f85
fix ME frequency issue for pandas < 2.2.0
martin-springer Dec 18, 2024
6f9aee1
use .iloc for integer indexing
martin-springer Dec 18, 2024
a4de214
use pd.NA for nullable bool series
martin-springer Dec 18, 2024
b2c2c2b
another try for nullable boolean series
martin-springer Dec 18, 2024
8ff3cba
update changelog
martin-springer Dec 18, 2024
d8d0741
Merge pull request #433 from NREL/fix_issue_#408
mdeceglie Dec 18, 2024
2201206
Merge branch 'development' into fix_issue_#305
mdeceglie Dec 18, 2024
34026ff
add :py:func: directive
mdeceglie Dec 18, 2024
a906da8
Merge pull request #446 from NREL/changelog_fix
mdeceglie Dec 18, 2024
c34bdef
Merge branch 'development' into fix_issue_#305
mdeceglie Dec 18, 2024
e39e4ab
make function callable in changelog
martin-springer Dec 18, 2024
ad2fe15
test valid and invalid filter parameters
martin-springer Dec 18, 2024
ec47839
Merge remote-tracking branch 'origin/development' into fix_issue_#377
martin-springer Dec 18, 2024
58b00e1
Merge pull request #434 from NREL/fix_issue_#305
mdeceglie Dec 18, 2024
2479e35
Merge branch 'development' into fix_issue_#377
mdeceglie Dec 18, 2024
b219a2b
Bump jinja2 from 3.0.0 to 3.1.5 in /docs
dependabot[bot] Dec 23, 2024
3721a4d
Merge pull request #436 from NREL/fix_issue_#377
mdeceglie Dec 30, 2024
9673def
Merge branch 'development' into fix_issue_#370
mdeceglie Dec 30, 2024
b376fc8
fix style error from merge
mdeceglie Dec 30, 2024
d6c40ac
lower case hourly frequency
martin-springer Dec 30, 2024
36ee5bb
Merge branch 'fix_issue_#370' of https://github.com/NREL/rdtools into…
martin-springer Dec 30, 2024
6904228
delete blank line
martin-springer Dec 30, 2024
f15210c
add missing blank line
martin-springer Dec 30, 2024
be85766
Merge branch 'development' into dependabot/pip/docs/tornado-6.4.2
mdeceglie Dec 30, 2024
4592eed
Merge pull request #437 from NREL/fix_issue_#370
mdeceglie Dec 30, 2024
595d07e
Merge branch 'development' into dependabot/pip/docs/tornado-6.4.2
mdeceglie Dec 30, 2024
da7737b
Merge pull request #438 from NREL/dependabot/pip/docs/tornado-6.4.2
mdeceglie Dec 30, 2024
9425d5d
Merge branch 'development' into fix_issue_#271
mdeceglie Dec 30, 2024
3f81913
update warning message
martin-springer Dec 30, 2024
eb05586
Merge pull request #439 from NREL/fix_issue_#271
mdeceglie Dec 30, 2024
a4a5330
Merge branch 'development' into fix_issue_#376
mdeceglie Dec 30, 2024
c59708a
Merge pull request #441 from NREL/fix_issue_#376
mdeceglie Dec 30, 2024
98bd5a6
Merge branch 'development' into fix_issue_#313
mdeceglie Dec 30, 2024
8707985
remove duplicate changelog entry
mdeceglie Dec 30, 2024
774d413
update docstring robust quantile
martin-springer Dec 30, 2024
5dca2ef
update docstring robust median
martin-springer Dec 30, 2024
2338d92
update docstring robust mean
martin-springer Dec 30, 2024
525d4a9
Merge branch 'development' into dependabot/pip/docs/jinja2-3.1.5
mdeceglie Dec 30, 2024
9903aaa
Merge pull request #442 from NREL/fix_issue_#313
mdeceglie Dec 30, 2024
09bd007
Merge branch 'development' into fix-pandas-deprecation-warnings-in-tests
mdeceglie Dec 30, 2024
29d3d21
Merge pull request #444 from NREL/fix-pandas-deprecation-warnings-in-…
mdeceglie Dec 30, 2024
5b627f4
Merge branch 'development' into dependabot/pip/docs/jinja2-3.1.5
mdeceglie Dec 30, 2024
c4cb8f6
update changelog
mdeceglie Dec 30, 2024
18e2854
Merge pull request #447 from NREL/dependabot/pip/docs/jinja2-3.1.5
mdeceglie Dec 30, 2024
a1413c1
update changelog for beta release
mdeceglie Dec 30, 2024
3cb8928
Consolidate and update change log for release
mdeceglie Jan 2, 2025
c0ac018
fix change log entry
mdeceglie Jan 8, 2025
29aa7de
add availability analysis to module imports
martin-springer Jan 8, 2025
958863e
minor updates to docs index.rst
mdeceglie Jan 16, 2025
dbe584d
Update docs/sphinx/source/index.rst
mdeceglie Jan 16, 2025
ef93813
Update rdtools/analysis_chains.py
mdeceglie Jan 16, 2025
475e36b
Update rdtools/bootstrap.py
mdeceglie Jan 16, 2025
69c61bf
Update docs/sphinx/source/changelog/v3.0.0.rst
mdeceglie Jan 16, 2025
fa3cf18
Update docs/sphinx/source/changelog/v3.0.0.rst
mdeceglie Jan 16, 2025
6f92119
Update analysis_chains.py
mdeceglie Jan 16, 2025
bd86075
Merge branch 'development' of https://github.com/NREL/rdtools into de…
mdeceglie Jan 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Deceglie"
given-names: "Michael G."
orcid: "https://orcid.org/0000-0001-7063-9676"
- family-names: "Anderson"
given-names: "Kevin"
- family-names: "Shinn"
given-names: "Adam"
- family-names: "Ambarish"
given-names: "Nag"
- family-names: "Mikofski"
given-names: "Mark"
orcid: "https://orcid.org/0000-0001-8001-8582"
- family-names: "Springer"
given-names: "Martin"
orcid: "https://orcid.org/0000-0001-6803-108X"
- family-names: "Yan"
given-names: "Jiyang"
- family-names: "Perry"
given-names: "Kirsten"
- family-names: "Villamar"
given-names: "Sandra"
- family-names: "Vining"
given-names: "Will"
- family-names: "Kimball"
given-names: "Gregory M."
orcid: "https://orcid.org/0000-0003-1075-1417"
- family-names: "Ruth"
given-names: "Daniel"
- family-names: "Moyer"
given-names: "Noah"
- family-names: "Nguyen"
given-names: "Quyen"
- family-names: "Jordan"
given-names: "Dirk"
orcid: "https://orcid.org/0000-0002-2183-7489"
- family-names: "Muller"
given-names: "Matthew"
- family-names: "Deline"
given-names: "Chris"
orcid: "https://orcid.org/0000-0002-9867-8930"
title: "RdTools"
doi: 10.5281/zenodo.1210316
url: "https://github.com/NREL/rdtools"
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ 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
tailor their own analyses. Current applications include the evaluation of PV
production over several years to obtain rates of performance degradation and
production over several years to obtain rates of performance degradation and
soiling loss. RdTools can handle both high frequency (hourly or better) or low
frequency (daily, weekly, etc.) datasets. Best results are obtained with higher
frequency data.
@@ -34,10 +34,10 @@ RdTools currently is tested on Python 3.9+.
To cite RdTools, please use the following along with the version number
and the specific DOI coresponding to that version from [Zenodo](https://doi.org/10.5281/zenodo.1210316):

- 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}, Computer Software,
- Michael G. Deceglie, Kevin Anderson, Adam Shinn, Ambarish Nag, Mark Mikofski,
Martin Springer, Jiyang Yan, Kirsten Perry, Sandra Villamar, Will Vining,
Gregory Kimball, Daniel Ruth, Noah Moyer, Quyen Nguyen, Dirk Jordan,
Matthew Muller, 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.
95 changes: 13 additions & 82 deletions docs/TrendAnalysis_example.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/TrendAnalysis_example_NSRDB.ipynb

Large diffs are not rendered by default.

177 changes: 14 additions & 163 deletions docs/degradation_and_soiling_example.ipynb

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/sphinx/source/changelog/pending.rst
Original file line number Diff line number Diff line change
@@ -17,4 +17,3 @@ Bug fixes
Requirements
------------
* Updated tornado==6.4.2 in ``notebook_requirements.txt`` (:pull:`438`)

89 changes: 85 additions & 4 deletions rdtools/analysis_chains.py
Original file line number Diff line number Diff line change
@@ -155,23 +155,80 @@ def __init__(
self.max_timedelta = max_timedelta
self.results = {}

# Initialize to use default filter parameters
self.filter_params = {
# Define valid filter parameters
self.valid_filter_params = [
"normalized_filter",
"poa_filter",
"tcell_filter",
"clip_filter",
"hour_angle_filter",
"clearsky_filter",
"sensor_clearsky_filter",
"ad_hoc_filter",
]

self.valid_filter_params_aggregated = [
"two_way_window_filter",
"insolation_filter",
"hampel_filter",
"directional_tukey_filter",
"ad_hoc_filter",
]

# Define default filter parameters
self.default_filter_params = {
"normalized_filter": {},
"poa_filter": {},
"tcell_filter": {},
"clip_filter": {},
"clearsky_filter": {},
"ad_hoc_filter": None, # use this to include an explict filter
}
self.filter_params_aggregated = {

self.default_filter_params_aggregated = {
"two_way_window_filter": {},
"ad_hoc_filter": None
"ad_hoc_filter": None,
}

# Initialize to use default filter parameters
self._filter_params = ValidatedFilterDict(
self.valid_filter_params, self.default_filter_params
)
self._filter_params_aggregated = ValidatedFilterDict(
self.valid_filter_params_aggregated, self.default_filter_params_aggregated
)
# remove tcell_filter from list if power_expected is passed in
if power_expected is not None and temperature_cell is None:
del self.filter_params["tcell_filter"]

@property
def filter_params(self):
return self._filter_params

@filter_params.setter
def filter_params(self, new_filter_params):
if not isinstance(new_filter_params, dict):
raise ValueError("Attribute `filter_params` must be a dictionary.")

# If dictionary passed, check the new filter_params and set new filters.
self._filter_params = ValidatedFilterDict(self.valid_filter_params, new_filter_params)
print(f"Attribute `filter_params` changed to: {new_filter_params}")

@property
def filter_params_aggregated(self):
return self._filter_params_aggregated

@filter_params_aggregated.setter
def filter_params_aggregated(self, new_filter_params_aggregated):
if not (isinstance(new_filter_params_aggregated, dict) or None):
raise ValueError("Attribute `filter_params_aggregated` must be a dictionary.")

# If dictionary passed, check the new filter_params and set new filters.
self._filter_params_aggregated = ValidatedFilterDict(
self.valid_filter_params_aggregated, new_filter_params_aggregated
)
print(f"Attribute `filter_params_aggregated` changed to: {new_filter_params_aggregated}")

def set_clearsky(
self,
pvlib_location=None,
@@ -1205,3 +1262,27 @@ def plot_degradation_timeseries(self, case, rolling_days=365, **kwargs):

fig = plotting.degradation_timeseries_plot(yoy_info, rolling_days, **kwargs)
return fig


class ValidatedFilterDict(dict):
def __init__(self, valid_keys, *args, **kwargs):
self.valid_keys = valid_keys
self._err_msg = "Key '{0}' is not a valid filter parameter."
super(ValidatedFilterDict, self).__init__(*args, **kwargs)
self._validate_keys()

def __setitem__(self, key, value):
if key not in self.valid_keys:
raise KeyError(self._err_msg.format(key))
super(ValidatedFilterDict, self).__setitem__(key, value)

def update(self, *args, **kwargs):
for key in dict(*args, **kwargs).keys():
if key not in self.valid_keys:
raise KeyError(self._err_msg.format(key))
super(ValidatedFilterDict, self).update(*args, **kwargs)

def _validate_keys(self):
for key in self.keys():
if key not in self.valid_keys:
raise KeyError(self._err_msg.format(key))
5 changes: 3 additions & 2 deletions rdtools/plotting.py
Original file line number Diff line number Diff line change
@@ -112,8 +112,9 @@ def degradation_summary_plots(yoy_rd, yoy_ci, yoy_info, normalized_yield,
colors = yoy_info['usage_of_points'].map({0: 'red', 1: 'green', 2: plot_color})
else:
colors = plot_color
ax1.scatter(renormalized_yield.index, renormalized_yield,
c=colors, alpha=scatter_alpha)
ax1.scatter(
renormalized_yield.index, renormalized_yield, c=colors, alpha=scatter_alpha, linewidths=0
)

ax1.plot(x, y, 'k--', linewidth=3)
ax1.set_xlabel('Date')
90 changes: 90 additions & 0 deletions rdtools/test/analysis_chains_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from rdtools import TrendAnalysis, normalization, filtering
from conftest import assert_isinstance, assert_warnings
from rdtools.analysis_chains import ValidatedFilterDict
import pytest
import pvlib
import pandas as pd
@@ -740,3 +741,92 @@ def test_plot_degradation_timeseries(sensor_analysis, clearsky_analysis):
assert_isinstance(
clearsky_analysis.plot_degradation_timeseries("clearsky"), plt.Figure
)


def test_validated_filter_dict_initialization():
valid_keys = ["key1", "key2"]
filter_dict = ValidatedFilterDict(valid_keys, key1="value1", key2="value2")
assert filter_dict["key1"] == "value1"
assert filter_dict["key2"] == "value2"


def test_validated_filter_dict_invalid_key_initialization():
valid_keys = ["key1", "key2"]
with pytest.raises(KeyError, match="Key 'key3' is not a valid filter parameter."):
ValidatedFilterDict(valid_keys, key1="value1", key3="value3")


def test_validated_filter_dict_setitem():
valid_keys = ["key1", "key2"]
filter_dict = ValidatedFilterDict(valid_keys)
filter_dict["key1"] = "value1"
assert filter_dict["key1"] == "value1"


def test_validated_filter_dict_setitem_invalid_key():
valid_keys = ["key1", "key2"]
filter_dict = ValidatedFilterDict(valid_keys)
with pytest.raises(KeyError, match="Key 'key3' is not a valid filter parameter."):
filter_dict["key3"] = "value3"


def test_validated_filter_dict_update():
valid_keys = ["key1", "key2"]
filter_dict = ValidatedFilterDict(valid_keys)
filter_dict.update({"key1": "value1", "key2": "value2"})
assert filter_dict["key1"] == "value1"
assert filter_dict["key2"] == "value2"


def test_validated_filter_dict_update_invalid_key():
valid_keys = ["key1", "key2"]
filter_dict = ValidatedFilterDict(valid_keys)
with pytest.raises(KeyError, match="Key 'key3' is not a valid filter parameter."):
filter_dict.update({"key1": "value1", "key3": "value3"})


@pytest.mark.parametrize(
"filter_param",
[
"normalized_filter",
"poa_filter",
"tcell_filter",
"clip_filter",
"hour_angle_filter",
"clearsky_filter",
"sensor_clearsky_filter",
"ad_hoc_filter",
],
)
def test_valid_filter_params(sensor_analysis, filter_param):
sensor_analysis.filter_params[filter_param] = {}
assert filter_param in sensor_analysis.filter_params


def test_invalid_filter_params(sensor_analysis, filter_param="invalid_filter"):
with pytest.raises(KeyError, match=f"Key '{filter_param}' is not a valid filter parameter."):
sensor_analysis.filter_params[filter_param] = {}


@pytest.mark.parametrize(
"filter_param_aggregated",
[
"two_way_window_filter",
"insolation_filter",
"hampel_filter",
"directional_tukey_filter",
"ad_hoc_filter",
],
)
def test_valid_filter_params_aggregated(sensor_analysis, filter_param_aggregated):
sensor_analysis.filter_params_aggregated[filter_param_aggregated] = {}
assert filter_param_aggregated in sensor_analysis.filter_params_aggregated


def test_invalid_filter_params_aggregated(
sensor_analysis, filter_param_aggregated="invalid_filter"
):
with pytest.raises(
KeyError, match=f"Key '{filter_param_aggregated}' is not a valid filter parameter."
):
sensor_analysis.filter_params_aggregated[filter_param_aggregated] = {}