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

Add TraitChangeEvent object for wrapping CTrait change #1070

Merged
merged 2 commits into from
May 11, 2020

Conversation

kitchoi
Copy link
Contributor

@kitchoi kitchoi commented May 8, 2020

This PR adds the TraitChangeEvent object for wrapping CTrait change events.

This event object will be given to the user's handler registered using observe.

This event object will also be used by the NamedTraitObserver in #1069, the "FilteredTraitObserver" for observing traits using a filter, and the (internal-use-only) observer for trait_added events.

Checklist

  • Tests
  • Update API reference (docs/source/traits_api_reference)
  • Update User manual (docs/source/traits_user_manual) WIP in Add user manual for observe #1060
  • Update type annotation hints in traits-stubs

@codecov-io
Copy link

codecov-io commented May 8, 2020

Codecov Report

Merging #1070 into master will decrease coverage by 3.33%.
The diff coverage is 94.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1070      +/-   ##
==========================================
- Coverage   76.15%   72.82%   -3.34%     
==========================================
  Files          54       65      +11     
  Lines        6493     8047    +1554     
  Branches     1263     1538     +275     
==========================================
+ Hits         4945     5860     +915     
- Misses       1205     1808     +603     
- Partials      343      379      +36     
Impacted Files Coverage Δ
traits/api.py 100.00% <ø> (+9.67%) ⬆️
traits/base_trait_handler.py 61.76% <ø> (ø)
traits/ctrait.py 71.07% <ø> (ø)
traits/has_traits.py 72.40% <ø> (-0.37%) ⬇️
traits/observers/_i_notifier.py 0.00% <0.00%> (ø)
traits/observers/_i_observable.py 0.00% <0.00%> (ø)
traits/observers/events.py 0.00% <0.00%> (ø)
traits/traits.py 75.10% <ø> (-2.45%) ⬇️
traits/util/resource.py 15.25% <ø> (ø)
traits/trait_types.py 72.15% <80.00%> (-0.31%) ⬇️
... and 29 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 48063b4...a69fd18. Read the comment docs.

Copy link
Contributor

@ievacerny ievacerny left a comment

Choose a reason for hiding this comment

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

LGTM

@kitchoi
Copy link
Contributor Author

kitchoi commented May 11, 2020

Thank you! Merging this and I can merge master back to #1069

@kitchoi kitchoi merged commit dfc6ffa into master May 11, 2020
@kitchoi kitchoi deleted the 977-trait-event-factory branch May 11, 2020 08:57
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.

None yet

3 participants