docs: replace RFC copy-paste docstrings with Pythonic docstrings#1385
docs: replace RFC copy-paste docstrings with Pythonic docstrings#1385ykd007 wants to merge 4 commits into
Conversation
|
@ykd007 would you please resolve the merge conflicts by moving your change log entry into the new format that we adopted in 7.1.2, as documented at https://icalendar.readthedocs.io/en/stable/contribute/index.html#change-log-entry-format? |
|
@ykd007 would you also edit your PR description from |
stevepiercy
left a comment
There was a problem hiding this comment.
This is phenomenal work! Thank you!
There are some weird prepended and appended docstrings from a parent method that I'd like to see added to this PR, which will improve other docstrings automatically.
The change log needs to be moved, per the release of 7.1.1, and described in https://icalendar.readthedocs.io/en/stable/contribute/index.html#change-log-entry-format.
Other than that, I pretty much had only grammar and style fixes.
| Defined in :rfc:`9074`. Setting this property allows calendar clients to | ||
| dismiss or suppress an alarm across multiple devices. Once set to a value | ||
| greater than or equal to the alarm's computed trigger time, conforming clients | ||
| will not re-fire the alarm. |
There was a problem hiding this comment.
| will not re-fire the alarm. | |
| will not refire the alarm. |
| >>> from icalendar import Alarm | ||
| >>> alarm = Alarm() | ||
| >>> alarm.ACKNOWLEDGED = datetime(2024, 1, 15, 10, 0, 0, tzinfo=timezone.utc) | ||
| >>> alarm.ACKNOWLEDGED # doctest: +ELLIPSIS |
There was a problem hiding this comment.
Inline comments don't render. Is the comment necessary?
| >>> alarm.ACKNOWLEDGED # doctest: +ELLIPSIS | |
| >>> alarm.ACKNOWLEDGED |
| datetime.datetime(2024, 1, 15, 10, 0, tzinfo=...) | ||
|
|
||
| See also: | ||
| :attr:`TRIGGER` — the time at which the alarm fires. |
There was a problem hiding this comment.
| :attr:`TRIGGER` — the time at which the alarm fires. | |
| :attr:`TRIGGER`, the time at which the alarm fires. |
| Analogous to a file's modification timestamp. This property is optional; | ||
| when absent, :attr:`last_modified` falls back to :attr:`DTSTAMP`. |
There was a problem hiding this comment.
| Analogous to a file's modification timestamp. This property is optional; | |
| when absent, :attr:`last_modified` falls back to :attr:`DTSTAMP`. | |
| It's analogous to a file's modification timestamp. This property is optional. | |
| When it's absent, :attr:`last_modified` falls back to :attr:`DTSTAMP`. |
| Analogous to a file's modification timestamp. This property is optional; | ||
| when absent, :attr:`last_modified` falls back to :attr:`DTSTAMP`. | ||
|
|
||
| Applicable to ``VEVENT``, ``VTODO``, ``VJOURNAL``, and ``VTIMEZONE`` |
There was a problem hiding this comment.
| Applicable to ``VEVENT``, ``VTODO``, ``VJOURNAL``, and ``VTIMEZONE`` | |
| This property is applicable to ``VEVENT``, ``VTODO``, ``VJOURNAL``, and ``VTIMEZONE`` |
| store. | ||
| """The UTC datetime when this calendar component was first created, per :rfc:`5545#section-3.8.7.1`. | ||
|
|
||
| Records when the calendar user agent originally stored the component. |
There was a problem hiding this comment.
| Records when the calendar user agent originally stored the component. | |
| This property records when the calendar user agent originally stored the component. |
| """The UTC datetime when this calendar component was first created, per :rfc:`5545#section-3.8.7.1`. | ||
|
|
||
| Records when the calendar user agent originally stored the component. | ||
| This property is optional; when absent, :attr:`created` falls back to |
There was a problem hiding this comment.
| This property is optional; when absent, :attr:`created` falls back to | |
| This property is optional. When it's absent, :attr:`created` falls back to |
| The property can be specified once in "VEVENT", | ||
| "VTODO", or "VJOURNAL" calendar components. The value MUST be | ||
| specified as a date with UTC time. | ||
| Applicable to ``VEVENT``, ``VTODO``, and ``VJOURNAL`` components. |
There was a problem hiding this comment.
| Applicable to ``VEVENT``, ``VTODO``, and ``VJOURNAL`` components. | |
| This property is applicable to ``VEVENT``, ``VTODO``, and ``VJOURNAL`` components. |
|
@ykd007 in addition to addressing my comments, would you please:
Please let us know if you need assistance with moving this forward. Thank you! |
|
Thank you for the detailed feedback, @stevepiercy! I've pushed two commits addressing your requests:
Please let me know if anything else needs attention! |
|
@ykd007 GitHub shows that there are merge conflicts that need to be resolved. Would you please take care of that? Then I can complete a review and proceed. Thank you! |
…lective#1244) Rewrote RFC-verbatim docstrings for the following properties: alarm.py: - Alarm.ACKNOWLEDGED: replaced RFC 9074 Purpose/Description wall-of-text with a concise summary, Return, Example and See also sections. - Alarm.TRIGGER: replaced RFC 5545 Purpose/Value-Type verbatim with a clear summary, type info, Example and See also. component.py: - Component.DTSTAMP / stamp: replaced 'RFC 5545: Conformance/Description' block with a Pythonic summary, context note, Example and See also. - Component.LAST_MODIFIED: same pattern - Pythonic summary, Example, See also. - Component.CREATED: same pattern - Pythonic summary, Example, See also. calendar.py: - Calendar.calendar_name: removed Property Parameters/Conformance/Description RFC headings; added See also. - Calendar.description: same cleanup. - Calendar.color: removed Property Parameters/Conformance/Description RFC headings; added CSS3 link reference and See also. - Calendar.prodid: replaced Conformance/Description verbatim with Pythonic summary, Example and See also. - Calendar.version: replaced Purpose RFC text with Pythonic summary + Example. - Calendar.calscale: replaced Conformance/Description/Compatibility with Pythonic summary, RFC 7529 note, Example and See also. - Calendar.method: replaced Description RFC block with Pythonic summary, iTIP/RFC 5546 reference, Example and See also. - Calendar.refresh_interval: replaced Conformance/Description headings with Pythonic summary, updated Raises, added Example and See also.
86791a0 to
ea0101f
Compare
|
Hi @stevepiercy — I've rebased on current main and resolved all merge conflicts. The branch is clean now. Also tightened a few things during the rebase:
Should be conflict-free now — please let me know if anything else needs attention. |
Coverage Report for CI Build 26384814733Coverage at 97.784% (no base build to compare)Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
…fix ACKNOWLEDGED and p_doc text
ea0101f to
7c55781
Compare
stevepiercy
left a comment
There was a problem hiding this comment.
I started to review your changes, but it appears you missed about two dozen of my suggestions and comments. I stopped. Would you please take care of them all? Thank you!
| @@ -960,10 +960,9 @@ def p_del(self: Component): | |||
| {doc} | |||
|
|
|||
| Accepted values: {", ".join(t.__name__ for t in value_type)}. | |||
There was a problem hiding this comment.
| Accepted values: {", ".join(t.__name__ for t in value_type)}. | |
| Parameters: | |
| {", ".join(t.__name__ for t in value_type)}. |
| Raises :exc:`~icalendar.error.InvalidCalendar` if the value is invalid. | ||
| Returns ``None`` if absent. | ||
| You can also delete the value with ``del`` or by setting it to ``None``. |
There was a problem hiding this comment.
Please follow the docstring format.
| Raises :exc:`~icalendar.error.InvalidCalendar` if the value is invalid. | |
| Returns ``None`` if absent. | |
| You can also delete the value with ``del`` or by setting it to ``None``. | |
| Raises: | |
| InvalidCalendar: if the attribute has invalid values. | |
| Returns: | |
| A :class:`~datetime.datetime` or :class:`~datetime.timedelta` if the | |
| value is valid. ``None`` if the value is absent. | |
| """ |
| {doc} | ||
|
|
There was a problem hiding this comment.
| {doc} | |
| {doc} | |
| You can also delete the value with ``del`` or by setting it to ``None``. | |
See #1244
Rewrites RFC copy-paste docstrings across
Alarm,Component, andCalendarinto clean Pythonic format with concise summaries, examples, and see-also references.Updated (12 properties across 3 files):
Alarm:ACKNOWLEDGED,TRIGGERComponent:DTSTAMP/stamp,LAST_MODIFIED,CREATEDCalendar:calendar_name,description,color,prodid,version,calscale,method,refresh_intervalAll 3 files pass
py_compilesyntax check.