-
Notifications
You must be signed in to change notification settings - Fork 328
feat: add --availability flag for event transparency #868
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -393,3 +393,23 @@ def test_next_cut(PatchedGCalI): | |
|
|
||
| event_title = "樹貞 fun fun fun" | ||
| assert gcal._next_cut(event_title) == (8, 6) | ||
|
|
||
| def test_add_event_availability(PatchedGCalI): | ||
| cal_names = parse_cal_names(['jcrowgey@uw.edu'], printer=None) | ||
| gcal = PatchedGCalI( | ||
| cal_names=cal_names, allday=False, default_reminders=True) | ||
| assert gcal.AddEvent(title='transparent event', | ||
| where='anywhere', | ||
| start='now', | ||
| end='tomorrow', | ||
| descr='testing', | ||
| who='anyone', | ||
| reminders=None, | ||
| color='banana', | ||
| availability='free') | ||
|
Comment on lines
+399
to
+409
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test passes the This approach tests a method signature that likely differs from the production code, which will cause the test to fail with a gcal = PatchedGCalI(
cal_names=cal_names, allday=False, default_reminders=True,
availability='free')
assert gcal.AddEvent(title='transparent event',
where='anywhere',
start='now',
end='tomorrow',
descr='testing',
who='anyone',
reminders=None,
color='banana')Prompt for LLMTalk to Kody by mentioning @kody Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction. |
||
|
|
||
| gcal.api_tracker.verify_all_mutating_calls([ | ||
| CallMatcher('insert', | ||
| body_has_fields={'summary', 'start', 'end', 'transparency'}, | ||
| body_fields={'transparency': 'transparent'}) | ||
| ]) | ||
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 code uses user-friendly values ('free', 'busy') instead of the Google Calendar API's required values ('transparent', 'opaque') for the event availability/transparency field. This mismatch causes API errors and prevents the feature from working correctly.
This issue appears in multiple locations:
Please ensure all code handling event availability translates between user-facing terms ('free'/'busy') and API-required values ('transparent'/'opaque') consistently across the codebase.
Prompt for LLM
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.