Repository navigation
Add RFC 9073 Event Publishing Extensions and complete RFC 9074 #2194
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
Open
SashankBhamidi
wants to merge
11
commits into
main
Choose a base branch
from
rfc-9073-event-publishing-extensions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+874
−18
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
82ca1b8
add failing tests for RFC 9073 and RFC 9074 completion
SashankBhamidi 193baa7
add RFC 9073 Event Publishing Extensions and complete RFC 9074
SashankBhamidi dfe6f9b
Merge remote-tracking branch 'upstream/main' into rfc-9073-event-publ…
SashankBhamidi 096b530
Merge branch 'main' into rfc-9073-event-publishing-extensions
stevepiercy bc53acf
Merge remote-tracking branch 'upstream/main' into rfc-9073-event-publ…
SashankBhamidi b2d18d8
apply Steve's review: rename VLocation to Location, VResource to Reso…
SashankBhamidi 74f4d93
Merge branch 'rfc-9073-event-publishing-extensions' of https://github…
SashankBhamidi 2208340
fix import order to satisfy ruff
SashankBhamidi 7b11f25
fix pre-existing ruff errors from main (RUF036, ISC004)
SashankBhamidi e71c579
fix ruff format on pre-existing ISC004 strings in test_xml_property.py
SashankBhamidi 692dfc9
fix import order and pre-existing RUF036 in time.py
SashankBhamidi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| icalendar.cal.location module | ||
| ============================= | ||
|
|
||
| .. automodule:: icalendar.cal.location | ||
| :ignore-module-all: | ||
| :members: | ||
| :show-inheritance: | ||
| :undoc-members: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| icalendar.cal.participant module | ||
| ================================ | ||
|
|
||
| .. automodule:: icalendar.cal.participant | ||
| :ignore-module-all: | ||
| :members: | ||
| :show-inheritance: | ||
| :undoc-members: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| icalendar.cal.resource module | ||
| ============================= | ||
|
|
||
| .. automodule:: icalendar.cal.resource | ||
| :ignore-module-all: | ||
| :members: | ||
| :show-inheritance: | ||
| :undoc-members: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Added :class:`~icalendar.cal.participant.Participant`, :class:`~icalendar.cal.location.Location`, and :class:`~icalendar.cal.resource.Resource` components from :rfc:`9073`. :user:`SashankBhamidi` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Added ORDER, SCHEMA, and DERIVED property parameters from :rfc:`9073`. :user:`SashankBhamidi` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Added PARTICIPANT-TYPE, RESOURCE-TYPE, LOCATION-TYPE, CALENDAR-ADDRESS, STYLED-DESCRIPTION, and STRUCTURED-DATA properties from :rfc:`9073`. :user:`SashankBhamidi` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Completed :rfc:`9074` support: added PROXIMITY enum, typed Alarm.proximity accessor, RELTYPE.SNOOZE, and registered VLOCATION inside VALARM. :user:`SashankBhamidi` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
SashankBhamidi marked this conversation as resolved.
Resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| """:rfc:`9073` Location component.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from typing import TYPE_CHECKING | ||
|
|
||
| from icalendar.attr import ( | ||
| description_property, | ||
| single_string_property, | ||
| uid_property, | ||
| ) | ||
| from icalendar.cal.component import Component | ||
|
|
||
| if TYPE_CHECKING: | ||
| from icalendar.prop import vGeo | ||
|
|
||
|
|
||
| class Location(Component): | ||
| """A VLOCATION calendar component from :rfc:`9073#section-7.2`. | ||
|
|
||
| This component provides structured location information for a calendar | ||
| component. | ||
|
|
||
| It may appear inside :class:`~icalendar.cal.alarm.Alarm`, | ||
| :class:`~icalendar.cal.event.Event`, | ||
| :class:`~icalendar.cal.free_busy.FreeBusy`, | ||
| :class:`~icalendar.cal.journal.Journal`, | ||
| :class:`~icalendar.cal.participant.Participant`, or | ||
| :class:`~icalendar.cal.todo.Todo` per :rfc:`9074#section-8`. Multiple | ||
| instances are allowed. | ||
|
|
||
| Example: | ||
|
|
||
| .. code-block:: pycon | ||
|
|
||
| >>> from icalendar import Location | ||
| >>> loc = Location() | ||
| >>> loc.location_name = "Conference Room A" | ||
| >>> loc.uid = "room-a-uid@example.com" | ||
| >>> str(loc.location_name) | ||
| 'Conference Room A' | ||
| """ | ||
|
|
||
| name = "VLOCATION" | ||
| singletons = ("NAME", "DESCRIPTION", "GEO", "LOCATION-TYPE", "UID") | ||
|
|
||
| location_name = single_string_property( | ||
| "NAME", | ||
| """The display name of this location per :rfc:`7986#section-5.1`. | ||
|
|
||
| Returns: | ||
| The value of the NAME property when set, or the empty string when | ||
| no NAME property is set. | ||
| """, | ||
| ) | ||
|
|
||
| description = description_property | ||
|
|
||
| uid = uid_property | ||
|
|
||
| location_type = single_string_property( | ||
| "LOCATION-TYPE", | ||
| """The raw LOCATION-TYPE value per :rfc:`9073#section-6.1`. | ||
|
|
||
| The property value is a comma-separated list of location type tokens | ||
| from the IANA registry defined in :rfc:`4589#section-3`, | ||
| for example, ``"office,airport"``. This accessor returns the raw | ||
| string. Split on commas to work with individual tokens. | ||
|
|
||
| Returns: | ||
| The value of the LOCATION-TYPE property if set, or the empty string | ||
| when not set. | ||
| """, | ||
| ) | ||
|
|
||
| @property | ||
| def geo(self) -> vGeo | None: | ||
| """The geographic position of this location per :rfc:`5545#section-3.8.1.6`. | ||
|
|
||
| Returns: | ||
| A :class:`~icalendar.prop.geo.vGeo` instance, or ``None`` when | ||
| no GEO property is set. | ||
| """ | ||
| return self.get("GEO") | ||
|
|
||
|
|
||
| __all__ = ["Location"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.