-
Notifications
You must be signed in to change notification settings - Fork 78
Multi yoy integration - combines PRs #456, #460 and #464 at once. #470
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
Open
cdeline
wants to merge
93
commits into
development
Choose a base branch
from
multi_YoY_integration
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
93 commits
Select commit
Hold shift + click to select a range
7c312ad
add keyword 'label' to degradation_timeseries_plot, enabling 'left' a…
cdeline d6a898e
Update changelog, add pytests, update sphinx documentation
cdeline df2effc
fix flake8 grumbles
cdeline 3099497
update pytests to include axes limits
cdeline 1d140e6
fix flake8 grumbles
cdeline 0548eab
add 'label' input option to `degradation_year_on_year`. Fixes #459
cdeline 9af5635
add pytests and update changelog.
cdeline 89ccbab
flake8 grumbles
cdeline b32211f
Minor updates to setup.py (constrain scipy<1.16) and refactor degrada…
cdeline 8ad5dac
Custom fix for Pandas < 2.0.0 which can't average two columns of time…
cdeline cf5ff77
flake8 grumbles
cdeline d59b5c7
Merge branch 'master' into 459_YoY_label
mdeceglie 4955fd8
Merge branch 'master' into 459_YoY_label
cdeline 233da68
Merge branch '459_YoY_label' of https://github.com/cdeline/rdtools in…
cdeline 125a5ff
Merge remote-tracking branch 'remotes/origin/master' into 455_degrada…
cdeline 1ff743e
keep TZ-aware timestamps. Update pytests to specifically test _avg_t…
cdeline bc86af6
flake8 grumbles
cdeline ae080fd
try to UTC localize the pytest...
cdeline e448560
Add .asfreq() to get pytests to agree
cdeline fd62ea5
switch to calendar.timegm to hopefully remove TZ issues..
cdeline 93f5a14
Merge branch '459_YoY_label' into integration_temp
cdeline dc83d52
regardless of uncertainty_method, return calc_info{'YoY_values')
cdeline c220fad
update _right dt labels to correct _left labels in degradation_year_o…
cdeline e8b6c9c
Merge branch '459_YoY_label' into 394_multi_YoY
cdeline 0464c25
update _avg_timestamp_old_Pandas to allow for numeric index instead o…
cdeline 644f4a8
add left label option to degradation_year_on_year
cdeline 0957ade
update degradation_year_on_year, index set to either left, center or …
cdeline c624a8c
update return for default = none uncertainty option
cdeline 3623edf
degradation_year_on_year - go back to single return when uncertainty_…
cdeline 00b5ce8
Merge branch '459_YoY_label' into 394_multi_YoY
cdeline 49aa300
add multi-year aggregation of slopes in degradation_year_on_year
cdeline 8cc7562
add multi_yoy kwarg in degradation_year_on_year to toggle the multi-Y…
cdeline 8a5c935
update plotting for detailed=True, allow usage_of_points > 2
cdeline 378221a
Merge branch '459_YoY_label' into 394_multi_YoY
cdeline 15babe2
flake8 grumbles
cdeline d6670b9
update plotting detailed=True for (even) and (odd) number of points …
cdeline 0b31d1e
Merge branch '459_YoY_label' into 394_multi_YoY
cdeline 13ac2c3
To allow multi_yoy=True in plotting.degradation_timeseries_plot, resa…
cdeline 84c3127
Merge remote-tracking branch 'remotes/origin/master' into 459_YoY_label
cdeline 4017424
Merge branch '459_YoY_label' into 394_multi_YoY
cdeline 0f53385
Merge branch 'master' into 455_degradation_timeseries
cdeline d1df3e3
Merge branch '455_degradation_timeseries' into integration_temp
cdeline 6708990
Merge branch '394_multi_YoY' into integration_temp
cdeline 5d76c7e
flake8 grumbles
cdeline de2ceee
Add warning to degradation_timeseries_plot when multi_YoY=True
cdeline 4566413
update to warning message in plotting.degradation_timeseries_plot
cdeline a317926
fix flake8 grumbles
cdeline 1646f16
nbval fixes from qnguyen345-bare_except_error
cdeline 963527b
Add pandas 3.0 futurewarning handling
cdeline 7435734
Try again to solve pandas3.0 futurewarning
cdeline 3810fd5
attempt 3 to fix nbval
cdeline fecbd2e
Add infer_objects to remove futurewarning
cdeline 9b8b893
Merge branch '459_YoY_label' into 394_multi_YoY
cdeline 4adc42e
minor inline comment update
cdeline 8451499
update plotting tests to be relative value, update ordering of module…
cdeline 67795f4
update inline comments and whatsnew docs
cdeline a0f4a1e
Clean up inline comments per Copilot review
cdeline 4393644
added multi-YoY pytest - still need to catch warnings
cdeline 728bb05
Add a warnings.catch_warnings to the plotting pytest
cdeline 3898940
flake8 grumbles
cdeline e28b1cf
add multi-YoY=True pytest
cdeline 49dd740
updated changelog
cdeline fd16332
Merge branch '459_YoY_label' into multi_YoY_integration
cdeline 1bb9804
Merge branch '455_degradation_timeseries' into multi_YoY_integration
cdeline 3817162
Merge remote-tracking branch 'origin/development' into multi_YoY_inte…
martin-springer 99a8b02
Merge remote-tracking branch 'origin/development' into multi_YoY_inte…
martin-springer aec14b7
update changelog
martin-springer aa6a7ff
implement copilot suggestions
martin-springer cd591c5
linting
martin-springer 6c5c624
use s instead of ns for pandas 3 compatibility
martin-springer 26e5893
update pandas version comparison
martin-springer dc2d092
set matplotlib non-gui backend for tests
martin-springer 640e03f
set dtype resolution based on pandas version
martin-springer 27d578f
linting import order
martin-springer 4e6a4b6
boost degradation.py test coverage
martin-springer 09bc1fd
update changelog
martin-springer 5280aaa
exclude coverage reports with suffixes
martin-springer 77d045c
Update rdtools/degradation.py
martin-springer 0fe8ebd
remove label=None handling, rely on default 'right' behavior
martin-springer c545a5c
refactor dt_center tz handling for old pandas
martin-springer b1953eb
Merge branch 'multi_YoY_integration' of https://github.com/NREL/rdtoo…
martin-springer 81b9b56
simplify _avg_timestamp_old_Pandas
martin-springer 0d73d2e
degradation_timeseries_plot: change rolling median min_periods to rol…
cdeline 3bd8c8d
remove degradation_timeseries_plot(label=) and just default to center…
cdeline c55c207
update sensor_analysis() and clearsky_analysis() docstrings to discus…
cdeline fb0da2b
flake8 updates
cdeline e531678
Initial commit - multi-YoY notebook
cdeline 098da41
pretty-print notebook dataframes with tabulate.
cdeline 6880c05
update notebook requirements to silence pandas warnings
martin-springer 4c14f79
add multi-yoy nb to tutorials
martin-springer 27fccf6
fix nblink path
martin-springer f6575eb
Change the yoy_values index to be named 'dt'. Add new illustrations …
cdeline 1ac4915
Merge branch 'multi_YoY_integration' of https://github.com/NREL/rdtoo…
cdeline File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| ************************* | ||
| v3.2.0 (X, X, 2026) | ||
| ************************* | ||
|
|
||
| Enhancements | ||
| ------------ | ||
| * :py:func:`~rdtools.degradation.degradation_year_on_year` has new parameter ``label=`` | ||
| to return the calc_info['YoY_values'] as either right labeled (default), left or | ||
| center labeled. (:issue:`459`) | ||
| * :py:func:`~rdtools.plotting.degradation_timeseries_plot` now defaults to rolling | ||
| median, centered on the timestamp (pd.rolling(center=True)). | ||
| (:issue:`455`) | ||
| * :py:func:`~rdtools.degradation.degradation_year_on_year` has new parameter ``multi_yoy`` | ||
| (default False) to trigger multiple YoY degradation calculations similar to Hugo Quest et | ||
| al 2023. In this mode, instead of a series of 1-year duration slopes, 2-year, 3-year etc | ||
| slopes are also included. calc_info['YoY_values'] returns a non-monotonic index | ||
| in this mode due to multiple overlapping annual slopes. (:issue:`394`) | ||
| * :py:func:`~rdtools.plotting.degradation_timeseries_plot` now supports ``multi_yoy=True`` | ||
| data by resampling overlapping YoY values to their mean. A warning is issued when this | ||
| resampling occurs. (:issue:`394`) | ||
| * :py:func:`~rdtools.plotting.degradation_summary_plots` ``detailed=True`` mode now | ||
| properly handles points used odd vs even number of times (not just 0, 1, 2). | ||
| (:issue:`394`) | ||
| * :py:func:`~rdtools.degradation.degradation_year_on_year` now returns | ||
| ``calc_info['YoY_times']`` DataFrame with ``dt_right``, ``dt_center``, and ``dt_left`` | ||
| columns for each YoY slope. (:issue:`459`) | ||
| * Added new example notebook ``docs/Multi-year_on_year_example.ipynb`` demonstrating the | ||
| ``label='center'`` and ``multi_yoy=True`` features of | ||
| :py:func:`~rdtools.degradation.degradation_year_on_year`. (:issue:`394`) | ||
|
|
||
| Bug Fixes | ||
| --------- | ||
| * Fixed ``usage_of_points`` calculation in :py:func:`~rdtools.degradation.degradation_year_on_year` | ||
| to properly handle ``multi_yoy=True`` mode with overlapping slopes. (:issue:`394`) | ||
|
|
||
|
|
||
| Maintenance | ||
| ----------- | ||
| * Added ``_avg_timestamp_old_Pandas`` helper function for pandas <2.0 compatibility | ||
| when calculating center labels. | ||
| * Fixed nbval workflow command syntax (``--sanitize-with`` to ``--nbval-sanitize-with``). | ||
| * Improved pandas 3.0 compatibility with datetime resolution handling. | ||
| * Updated ``docs/notebook_requirements.txt`` to require ``numexpr>=2.10.2`` and | ||
| ``tabulate>=0.9.0`` to satisfy pandas' optional dependency minimum versions and | ||
| avoid related warnings/errors. | ||
|
|
||
| Testing | ||
| ------- | ||
| * Added tests for error handling paths in :py:mod:`~rdtools.degradation`: | ||
| ``classical_decomposition`` missing/irregular data, ``year_on_year`` circular block | ||
| validation, no valid pairs error, and ``_mk_test`` edge cases (no trend, ties, | ||
| decreasing). | ||
| * Added test for ``multi_yoy=True`` parameter in ``degradation_year_on_year``. | ||
| * Set matplotlib backend to ``Agg`` in test ``conftest.py`` to avoid tkinter issues. | ||
|
|
||
|
|
||
| Contributors | ||
| ------------ | ||
| * Chris Deline (:ghuser:`cdeline`) | ||
| * Martin Springer (:ghuser:`martin-springer`) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
docs/sphinx/source/examples/Multi-year_on_year_example.nblink
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "path": "../../../Multi-year_on_year_example.ipynb" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.