-
Notifications
You must be signed in to change notification settings - Fork 7
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
Process existing ics files from URL #71
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #71 +/- ##
==========================================
- Coverage 95.19% 91.96% -3.23%
==========================================
Files 1 1
Lines 104 112 +8
==========================================
+ Hits 99 103 +4
- Misses 5 9 +4 ☔ View full report in Codecov by Sentry. |
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.
Thanks Melissa! I only have a suggestion to use stdlib. The rest is maybe some doc and I suppose you were waiting for some feedback before adding a test?
@@ -24,6 +24,7 @@ dependencies = [ | |||
"ics == 0.8.0.dev0", | |||
"python-dateutil >= 2.8", | |||
"pyyaml >= 6", | |||
"requests", |
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.
I would not add an extra dependency to requests
or another HTTP library as the needs are very limited. urllib.request should be more than enough for that.
@@ -146,7 +147,7 @@ def events_to_calendar(events: list) -> str: | |||
return cal | |||
|
|||
|
|||
def files_to_events(files: list) -> (ics.Calendar, str): | |||
def files_to_events(files: list) -> (ics.Calendar, str, bool): |
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.
Can we add some doc about that somewhere? The other parameters/return values were sort of ok to guess but this is less so to me.
Exactly, just checking if this was reasonable. Thanks for the suggestions - I'll fix them up and add the tests 😁 |
Given that I suggest this, because I think this functionality is unlikely to be required by users of this library, but is obviously already required on scientific-python.org! |
That makes sense too - I was wondering what the best approach would be given that we might want to keep track of these calendars in one place (right now this would mean the folder where all yaml files are in scientific-python.org). |
I'm at least somewhat interested in this idea! It's a good question if there should be something else that merges ICS feeds after yaml2ics does its job. If someone makes template commands for that, please paste here! |
Hi Richard, please see the pull request linked above for an example. |
Please see scientific-python/scientific-python.org#519 (comment) I think, unfortunately, we are not able to provide this functionality. |
This PR adds functionality to process existing .ics files from a URL and create a compatible calendar. (The goal of this PR is to be able to show the result in scientific-python.org)
Addresses scientific-python/scientific-python.org#246
Feedback is welcome!