Repository navigation
Conversation
Hey @dexhunter! 🎉Thanks for opening your first pull request! We appreciate your If AI is used for any portion of this PR, you must vet the content Finally, be sure the PR description includes the PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_compute_waveletbuilds a one-column DataFrame, fills missing values at every scale, and computes coefficients across padded regions that are discarded before returning. This change uses a Series for the same pandas rolling mean, fills only when the rolling result contains NaNs, and retains only the original time window for coefficient calculation. Slicing replaces the roll-and-crop operations, and adjacent-scale differences are calculated together.On
benchmarks.scaling.Scaling.time_wvm, time fell from 2.36 ms to 1.45 ms per call, about 39% less time (1.63× faster). The benchmark uses 1,000 samples at one-minute intervals, four sites, and cloud speed 5. Measurements used Python 3.12.13, NumPy 2.5.4, pandas 3.0.6, and SciPy 1.18.1 on isolated benchmark slots, with numerical-library thread counts set to one. These are local measurements, not a performance claim for every input size or dependency version.The repository benchmark was invoked directly with Python's standard
timeitrunner becauseasv-litewas unavailable: best of seven repeats, 100 calls per repeat, with the same seeded setup in each checkout. From the checkout root, the measured invocation was:A separate frozen evaluator compared complete outputs exactly against the baseline, using fresh seeds and nine interleaved pairs of 40 repetitions. Three final candidate/baseline ratios were 0.613246, 0.609230, and 0.596677. This workload also includes three invalid-input probes, so those ratios are reported separately from the direct repository benchmark.
Validation:
python -m pytest tests/test_scaling.py -q: 18 passed.git diff --checkpassed.Weco evaluated 20 distinct passing candidates. Step 1 was selected for maintainability: it uses public pandas APIs and preserves the existing rolling arithmetic and interval inference. Faster candidates depended on a private pandas kernel and duplicated fallback implementations.
AI assistance: Weco 0.3.40 with
claude-opus-5-5generated the optimization candidates; Codex reviewed the selected change, ran verification, and drafted this description. The generated material was reviewed for accuracy and compatibility with pvlib's BSD-3-Clause license. No new dependency or third-party implementation was added.Weco share link: https://dashboard.weco.ai/share/xYRej-54aUL5RN2-yGcjfd1c8ZDyZAlo
I am familiar with the contributing guidelines
I attest that all AI-generated material has been vetted for accuracy and is in compliance with the pvlib license
Tests added
Adds description and name entries in the appropriate "what's new" file in
docs/sphinx/source/whatsnewfor all changes. Includes link to the GitHub Issue with:issue:`num`or this Pull Request with:pull:`num`. Includes contributor name and/or GitHub username (link with:ghuser:`user`).New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
Pull request is nearly complete and ready for detailed review.
Maintainer: Appropriate GitHub Labels (including
remote-data) and Milestone are assigned to the Pull Request and linked Issue.