Skip to content
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

Implement logic for adding/removing notifiers for a given ObserverGraph #1023

Merged
merged 20 commits into from
May 7, 2020

Conversation

kitchoi
Copy link
Contributor

@kitchoi kitchoi commented Apr 23, 2020

Closes #1021
Item 6 of #977

This PR adds a function add_or_remove_notifiers for adding/removing notifiers for a given ObserverGraph.

Checklist

  • Tests
  • Update API reference (docs/source/traits_api_reference): Things here are still private. Module names are preceded with an underscore.
  • Update User manual (docs/source/traits_user_manual): Things here are still private.
  • Update type annotation hints in traits-stubs: Nothing here are trait-ed

@codecov-io
Copy link

codecov-io commented Apr 23, 2020

Codecov Report

Merging #1023 into master will increase coverage by 3.65%.
The diff coverage is 97.34%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1023      +/-   ##
==========================================
+ Coverage   73.05%   76.70%   +3.65%     
==========================================
  Files          51       61      +10     
  Lines        6514     6698     +184     
  Branches     1309     1294      -15     
==========================================
+ Hits         4759     5138     +379     
+ Misses       1363     1215     -148     
+ Partials      392      345      -47     
Impacted Files Coverage Δ
traits/api.py 100.00% <ø> (+9.67%) ⬆️
traits/observers/_i_notifier.py 0.00% <0.00%> (ø)
traits/trait_base.py 69.23% <ø> (+5.65%) ⬆️
traits/trait_dict_object.py 94.04% <ø> (+18.59%) ⬆️
traits/trait_set_object.py 95.45% <ø> (+29.22%) ⬆️
traits/trait_types.py 72.15% <94.33%> (+0.50%) ⬆️
traits/has_traits.py 72.40% <94.44%> (+1.16%) ⬆️
traits/observers/_testing.py 98.24% <98.24%> (ø)
traits/trait_list_object.py 97.54% <99.43%> (+23.25%) ⬆️
traits/ctrait.py 71.07% <100.00%> (+12.51%) ⬆️
... and 35 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 046e68a...b08ee62. Read the comment docs.

Copy link
Contributor

@corranwebster corranwebster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I recall that I looked over the code on this from the POC PR, so I don't have any issues with the implementation.

@kitchoi
Copy link
Contributor Author

kitchoi commented May 7, 2020

Thank you @ievacerny and @corranwebster!
Merging...

@kitchoi kitchoi merged commit 48063b4 into master May 7, 2020
@kitchoi kitchoi deleted the 1021-implement-add-or-remove-notifiers branch May 7, 2020 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement logic for walking down the ObserverGraph and attach/detach notifiers
4 participants