Skip to content

Release 3.1.1 - Eliminates floating-point imprecision on old pandas version#494

Merged
martin-springer merged 7 commits intomasterfrom
fix/normalization-int64-nanoseconds
Mar 19, 2026
Merged

Release 3.1.1 - Eliminates floating-point imprecision on old pandas version#494
martin-springer merged 7 commits intomasterfrom
fix/normalization-int64-nanoseconds

Conversation

@martin-springer
Copy link
Copy Markdown
Collaborator

@martin-springer martin-springer commented Mar 11, 2026

Description

Fixes a bug where total_seconds() * 1e9 produced imprecise float values (e.g. 60000000000.00001) on older pandas versions (e.g. 1.4.4), causing gap detection in _t_step_nanoseconds, energy_from_power, and _aggregate to flag all data points as gaps.

Changes

  • Add .round() to 4 nanosecond calculations in normalization.py
  • Bump minimum deps: pvlib 0.11→0.13.1, xgboost 1.6→1.7, arch 5.0→5.6
  • Enable min-deps CI for Python 3.10 (was excluded for all versions)

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

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.00%. Comparing base (6a05165) to head (00628d0).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #494      +/-   ##
==========================================
- Coverage   96.18%   96.00%   -0.18%     
==========================================
  Files          12       12              
  Lines        2280     2280              
==========================================
- Hits         2193     2189       -4     
- Misses         87       91       +4     

☔ 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.

Comment on lines +14 to +16
* Updated expected test values in ``test_clearsky_pvlib_analysis`` and
``test_sensor_clearsky_pvlib_analysis`` to match corrected normalization
output, with wider CI tolerance to account for bootstrap nondeterminism.
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.

I don't think I'm seeing these changes in this PR.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

good catch this is left over from debugging. I'll remove it.

Comment on lines +20 to +21
* Bumped minimum ``pvlib`` from 0.11.0 to 0.13.1.
* Bumped minimum ``xgboost`` from 1.6.0 to 1.7.0.post0.
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.

These should be reflected in setup.py as well

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

updated.

@martin-springer martin-springer merged commit 0f8e3e7 into master Mar 19, 2026
21 of 33 checks passed
@martin-springer martin-springer deleted the fix/normalization-int64-nanoseconds branch March 19, 2026 16:53
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