Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Duration Class #65

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

LukeBair
Copy link
Contributor

@LukeBair LukeBair commented Mar 7, 2025

Description:
Introduce a Duration class to represent time durations in seconds, a wrapper for the protobuf Duration class.

  • Add Duration class with seconds attribute
  • Implement validation to ensure seconds is an integer
  • Add to_proto method to convert to proto_Duration
  • Add from_proto class method to create Duration from proto_Duration
  • Implement __str__ and __repr__ for string representations
  • Implement __eq__ for equality comparison

Checklist:

  • Documented (Code comments)
  • Tested (basic testing for type safety)

Signed-off-by: LukeBair <[email protected]>
@exploreriii exploreriii requested a review from nadineloepfe March 9, 2025 02:32
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.

1 participant