-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add a "modifiers" hook to allow extension authors to mutate/redact event data #12
Conversation
This is ready for final review and should likely be merged before #10. |
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.
LGTM!
Thanks @blink1073! I just added a new commit: 3c5689d. Do you mind taking another look? 😃 After working with this API more and thinking about previous chats we've had, I think making all of the public method/function APIs take dataclasses as arguments is a better approach. This gives us, the jupyter_events developers, more flexibility to change these APIs without causing backwards incompatibility. |
I don't think we need a separate class for |
My reasoning for separating these dataclasses was thinking ahead about possible changes to the Today, That said, I agree it would be much nicer to just have the |
Ok, I've consolidated these dataclasses 👍. It makes the API really nice and clean. Thanks @blink1073! |
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.
LGTM!
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.
Hacking with @Zsailer in person!!! More comments left in person :D
jupyter_events/logger.py
Outdated
@@ -54,6 +65,8 @@ class EventLogger(Configurable): | |||
""", | |||
) | |||
|
|||
modifiers = Dict({}, help="A mapping of schemas to their list of modifiers.") |
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.
Should this list be private? I think it makes sense for it to be private and to have a remove_modifier
function.
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.
👍 Great idea. Fixed!
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.
LGTM!
Addresses #11