Skip to content

Conversation

@cdeline
Copy link
Collaborator

@cdeline cdeline commented Jun 22, 2025

Adds a label = 'center' option to degradation_year_on_year such that YoY_values are returned center-labeled instead of right-labeled. Helps with implementing #394 and #455. Default is still currently right-labeled for the time being, although after discussion it sounds like center-labeled values make the most sense.

  • 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

Open issue: for degradation_year_on_year - should it return a tuple when uncertainty_method = None? This results in breaking tests (test_bootstrap_module, test_rescale, circular_block_bootstrap, soiling_cods)

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 Jun 22, 2025

Codecov Report

❌ Patch coverage is 92.15686% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.90%. Comparing base (416778c) to head (a0f4a1e).

Files with missing lines Patch % Lines
rdtools/degradation.py 95.65% 2 Missing ⚠️
rdtools/plotting.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development     #460      +/-   ##
===============================================
- Coverage        96.26%   95.90%   -0.37%     
===============================================
  Files               12       12              
  Lines             2276     2320      +44     
===============================================
+ Hits              2191     2225      +34     
- Misses              85       95      +10     

☔ 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 and others added 22 commits June 22, 2025 18:48
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>
@cdeline cdeline changed the base branch from master to development September 16, 2025 21:47
Copy link
Collaborator Author

@cdeline cdeline Sep 19, 2025

Choose a reason for hiding this comment

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

The change at the end of system_availability_example.ipynb was done to bypass a nbval notebook check error that was ignoring the semicolon to suppress printing the plot twice. Changed to plt.show() instead.

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 PR adds a label='center' option to the degradation_year_on_year function to return center-labeled YoY values instead of the default right-labeled values. This enhancement supports implementing issues #394 and #455 by providing more flexibility in how year-over-year degradation values are labeled.

Key changes include:

  • Added label parameter to degradation_year_on_year function with 'right', 'left', and 'center' options
  • Implemented center labeling logic with backward compatibility for older pandas versions
  • Updated plotting functions to handle different labeling scenarios
  • Added comprehensive test coverage for the new functionality

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
rdtools/degradation.py Core implementation of label parameter and center labeling logic
rdtools/test/degradation_test.py Added test cases for center labeling functionality
rdtools/plotting.py Updated color mapping and rolling window handling for multi-label scenarios
setup.py Removed nbval version constraint
docs/ Updated notebook outputs and changelog documentation

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.

3 participants