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

Attempt at a clearer example of data channels #785

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

corranwebster
Copy link
Contributor

This bundles country info into an object that contains name and flag information with a custom value type that handles it.

Hopefully this example makes clearer the idea that an item in a model may be more complex than just a scalar value and may have multiple linked data channels.

This is a draft, because it may make sense to bundle this example in with the EnumType PR in some way.


class Address(HasStrictTraits):

street = Str()

city = Str()

country = Str()
country = Instance(Country, allow_none=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
country = Instance(Country, allow_none=True)
country = Instance(Country, allow_none=False)

D'oh!

@codecov-io
Copy link

Codecov Report

Merging #785 into master will increase coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #785      +/-   ##
==========================================
+ Coverage   40.81%   40.88%   +0.07%     
==========================================
  Files         508      508              
  Lines       27832    27832              
  Branches     4217     4217              
==========================================
+ Hits        11359    11379      +20     
+ Misses      15992    15979      -13     
+ Partials      481      474       -7     
Impacted Files Coverage Δ
pyface/ui/wx/data_view/data_view_model.py 56.14% <0.00%> (-1.76%) ⬇️
pyface/ui/qt4/console/console_widget.py 29.28% <0.00%> (+0.20%) ⬆️
pyface/ui/qt4/code_editor/code_widget.py 44.39% <0.00%> (+0.84%) ⬆️
pyface/wx/python_stc.py 10.36% <0.00%> (+1.21%) ⬆️
pyface/ui/wx/window.py 77.10% <0.00%> (+2.40%) ⬆️
pyface/ui/qt4/util/gui_test_assistant.py 80.53% <0.00%> (+2.65%) ⬆️
pyface/ui/wx/data_view/data_view_widget.py 77.52% <0.00%> (+5.61%) ⬆️
pyface/__init__.py 88.88% <0.00%> (+7.40%) ⬆️
pyface/i_file_dialog.py 84.61% <0.00%> (+7.69%) ⬆️

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 0d5565f...115e589. Read the comment docs.

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

2 participants