Skip to content

Conversation

@TejasR002
Copy link

@TejasR002 TejasR002 commented Oct 16, 2025

Closes issue

Description

added ics_value property to vPeriod, vDuration,vDate,vText.

Checklist

  • I've added a change log entry to CHANGES.rst.
  • I've added or updated tests if applicable.
  • I've run and ensured all tests pass locally by following Running Tests.
  • I've added or edited documentation, both as docstrings to be rendered in the API documentation and narrative documentation, as necessary.
  • I've added myself to docs/credits.rst as a contributor in this pull request or have done so previously.

Additional information

Upload screenshots, videos, links to documentation, or any other relevant information.


📚 Documentation preview 📚: https://icalendar--916.org.readthedocs.build/

@SashankBhamidi
Copy link
Member

SashankBhamidi commented Oct 16, 2025

@TejasR002 Tests are failing. Let me know when this is ready for a review.

Edit: It looks like this branch is behind main. We recommend updating and testing against the latest version.

Edit 2: The PR body still has the default template. Could you update it with details about your implementation? For example, explain how the new ics_value property works across vPeriod, vDuration, vDate, and vText, and include any relevant test or doc updates. This helps reviewers understand the scope and reasoning behind your changes.

@niccokunzmann
Copy link
Member

niccokunzmann commented Oct 18, 2025

@TejasR002, thank you for opening the PR! @SashankBhamidi, I will assign this to you, please help @TejasR002 to go through all the hurdles and checks.

I will refine the issue now.

@TejasR002, let us know if you need any help or guidance - it is a big project :)

Copy link
Member

@niccokunzmann niccokunzmann left a comment

Choose a reason for hiding this comment

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

Hello, I left a comment inline. For this PR, it is enough to add ics_value to a few classes and get it merged. No need to add it to all of them. You can open more pull requests for others once this is merged :) Thank you for taking this on!

@property
def ics_value(self):
if self.by_duration:
return (self.start, self.duration)
Copy link
Member

@niccokunzmann niccokunzmann Oct 18, 2025

Choose a reason for hiding this comment

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

This duplicates .dt. Please just return self.dt.

Also, they all need a type hint in the end. I updated the issue to be clearer on the scope.

@SashankBhamidi
Copy link
Member

@TejasR002 Let me know if you need help with anything.

Copy link
Member

Choose a reason for hiding this comment

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

Hi, I think for now, it would be ok to remove the changes in this file here. Then, the tests should pass. There are a lot of classes that will receive the .ics_value property. Adding some is a good first contribution. Embedding that behaviour into icalendar might be too hard for a first-time contribution. If you remove the changes in this file and add tests for the existing new .ics_value properties, that is a really great contribution!

@niccokunzmann
Copy link
Member

I corrected the issue: it is now called ical_value because we have to_ical() and from_ical()

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.

Properly decode every value type (polymorphy, beginner)

3 participants