Skip to content

docs: enhance README with features, installation, quick start, and examples#76

Open
phillip-wenig-frequenz wants to merge 3 commits into
frequenz-floss:v0.x.xfrom
phillip-wenig-frequenz:docs/improve-readme
Open

docs: enhance README with features, installation, quick start, and examples#76
phillip-wenig-frequenz wants to merge 3 commits into
frequenz-floss:v0.x.xfrom
phillip-wenig-frequenz:docs/improve-readme

Conversation

@phillip-wenig-frequenz
Copy link
Copy Markdown
Contributor

Summary

  • 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

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

…_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>
Copy link
Copy Markdown

Copilot AI left a comment

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 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.md with install instructions, quick start snippets, and a resampling-functions reference.
  • Updated Rust and Python tests/examples to start data at t=0 and to reflect consistent [start, end) interval semantics.
  • Clarified first_timestamp behavior 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.

Comment thread README.md
@llucax llucax requested a review from shsms March 2, 2026 09:52
Copy link
Copy Markdown
Contributor

@llucax llucax left a comment

Choose a reason for hiding this comment

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

I just gave this a quick glance, will leave the approval to someone with more rust-fu.

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.

Improve README.md for Better Project Discoverability

3 participants