-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Document vRecur property #759
Document vRecur property #759
Conversation
Hi, this is nice... I wonder why it fails. I will have a look. In the mean time, could you also add these examples to the vRecur class documentation? |
docs/usage.rst
Outdated
|
||
>>> event.add('rrule', {'freq': 'daily', 'interval': 10}) | ||
|
||
>>> event.add('rrule', vRecur.from_ical('FREQ=DAILY;INTERVAL=10')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I found it... We actually run the documentation code to make sure it works.
You add another RRULE entry and that makes the output different a few lines further down.
I think, a good place to add the documentation for this is actually the class string:
icalendar/src/icalendar/prop.py
Line 1102 in 4725c1b
"""Recurrence definition. |
There is almost nothing and more is appreciated! Could you add these two examples to the class string? Could you remove this line causing duplicate entry?
This is another issue to make this class nicer to understand:
#742
That is - if you like this class and making it pretty ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I copied most of the docstring from the rfc. Let me know if you want me to adjust anything.
Co-authored-by: Steve Piercy <[email protected]>
@fluxxcode Have a look, can you see the tests? https://github.com/collective/icalendar/actions/runs/12449350281/job/34754863315#step:5:192 (I am not sure who Github allows to see them) |
Nice! |
My code editor removed trailing whitespaces from other docstrings. Let me know if I should revert the diffs |
Direct links to preview changes:
|
src/icalendar/prop.py
Outdated
@@ -1100,6 +1100,68 @@ def __reduce_ex__(self, _p): | |||
|
|||
class vRecur(CaselessDict): | |||
"""Recurrence definition. | |||
|
|||
Property Name: RRULE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All parameter names must appear on their own line, followed by an optional description beginning on an indented new line. Please adjust the others accordingly. Except
is OK. See current rendering at https://icalendar--759.org.readthedocs.build/en/759/api.html#icalendar.prop.vRecur
Property Name: RRULE | |
Property Name: | |
RRULE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rendering now looks good
Pull Request Test Coverage Report for Build 12449529289Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Thanks! This is definitely a huge improvement! |
This PR adds an example to the usage documentation on how to add an
RRULE
from a string.Closes #758
📚 Documentation preview 📚: https://icalendar--759.org.readthedocs.build/