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

Add ability to keep recurrence attributes on event copies #54

Merged

Conversation

Plonq
Copy link
Collaborator

@Plonq Plonq commented May 18, 2021

Add an argument keep_recurrence_attributes to the of() function in order to manually undo the stripping of RRULE, RDATE, and EXDATE attributes from each event copy.

Changes

  • Add argument to relevant functions
  • Add tests
  • Update readme

Why?

I agree with the reason these were stripped in the first place (#24). However, for my use case, I want to keep these attributes on each event so I can differentiate between normal events and recurring events. Without these attributes, all events look the same. For example, when displaying events to the user, I want to display the recurrence rules as well.

Alternative

An alternative would be to implement grouping. I.e, return events as a dict, grouped by the recurrence, or the source event they were created from (with a special group for non-recurring events). However I felt that was overly complicated and I went for the simpler solution.

@niccokunzmann niccokunzmann merged commit 3cf3270 into niccokunzmann:master May 24, 2021
@niccokunzmann
Copy link
Owner

@Plonq, this is very straight and orderly. Since I have not much time to manage this right now, I give you access to the repository and you can release a new version following the release process.
Thanks!

@Plonq Plonq deleted the keep-recurrence-attributes-option branch May 24, 2021 22:31
@Plonq
Copy link
Collaborator Author

Plonq commented May 24, 2021

@niccokunzmann

Thanks, I have released 0.2.0b (since this change was a feature not a bug I did minor version bump). I'm assuming the Pypi package will get updated automatically?

At first I thought 0.1.21b was never released, but later realised it was just the changelog and __version__ that hadn't
been updated. I fixed the changelog afterwards.

Also I noticed this message on Travis CI FYI:
image

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.

None yet

2 participants