Release 3.2.1#497
Conversation
* 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.
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
* 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>
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.
There was a problem hiding this comment.
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
filterpyusage in soiling withbayesian-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.
| @@ -0,0 +1,57 @@ | |||
| ******************** | |||
| v 3.2.1 (July XX, 2026) | |||
mdeceglie
left a comment
There was a problem hiding this comment.
Looks good, it will be great to have all this infrastructure updated. Thank you!
Maintenance
pyproject.toml: Replacedsetup.py/setup.cfgwithpyproject.tomlusingsetuptoolsas the build backend. (Domain change updates #488)setuptools-scm: Replacedversioneerwithsetuptools-scmfor automatic version management from git tags. Removed legacy files:setup.py,setup.cfg,versioneer.py,MANIFEST.in, andrdtools/_version.py. (Domain change updates #488)__init__.py: Now usesimportlib.metadatafor version retrieval instead of versioneer. (Domain change updates #488)NREL/rdtoolstoNatLabRockies/rdtoolsand email addresses from@nrel.govto@nlr.gov. (Change NREL to NLR #492)requirements.txt,requirements-min.txt, anddocs/notebook_requirements.txtwith pixi environments and a lockfile. (Change NREL to NLR #492)pytest.yamlandnbval.yamlto use pixi viaprefix-dev/setup-pixi; removed therequirements.yamlworkflow. (Change NREL to NLR #492)archversion from 5.0 to 5.6. (Change NREL to NLR #492)core(bare),default(notebooks),dev(notebooks + test, alias fordev-py313),dev-py310–dev-py314(full dev per Python version), anddev-min(minimum dependency versions). All shared environments pin Python 3.13. (Change NREL to NLR #492)[notebooks],[test],[dev],[doc], and[all]. (Change NREL to NLR #492)Bug Fixes
Requirements
llvm-openmpas a platform-specific conda dependency for macOS (osx-64 and osx-arm64) to fix XGBoost installation issues — users no longer need to install libomp via Homebrew. (Adopt pixi for environment management and modernize CI #493)xgboostfrom 1.6.0 to 1.7.0 to fixpkg_resourcesimport error in environments withoutsetuptools. (Adopt pixi for environment management and modernize CI #493)pvlibfrom 0.12.0 to 0.13.1 to include thedetect_clearsky()bug fix (pvlib GH2550). (Adopt pixi for environment management and modernize CI #493)Checklist
__init__.py