Skip to content

Release 3.2.1#497

Merged
martin-springer merged 49 commits into
masterfrom
release_321
Jul 8, 2026
Merged

Release 3.2.1#497
martin-springer merged 49 commits into
masterfrom
release_321

Conversation

@martin-springer

Copy link
Copy Markdown
Collaborator

Maintenance

  • Migrated to pyproject.toml: Replaced setup.py/setup.cfg with pyproject.toml using setuptools as the build backend. (Domain change updates #488)
  • Switched to setuptools-scm: Replaced versioneer with setuptools-scm for automatic version management from git tags. Removed legacy files: setup.py, setup.cfg, versioneer.py, MANIFEST.in, and rdtools/_version.py. (Domain change updates #488)
  • Updated __init__.py: Now uses importlib.metadata for version retrieval instead of versioneer. (Domain change updates #488)
  • Updated GitHub URLs: Migrated references from NREL/rdtools to NatLabRockies/rdtools and email addresses from @nrel.gov to @nlr.gov. (Change NREL to NLR #492)
  • Adopted pixi: Introduced pixi for reproducible environment management, replacing requirements.txt, requirements-min.txt, and docs/notebook_requirements.txt with pixi environments and a lockfile. (Change NREL to NLR #492)
  • Rewrote CI workflows: Updated pytest.yaml and nbval.yaml to use pixi via prefix-dev/setup-pixi; removed the requirements.yaml workflow. (Change NREL to NLR #492)
  • Bumped minimum arch version from 5.0 to 5.6. (Change NREL to NLR #492)
  • Added Python 3.14 to the test matrix and package classifiers. (Change NREL to NLR #492)
  • Simplified pixi environments: core (bare), default (notebooks), dev (notebooks + test, alias for dev-py313), dev-py310dev-py314 (full dev per Python version), and dev-min (minimum dependency versions). All shared environments pin Python 3.13. (Change NREL to NLR #492)
  • Added composable pip extras: [notebooks], [test], [dev], [doc], and [all]. (Change NREL to NLR #492)
  • Updated documentation: README, Sphinx index, developer notes, and example notebook setup cells updated for pixi and pip extras. (Change NREL to NLR #492)

Bug Fixes

Requirements

Checklist

  • 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

cdeline and others added 21 commits March 5, 2026 11:00
* add keyword 'label' to degradation_timeseries_plot, enabling 'left' and 'center' labeling options.

* Update changelog, add pytests, update sphinx documentation

* fix flake8 grumbles

* update pytests to include axes limits

* fix flake8 grumbles

* add 'label' input option to `degradation_year_on_year`. Fixes #459

* add pytests and update changelog.

* flake8 grumbles

* Minor updates to setup.py (constrain scipy<1.16) and refactor degradation_test

* Custom fix for Pandas < 2.0.0 which can't average two columns of timestamps.

* flake8 grumbles

* keep TZ-aware timestamps.  Update pytests to specifically test _avg_timestamp_old_Pandas

* flake8 grumbles

* try to UTC localize the pytest...

* Add .asfreq() to get pytests to agree

* switch to calendar.timegm to hopefully remove TZ issues..

* regardless of uncertainty_method, return calc_info{'YoY_values')

* update _right dt labels to correct _left labels in degradation_year_on_year

* update _avg_timestamp_old_Pandas to allow for numeric index instead of timestamp

* add left label option to degradation_year_on_year

* update degradation_year_on_year, index set to either left, center or right. Consistent with #394 - multi_yoy

* update return for default = none uncertainty option

* degradation_year_on_year - go back to single return when uncertainty_value = None to avoid breaking pytests.

* add multi-year aggregation of slopes in degradation_year_on_year

* add multi_yoy kwarg in degradation_year_on_year to toggle the multi-YoY function.

* update plotting for detailed=True, allow usage_of_points > 2

* flake8 grumbles

* update plotting detailed=True for  (even) and (odd) number of points coloring

* To allow multi_yoy=True in plotting.degradation_timeseries_plot, resample.mean() the YoY_values.

* flake8 grumbles

* Add warning to degradation_timeseries_plot when multi_YoY=True

* update to warning message in plotting.degradation_timeseries_plot

* fix flake8 grumbles

* nbval fixes from qnguyen345-bare_except_error

* Add pandas 3.0 futurewarning handling

* Try again to solve pandas3.0 futurewarning

* attempt 3 to fix nbval

* Add infer_objects to remove futurewarning

* minor inline comment update

* update plotting tests to be relative value, update ordering of module import in plotting.py, per Copilot review.

* update inline comments and whatsnew docs

* Clean up inline comments per Copilot review

* added multi-YoY pytest - still need to catch warnings

* Add a warnings.catch_warnings to the plotting pytest

* flake8 grumbles

* add multi-YoY=True pytest

* updated changelog

* update changelog

* implement copilot suggestions

* linting

* use s instead of ns for pandas 3 compatibility

* update pandas version comparison

* set matplotlib non-gui backend for tests

* set dtype resolution based on pandas version

* linting import order

* boost degradation.py test coverage

* update changelog

* exclude coverage reports with suffixes

* Update rdtools/degradation.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove label=None handling, rely on default 'right' behavior

* refactor dt_center  tz handling for old pandas

* simplify _avg_timestamp_old_Pandas

* degradation_timeseries_plot: change rolling median min_periods to rolling_days / 4.

* remove degradation_timeseries_plot(label=) and just default to center=True

* update sensor_analysis() and clearsky_analysis() docstrings to discuss passing `label=right` kwargs

* flake8 updates

* Initial commit - multi-YoY notebook

* pretty-print notebook dataframes with tabulate.

* update notebook requirements to silence pandas warnings

* add multi-yoy nb to tutorials

* fix nblink path

* Change the yoy_values index to be named 'dt'.  Add new illustrations at the end of the multi-YoY notebook.

---------

Co-authored-by: Michael Deceglie <mdeceglie@users.noreply.github.com>
Co-authored-by: martin-springer <martinspringer.ms@gmail.com>
Co-authored-by: Martin Springer <97482055+martin-springer@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* add keyword 'label' to degradation_timeseries_plot, enabling 'left' and 'center' labeling options.

* Update changelog, add pytests, update sphinx documentation

* fix flake8 grumbles

* update pytests to include axes limits

* fix flake8 grumbles

* add 'label' input option to `degradation_year_on_year`. Fixes #459

* add pytests and update changelog.

* flake8 grumbles

* Minor updates to setup.py (constrain scipy<1.16) and refactor degradation_test

* Custom fix for Pandas < 2.0.0 which can't average two columns of timestamps.

* flake8 grumbles

* keep TZ-aware timestamps.  Update pytests to specifically test _avg_timestamp_old_Pandas

* flake8 grumbles

* try to UTC localize the pytest...

* Add .asfreq() to get pytests to agree

* switch to calendar.timegm to hopefully remove TZ issues..

* regardless of uncertainty_method, return calc_info{'YoY_values')

* update _right dt labels to correct _left labels in degradation_year_on_year

* update _avg_timestamp_old_Pandas to allow for numeric index instead of timestamp

* add left label option to degradation_year_on_year

* update degradation_year_on_year, index set to either left, center or right. Consistent with #394 - multi_yoy

* update return for default = none uncertainty option

* degradation_year_on_year - go back to single return when uncertainty_value = None to avoid breaking pytests.

* add multi-year aggregation of slopes in degradation_year_on_year

* add multi_yoy kwarg in degradation_year_on_year to toggle the multi-YoY function.

* update plotting for detailed=True, allow usage_of_points > 2

* flake8 grumbles

* update plotting detailed=True for  (even) and (odd) number of points coloring

* To allow multi_yoy=True in plotting.degradation_timeseries_plot, resample.mean() the YoY_values.

* flake8 grumbles

* Add warning to degradation_timeseries_plot when multi_YoY=True

* update to warning message in plotting.degradation_timeseries_plot

* fix flake8 grumbles

* nbval fixes from qnguyen345-bare_except_error

* Add pandas 3.0 futurewarning handling

* Try again to solve pandas3.0 futurewarning

* attempt 3 to fix nbval

* Add infer_objects to remove futurewarning

* minor inline comment update

* update plotting tests to be relative value, update ordering of module import in plotting.py, per Copilot review.

* update inline comments and whatsnew docs

* Clean up inline comments per Copilot review

* added multi-YoY pytest - still need to catch warnings

* Add a warnings.catch_warnings to the plotting pytest

* flake8 grumbles

* add multi-YoY=True pytest

* updated changelog

* update changelog

* implement copilot suggestions

* linting

* use s instead of ns for pandas 3 compatibility

* update pandas version comparison

* set matplotlib non-gui backend for tests

* set dtype resolution based on pandas version

* linting import order

* boost degradation.py test coverage

* add tests for error handling in analysis_chain

* update changelog

* update changelog

* exclude coverage reports with suffixes

* Update rdtools/degradation.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove label=None handling, rely on default 'right' behavior

* refactor dt_center  tz handling for old pandas

* simplify _avg_timestamp_old_Pandas

* degradation_timeseries_plot: change rolling median min_periods to rolling_days / 4.

* remove degradation_timeseries_plot(label=) and just default to center=True

* update sensor_analysis() and clearsky_analysis() docstrings to discuss passing `label=right` kwargs

* flake8 updates

* Initial commit - multi-YoY notebook

* pretty-print notebook dataframes with tabulate.

* update notebook requirements to silence pandas warnings

* add multi-yoy nb to tutorials

* fix nblink path

* Change the yoy_values index to be named 'dt'.  Add new illustrations at the end of the multi-YoY notebook.

* clean up pending changelog

---------

Co-authored-by: cdeline <chris.deline@nrel.gov>
Co-authored-by: Michael Deceglie <mdeceglie@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…lti-YoY detection (#490)

* Initial plan

* Replace broad except ValueError with explicit duplicate-index check in degradation_timeseries_plot

Co-authored-by: cdeline <23244088+cdeline@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: cdeline <23244088+cdeline@users.noreply.github.com>
* initial pyproject.toml implementation

* changelog
* initial pyproject.toml implementation

* changelog

* update URLs

* change NREL to NLR

* linting

* changelog

* update PVDAQ citation in notebooks
* initial pixi implementation

* add note on how to re-run notebooks with pixi

* pixi version compatibility

* update pixi lock file

* pixi updates

* add libomp as requirement for macOS users

* use correct package name

* convert notebooks to html without re-running

* re-run notbooks to account for updated warning message formatting

* Revert "re-run notbooks to account for updated warning message formatting"

This reverts commit 7be2426.
@martin-springer martin-springer changed the title Release 321 Release 3.2.1 Mar 20, 2026
@codecov-commenter

codecov-commenter commented Mar 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.88%. Comparing base (5fe5e7e) to head (b1f0b10).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
rdtools/__init__.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #497      +/-   ##
==========================================
+ Coverage   96.70%   96.88%   +0.17%     
==========================================
  Files          12       12              
  Lines        2339     2342       +3     
==========================================
+ Hits         2262     2269       +7     
+ Misses         77       73       -4     

☔ View full report in Codecov by Harness.
📢 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.

martin-springer and others added 11 commits March 20, 2026 16:09
* updated degradation_timeseries_plot as version2 for now

* fix flake8 grumbles

* avoid pandas error "ValueError: Other Series must have a name"

* Redo degradation_timeseries_plot - include in median if dt_center is within rolling window.

* remove label= functionality. Update Multi-year_on_year_example.ipynb

* Re-run Multi-year_on_year_example.ipynb, check for text changes.

* update analysis_chains to remove `label=`. Update whatsnew

* simplify multi-YoY timeseries plotting by filtering to slopes <= 2 years, removing warning.

* update whatsnew

* code cleanup

* Revision of degradation_timeseries_plot

* Bug fixes

* Update notebooks to include `center=True`

* Update nbval to include new notebook

* add new kwarg to TrendAnalysis.plot_degradation_timeseries

* Update plotting.py timeseries plot docstring.  Also set pd.rolling(min_periods=rolling_days//4)

* fix copilot documentation review recommendations; add plotting pytests

* add min_periods_divisor argument

* update pvdaq_system_4 url (#513)

* update pvdaq_system_4 url

* changelog

* revert unnecessary changes in notebooks

* update changelog

* re-run notebooks

---------

Co-authored-by: Michael Deceglie <Michael.Deceglie@nrel.gov>
Co-authored-by: martin-springer <martin.springer@nrel.gov>
Co-authored-by: Martin Springer <97482055+martin-springer@users.noreply.github.com>
@martin-springer martin-springer changed the base branch from development to master July 1, 2026 20:25
martin-springer and others added 7 commits July 1, 2026 17:06
Changelog v3.2.1.rst:
- Correct PR references: :pull:`488` -> :pull:`491` for the
  pyproject migration; :pull:`492` -> :pull:`493` for pixi
  adoption and related entries (NREL->NLR entry kept at #492);
  :pull:`494` -> :pull:`497` for the filterpy replacement
  (landed as direct commits on release_321).
- Remove duplicated arch/xgboost/pvlib minimum-version bumps
  already documented in v3.1.1.rst.

Documentation:
- Remove duplicate git clone line in developer_notes.rst.
- Remove duplicate sentence in index.rst.
- Revert historical rewrite `NLR's` -> `NREL's` South Table
  Mountain campus in v2.0.0.rst (STM is NREL's campus and v2.0.0
  predates the NLR migration).

Example notebooks:
- `pixi run -e notebooks lab` -> `pixi run lab` in all five
  example notebooks; there is no `notebooks` environment defined
  in pyproject.toml (only a `notebooks` feature, which the
  default environment already includes).

Repository hygiene:
- Remove committed developer-local `.pixi.lnk` Windows shortcut.
- Add `*.lnk` to `.gitignore` to prevent future accidental
  commits of machine-specific shortcut files.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 prepares the 3.2.1 maintenance release by modernizing Python packaging/versioning, switching environment management and CI to pixi, updating repository/contact URLs to the new GitHub org, and refreshing documentation/notebooks accordingly.

Changes:

  • Migrates packaging to pyproject.toml + setuptools and switches versioning to setuptools-scm (removing legacy setup/versioneer files).
  • Adopts pixi for reproducible environments and rewrites CI workflows to use prefix-dev/setup-pixi, including a dependency consistency check task.
  • Updates URLs/emails, documentation, and example notebooks (including Python version expectations), and replaces filterpy usage in soiling with bayesian-filters.

Reviewed changes

Copilot reviewed 28 out of 33 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
versioneer.py Removed legacy versioneer implementation.
setup.py Removed legacy setuptools entrypoint in favor of pyproject.toml.
setup.cfg Removed versioneer and pytest configuration previously stored here.
MANIFEST.in Removed legacy sdist manifest used by setup/versioneer.
rdtools/_version.py Removed versioneer-generated version module.
rdtools/__init__.py Switches version retrieval to importlib.metadata with fallback.
pyproject.toml Introduces PEP 621 metadata, setuptools-scm config, pixi environments/features/tasks, dependencies/extras.
scripts/check_dependencies.py Adds script to validate min-version pins vs declared lower bounds.
requirements.txt Removed pinned requirements in favor of pixi/env definitions.
requirements-min.txt Removed min requirements file; replaced by pixi min feature pins.
docs/notebook_requirements.txt Removed notebook requirements list; replaced by pixi + extras.
README.md Updates badges/URLs and documents extras + pixi-based workflows.
CODE_OF_CONDUCT.md Updates contact email domain.
CITATION.cff Updates repository URL to new GitHub org.
.gitignore Adds ignores for pixi env dir and coverage.xml.
rdtools/soiling.py Switches Kalman filter imports and updates issue links to new org.
rdtools/test/soiling_test.py Updates issue link in docstring to new org.
rdtools/test/filtering_test.py Updates location/org name in test comment.
docs/sphinx/source/conf.py Updates extlinks and source URL base to new GitHub org.
docs/sphinx/source/index.rst Updates install guidance, notebook env guidance, URLs, and text cleanup.
docs/sphinx/source/developer_notes.rst Rewrites contributor setup docs around pixi and pip extras.
docs/sphinx/source/changelog/v3.2.1.rst Adds 3.2.1 release notes entry.
docs/sphinx/source/changelog.rst Includes the new v3.2.1 changelog page.
docs/sphinx/source/changelog/v2.0.0.rst Minor whitespace/tidy changes.
docs/TrendAnalysis_example.ipynb Updates setup instructions to pixi/extras; refreshes intro text/citations.
docs/TrendAnalysis_example_NSRDB.ipynb Updates setup instructions to pixi/extras; refreshes intro text/citations.
docs/system_availability_example.ipynb Updates setup instructions to pixi/extras.
docs/Multi-year_on_year_example.ipynb Updates setup instructions to pixi/extras; adds dataset citation.
.github/workflows/requirements.yaml Removes legacy requirements validation workflow.
.github/workflows/pytest.yaml Rewrites CI to use pixi env matrix, adds lock/deps validation, updates python matrix.
.github/workflows/nbval.yaml Rewrites notebook validation workflow to run under pixi.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/pytest.yaml Outdated
Comment thread docs/sphinx/source/index.rst Outdated
Comment thread docs/sphinx/source/index.rst Outdated
Comment thread docs/TrendAnalysis_example.ipynb Outdated
Comment thread docs/TrendAnalysis_example_NSRDB.ipynb Outdated
Comment thread docs/TrendAnalysis_example_NSRDB.ipynb Outdated
Comment thread docs/sphinx/source/changelog/v3.2.1.rst Outdated
@@ -0,0 +1,57 @@
********************
v 3.2.1 (July XX, 2026)
Comment thread docs/sphinx/source/changelog/v3.2.1.rst

@mdeceglie mdeceglie left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good, it will be great to have all this infrastructure updated. Thank you!

@martin-springer martin-springer merged commit b5eb6e2 into master Jul 8, 2026
20 checks passed
@martin-springer martin-springer deleted the release_321 branch July 8, 2026 18:26
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.

6 participants