-
Notifications
You must be signed in to change notification settings - Fork 51
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
Provide export of personal schedule #168
Conversation
Reviewer's Guide by SourceryThis pull request introduces new data exporters for personal schedules, allowing users to export their favorite sessions. It includes changes to the export system, user login handling, and UI updates to support these new features. File-Level Changes
Tips
|
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.
Hey @odkhang - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider refactoring the new exporters to reduce code duplication. A more generic approach that can handle both full and personalized schedules might be more maintainable.
- The XML and XCal filtering could be inefficient for large schedules. Consider filtering the data before generating the XML for better performance.
- Please add unit tests to cover the new functionality and ensure it doesn't break existing features.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
class MyFrabXmlExporter(FrabXmlExporter): | ||
identifier = "schedule-my.xml" | ||
verbose_name = "My XML (frab compatible)" | ||
favs_retrieve = True |
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.
suggestion: Consider using a design pattern to reduce code duplication
The new MyFrabXmlExporter, MyFrabXCalExporter, and MyFrabJsonExporter classes all follow the same pattern of subclassing and setting favs_retrieve = True. Consider using a mixin or a factory pattern to reduce code duplication and improve maintainability.
class FavsRetrieveMixin:
favs_retrieve = True
class MyFrabXmlExporter(FavsRetrieveMixin, FrabXmlExporter):
identifier = "schedule-my.xml"
verbose_name = "My XML (frab compatible)"
This PR closes/references issue #162 . It does so by:
How has this been tested?
Checklist
Summary by Sourcery
Add personal schedule export functionality with support for XML, XCal, JSON, and iCal formats. Require user login to access these features and filter exported events based on user favorites.
New Features:
Enhancements: