Skip to content

Conversation

@cdeline
Copy link
Collaborator

@cdeline cdeline commented May 28, 2025

This enhancement fixes #455. Adds an input parameter 'label' to have the degradation timeseries plot either right-labeled (current default) or center or left-labeled. This is the first PR of three that is required to enable multi-Year-on-Year degradation analysis and plotting.

  • Code changes are covered by tests
  • Code changes have been evaluated for compatibility/integration with TrendAnalysis
    New functions added to __init__.py
  • API.rst is up to date, along with other sphinx docs pages
    Example notebooks are rerun and differences in results scrutinized
  • Updated changelog

mdeceglie and others added 7 commits January 22, 2025 17:42
Bumps [notebook](https://github.com/jupyter/notebook) from 7.2.1 to 7.2.2.
- [Release notes](https://github.com/jupyter/notebook/releases)
- [Changelog](https://github.com/jupyter/notebook/blob/@jupyter-notebook/tree@7.2.2/CHANGELOG.md)
- [Commits](https://github.com/jupyter/notebook/compare/@jupyter-notebook/tree@7.2.1...@jupyter-notebook/tree@7.2.2)

---
updated-dependencies:
- dependency-name: notebook
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.4.2 to 6.5.1.
- [Changelog](https://github.com/tornadoweb/tornado/blob/master/docs/releases.rst)
- [Commits](tornadoweb/tornado@v6.4.2...v6.5.1)

---
updated-dependencies:
- dependency-name: tornado
  dependency-version: 6.5.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@codecov-commenter
Copy link

codecov-commenter commented May 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.33%. Comparing base (416778c) to head (8451499).

Additional details and impacted files
@@               Coverage Diff               @@
##           development     #456      +/-   ##
===============================================
+ Coverage        96.26%   96.33%   +0.06%     
===============================================
  Files               12       12              
  Lines             2276     2290      +14     
===============================================
+ Hits              2191     2206      +15     
+ Misses              85       84       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cdeline
Copy link
Collaborator Author

cdeline commented Jun 18, 2025

Outcome of our 6/17/25 PV Fleet meeting to review this PR: Yes, it seems that the default behavior is not ideal, given the 2-year gap from timeseries data start to time-dependent degradation rate. Best approach would be to use a timestamp in the center of the YoY slope, and use a window centered on the datapoint. If necessary, pad the dataframe with NaN's to account for the beginning of the time series that might not have enough points in the window. Possible other functions to investigate: scipy.ndimage.median_filter or np.convolve

cdeline and others added 19 commits June 18, 2025 14:06
statsmodels 0.14.4 is not able to handle the latest scipy.
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](pallets/jinja@3.1.5...3.1.6)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-version: 3.1.6
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [requests](https://github.com/psf/requests) from 2.32.3 to 2.32.4.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.32.3...v2.32.4)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.32.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.2.2 to 2.5.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.2.2...2.5.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.5.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
remove scipy restrictions in setup.py now that statsmodels has a new release.
@cdeline cdeline changed the base branch from master to development September 16, 2025 21:46
@cdeline cdeline requested a review from Copilot September 19, 2025 19:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This enhancement adds a label parameter to the degradation_timeseries_plot function, allowing users to control how the time series data is labeled on the plot. The change enables left, center, or right labeling options instead of only the previous default right labeling behavior.

  • Adds label parameter with 'right', 'center', and 'left' options to control plot labeling
  • Updates documentation and changelog to reflect the new functionality
  • Adds comprehensive test coverage for the new parameter options

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
rdtools/plotting.py Implements the new label parameter with validation and offset calculations for different labeling positions
rdtools/test/plotting_test.py Adds test cases covering all label options and error conditions
docs/sphinx/source/changelog/pending.rst Documents the enhancement in the pending changelog
docs/sphinx/source/changelog.rst Includes the pending changelog in the main changelog
docs/sphinx/source/changelog/v3.0.1.rst Adds version 3.0.1 changelog entry
docs/notebook_requirements.txt Updates dependency versions (Jinja2, tornado, notebook)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

degradation_timeseries_plot should have different label= options

3 participants