docs: enhance README with features, installation, quick start, and examples#76
Open
phillip-wenig-frequenz wants to merge 3 commits into
Open
Conversation
…_timestamp The `first_timestamp` parameter was incorrectly affecting both output timestamp labeling and interval grouping semantics. When `first_timestamp=false`, intervals used `(start, end]` instead of `[start, end)`, causing samples at exact interval boundaries to be excluded. This fix makes interval grouping consistently use `[start, end)` regardless of `first_timestamp` value. The parameter now only controls the output timestamp labeling as documented: `true` labels with the interval start, `false` with the interval end. Changes include: - Simplified boundary checking functions to remove first_timestamp logic - Updated documentation to clarify the parameter's sole purpose - Fixed test data to start at t=0 to match README example - Added explicit test for first_timestamp=false behavior - Updated RELEASE_NOTES with bug fix details Signed-off-by: Phillip Wenig <phillip.wenig@frequenz.com>
Add tests to strengthen coverage of the first_timestamp fix: Rust tests (src/tests.rs): - test_first_timestamp_same_values: Verifies both settings produce identical aggregated values, differing only in output timestamps - test_sample_at_interval_boundary: Confirms sample at t=5 goes to interval [5, 10), validating [start, end) semantics - test_data_starting_mid_interval: Tests correct behavior when data doesn't start at interval boundary Python tests (tests/test_resampler.py): - Updated all tests to start data at t=0 to match README example - Fixed expected values to match correct [start, end) interval semantics Signed-off-by: Phillip Wenig <phillip.wenig@frequenz.com>
…amples Add comprehensive documentation sections to improve project discoverability and ease of use for both Rust and Python users: - Add PyPI badge for Python package visibility - Add Features section highlighting key capabilities - Add Installation section with instructions for Rust and Python - Add Quick Start section with runnable code examples - Add Documentation section with links to relevant resources - Add Resampling Functions reference table - Add License section - Restructure Usage sections with subsections for Rust and Python - Improve overall clarity and organization of existing content These improvements make it easier for new users to understand what the library does, how to install it, and how to get started quickly. Signed-off-by: Phillip Wenig <phillip.wenig@frequenz.com>
17e177d to
4207768
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves project onboarding by expanding the README (features, installation, quick start, examples) and aligns documentation/tests with the clarified first_timestamp semantics (it affects output timestamp labeling only, not interval grouping).
Changes:
- Expanded and restructured
README.mdwith install instructions, quick start snippets, and a resampling-functions reference. - Updated Rust and Python tests/examples to start data at
t=0and to reflect consistent[start, end)interval semantics. - Clarified
first_timestampbehavior in Rust docs, Python stubs, and release notes.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
README.md |
Adds badges/sections and reorganizes usage examples; documents first_timestamp. |
RELEASE_NOTES.md |
Notes README improvements and the first_timestamp interval-grouping fix. |
src/resampler.rs |
Simplifies boundary logic to consistently use [start, end) semantics and updates field docs. |
src/lib.rs |
Updates crate-level doctest example data to start at t=0. |
src/tests.rs |
Aligns existing tests to t=0 starts and adds new tests covering boundaries and first_timestamp behavior. |
tests/test_resampler.py |
Aligns Python tests to t=0 starts and updates docstrings/comments accordingly. |
frequenz/resampling/_rust_backend.pyi |
Clarifies first_timestamp docstring: labeling only, no impact on grouping. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
llucax
reviewed
Mar 2, 2026
Contributor
llucax
left a comment
There was a problem hiding this comment.
I just gave this a quick glance, will leave the approval to someone with more rust-fu.
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.
Summary
These improvements make it easier for new users to understand what the library does, how to install it, and how to get started quickly.
Depends on #75
Closes #37