-
Notifications
You must be signed in to change notification settings - Fork 96
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
Move format_func, format_str and invalid traits from factory to editor #859
Merged
ievacerny
merged 11 commits into
master
from
maint/790-move-attribute-from-factory-to-editor
Jun 4, 2020
Merged
Move format_func, format_str and invalid traits from factory to editor #859
ievacerny
merged 11 commits into
master
from
maint/790-move-attribute-from-factory-to-editor
Jun 4, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ievacerny
changed the title
[DO NOT MERGE] Move format_func, format_str and invalid traits from factory to editor
Move format_func, format_str and invalid traits from factory to editor
Jun 1, 2020
ievacerny
changed the base branch from
fix/782-always-apply-format-func
to
master
June 1, 2020 17:08
corranwebster
approved these changes
Jun 3, 2020
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.
This looks good to me.
kitchoi
pushed a commit
that referenced
this pull request
Jul 8, 2020
#859) * Move format_func and format_str from factory to editor * Move invalid from factory to editor as invalid_trait_name
kitchoi
added a commit
that referenced
this pull request
Jul 8, 2020
* Fix the back button in the demo. (#799) * Fixes for Qt DatetimeEditor (#803) * Fixes for Qt DatetimeEditor. * Fix handling of changes to editor bounds. * Remove commented out code from editor example. * And remove corresponding imports. * Missed file with explicit defaults. * Fixes to min/max and value out of range handling. * Remove NameError and add default root_dir to tutor.py (#813) * Remove NameError from tutor.py * Take current directory as default * Relax argument number constraint * Rewrite nose tests to use unittest (#809) * Rewrite nose tests to use unittest * Rewrite remaining bare test functions * Remove print statements from unit tests * Replace assertEquals with assertEqual * Fix error due to comparing None with int (#969) * Use unittest discover instead of nose.core (#810) * Merge pull request #829 from enthought/fix/ui-panel-alignment Remove align centre which was causing problems * Merge pull request #808 from enthought/fix/demo-fixes A variety of fixes to the Demo app * Add more tests for Enum Editor (#836) * Add more tests for Enum Editor * Add wx EnumEditor tests * Add missing skipif decorator * Add issue references to FIXMEs * Address review comments * Add check list editor tests (#837) * Add check list editor tests * Add wx tests for check list editor * Simplify helper functions * Add issue references to FIXMEs * Address review comments * Don't rely on empty list behaviour with combobox editor * Add temporary fix to prevent wx test interactions * Add set editor tests (#838) * Add set editor tests * Simplify helper functions * Add wx tests for set editor * Add issue reference to FIXME * Address review comments * Expand ordered flag tests * Add image enum editor tests (#845) * Add tests for image enum editor * Docstring fixes * Address review comments * Skip tests that don't cleanup properly due to editor issue * Remove unreliable image_cache checks * Skip problematic tests on linux * Address review comments * Move value mapping from factory to individual editors (#848) * Move value mapping from factory to individual editors * Remove factory mapping references from image enum editor * Remove unused wx helper function * Address review comments * Remove test FIXMEs * Use instantiated tookit * Merge pull request #850 from enthought/fix-demo-app-description-for-folder Fix Demo application description if __init__.py or traits_ui_demo.jpg are not found * BUG: Correctly implement auto-add functionality in ListStrModel. (#860) * Move format_func, format_str and invalid traits from factory to editor (#859) * Move format_func and format_str from factory to editor * Move invalid from factory to editor as invalid_trait_name * Merge pull request #871 from enthought/fix/segfault-row-reorder FIX: Make sure new_row is positive * Merge pull request #873 from enthought/maint-tabular-model Maint: Normalize row index in TabularModel * Make sure all UI in tests are disposed (#865) * Dispose ui in test_visible_when_layout * Wrap test with create_ui, and store_exceptions_on_all_threads * Dispose ui and wrap it under store_exceptions... for test_ui * Use create_ui in test_color_column * Wrap tests with create_ui and store_exceptions_on_all_threads * Dispose ui in test_actions * Consistently dispose UI with create_ui in test_code_editor * Skip two tests on wx that fail on its own * Dispose UI in test_table_editor; these tests are failing on their own * Remove skips; it was the developer's fault in not refreshing their devenv * Dispose UI in test_csv_editor * Make sure dispose must be called in test_date_editor * Make sure dispose is called in test_date_range_editor * Make sure dispose is called in test_datetime_editor * Dispose ui in test_instance_editor * Dispose ui in test_liststr_editor_selection * Dispose ui in test_range_editor_spinner * Dispose ui in test_range_editor_text * Dispose ui in test_tree_editor * Dispose UI in test_tuple_editor * One more in test_data_frame_editor * Remove additional store_exceptions_on_all_threads as they are orthogonal changes * Experiment removing skips that were added due to test interactions * Revert "Experiment removing skips that were added due to test interactions" This reverts commit 7466c03. * Try removing another workaround * Revert "Try removing another workaround" This reverts commit 090c75c. * Revert inconsequential change to test_color_column * Add close back just because it was there before - not sure if it is still needed. * Add more TabularEditor tests (#874) * Add more tests for Tabular Editor * Minor wx TabularEditor fix * Add brief explanation about Rows flag * Add more ListStrEditor tests (#869) * Add more tests for ListStrEditor * Minor wx ListStrEditor fix * Add gui.process_events to fix pyface2 errors * Rename TestListStrEditor with adapter test to TestListStrAdapter * Add docstrings and clarification comments * Skip tests on Windows due to potential test interactions * Fix clear_selection usage * Fix bad TraitListEvent in ListStr and Tabular Editors (#875) * Fix bad TraitListEvent in ListStr and Tabular Editors * Remove test FIXMEs * Fix unexpected format_func in RangeEditor bug (#900) * Accept format_func, format_str and invalid parameters with RangeEditor * Add a test to verify same behaviour * Use kwargs in the signature * Alternative fix to TabularAdapter crashes when column number reduces (#897) Co-authored-by: Federico Miorelli <FedeMiorelli@users.noreply.github.com> * Fix eerror when the columns number is reduced * Workaround slot being called after the UI is disconnected * destroy control (later) in dispose to prevent slots being called after dispose * Revert "destroy control (later) in dispose to prevent slots being called after dispose" This reverts commit 8bb6abd. * Fix issue number in comment * Update test name and comments * Rework test comment * Rewrite comment and run process_events so that bug appears independently of the workaround * Add links from TabularEditor and TreeEditor to adapter docs (#917) * Add links from TabularEditor and TreeEditor to adapter docs * Fix tree node ref * Fix Theme pickling (#915) * Check toolkit before wx import + tests * Address review comments * Merge pull request #846 from enthought/maint-test-non-null-toolkit-layout-labels TST: Add tests for layout and labels using any non-null toolkits (cherry picked from commit 4398b3d) Co-authored-by: Ieva <ievacerny@users.noreply.github.com> Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com> Co-authored-by: Robert Kern <rkern@enthought.com> Co-authored-by: Kit Yan Choi <kchoi@enthought.com>
This was referenced Jul 9, 2020
kitchoi
added a commit
that referenced
this pull request
Jul 10, 2020
…st should pass with traits >= 6.1.0
kitchoi
added a commit
that referenced
this pull request
Jul 10, 2020
* Add a test for #790 (they are now passing with traits 6.0 and 6.1) * Add two failing tests for #983 * Revert "Move format_func, format_str and invalid traits from factory to editor (#859)" This reverts commit 0617cea. * Skip the test that will fail on traits<6.1.0 after reverting #859. Test should pass with traits >= 6.1.0 * Fix a comment in tests
kitchoi
added a commit
that referenced
this pull request
Jul 10, 2020
* Add a test for #790 (they are now passing with traits 6.0 and 6.1) * Add two failing tests for #983 * Revert "Move format_func, format_str and invalid traits from factory to editor (#859)" This reverts commit 0617cea. * Skip the test that will fail on traits<6.1.0 after reverting #859. Test should pass with traits >= 6.1.0 * Fix a comment in tests
kitchoi
added a commit
that referenced
this pull request
Jul 10, 2020
* Fix invalid value in Item not being used (#985) * Add a test for #790 (they are now passing with traits 6.0 and 6.1) * Add two failing tests for #983 * Revert "Move format_func, format_str and invalid traits from factory to editor (#859)" This reverts commit 0617cea. * Skip the test that will fail on traits<6.1.0 after reverting #859. Test should pass with traits >= 6.1.0 * Fix a comment in tests * Update changelog accordingly
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #790 (by addressing points 2 and 3)
Moves
format_func
,format_str
fromeditor_factory.py
toeditor.py
and movesstring_value
conversion back toeditor.py
. Also movesinvalid
fromeditory_factory.py
toeditor.py
where it is renamed toinvalid_trait_name
.All three traits can still be set via the factory and
Item
specification, but for the sake of using them the traits oneditor
should be used instead (they should be the source of truth).Note: there are no unit tests for
invalid
trait. To test it I usedtext_editor_invalid.py
integration test.