Format code examples in the user documentation#1640
Conversation
modified: docs/source/traitsui_user_manual/adapters.rst modified: docs/source/traitsui_user_manual/advanced_view.rst modified: docs/source/traitsui_user_manual/custom_view.rst modified: docs/source/traitsui_user_manual/factories_advanced_extra.rst modified: docs/source/traitsui_user_manual/factories_basic.rst modified: docs/source/traitsui_user_manual/factory_intro.rst modified: docs/source/traitsui_user_manual/handler.rst modified: docs/source/traitsui_user_manual/view.rst
and literalinclude the example files in the documentation rather than manually duplicating the information in the docs again this commit only moves examples and removes duplicates from factory intro new file: docs/source/traitsui_user_manual/examples/default_trait_editors.py new file: docs/source/traitsui_user_manual/examples/mixed_styles.py modified: docs/source/traitsui_user_manual/factory_intro.rst deleted: examples/tutorials/doc_examples/examples/default_trait_editors.py deleted: examples/tutorials/doc_examples/examples/mixed_styles.py
new file: docs/source/traitsui_user_manual/examples/array_editor.py modified: docs/source/traitsui_user_manual/factories_basic.rst deleted: examples/tutorials/doc_examples/examples/array_editor.py
new file: docs/source/traitsui_user_manual/examples/enum_editor.py modified: docs/source/traitsui_user_manual/factories_basic.rst deleted: examples/tutorials/doc_examples/examples/enum_editor.py
modified: docs/source/traitsui_user_manual/examples/array_editor.py
new file: docs/source/traitsui_user_manual/examples/instance_editor_selection.py modified: docs/source/traitsui_user_manual/factories_basic.rst deleted: examples/tutorials/doc_examples/examples/instance_editor_selection.py
new file: docs/source/traitsui_user_manual/examples/key_bindings.py modified: docs/source/traitsui_user_manual/factories_advanced_extra.rst deleted: examples/tutorials/doc_examples/examples/key_bindings.py
new file: docs/source/traitsui_user_manual/examples/tree_editor.py modified: docs/source/traitsui_user_manual/factories_advanced_extra.rst deleted: examples/tutorials/doc_examples/examples/tree_editor.py
modified: docs/source/traitsui_user_manual/custom_view.rst new file: docs/source/traitsui_user_manual/examples/wizard.py modified: examples/tutorials/doc_examples/examples/configure_traits_view_buttons.py deleted: examples/tutorials/doc_examples/examples/wizard.py
modified: docs/source/traitsui_user_manual/advanced_view.rst new file: docs/source/traitsui_user_manual/examples/default_traits_view.py new file: docs/source/traitsui_user_manual/examples/multiple_views.py deleted: examples/tutorials/doc_examples/examples/default_traits_view.py deleted: examples/tutorials/doc_examples/examples/multiple_views.py
modified: docs/source/traitsui_user_manual/advanced_view.rst new file: docs/source/traitsui_user_manual/examples/multi_object_view.py deleted: examples/tutorials/doc_examples/examples/multi_object_view.py
new file: docs/source/traitsui_user_manual/examples/configure_traits_view_group.py modified: docs/source/traitsui_user_manual/view.rst deleted: examples/tutorials/doc_examples/examples/configure_traits_view_group.py
new file: docs/source/traitsui_user_manual/examples/configure_traits_view.py modified: docs/source/traitsui_user_manual/view.rst deleted: examples/tutorials/doc_examples/examples/configure_traits_view.py
Also move the configure_traits_view_buttons file - which i missed before renamed: examples/tutorials/doc_examples/examples/configure_traits_view_buttons.py -> docs/source/traitsui_user_manual/examples/configure_traits_view_buttons.py new file: docs/source/traitsui_user_manual/examples/handler_override.py modified: docs/source/traitsui_user_manual/handler.rst deleted: examples/tutorials/doc_examples/examples/handler_override.py
modified: integrationtests/test_all_examples.py
modified: docs/source/traitsui_user_manual/custom_view.rst modified: docs/source/traitsui_user_manual/factories_basic.rst modified: docs/source/traitsui_user_manual/view.rst
|
another "illegal instruction" related segfault |
|
@aaronayres35 i'm unable to find the exact issue where we're keeping track of the test failures |
|
xref: #1551 |
aaronayres35
left a comment
There was a problem hiding this comment.
LGTM
I think some of these examples can be pulled up into examples/demo/StandardEditors, but that can be done separately.
Also a few nit picky comments
| # | ||
| # Thanks for using Enthought open source! | ||
|
|
||
| # tree_editor.py -- Example of a tree editor |
There was a problem hiding this comment.
maybe this should end up in traitsui/examples/demo/StandardEditors eventually. Same with many of the others.
There was a problem hiding this comment.
i don't know if there already exists a tree editor (or an array editor) example in "StandardEditors" but yeah, these can be moved there.
There was a problem hiding this comment.
correction - there already exists a "TreeEditor_demo" which is more or less a copy of this file - and the differences need to be reconciled and then this file can probably be removed.
| @@ -1,39 +0,0 @@ | |||
| # Copyright (c) 2007, Enthought, Inc. | |||
There was a problem hiding this comment.
Looks like these examples are getting deleted in this PR
There was a problem hiding this comment.
nope. this array_editor example got moved to docs\source\traitsui_user_manual\examples\array_editor.py. In some cases, git recognizes that I simply moved the file and made some changes. In other cases, git doesn't recognize this and thinks i deleted some files and created some from scratch - coincidentally with almost the same content.
| @@ -0,0 +1,42 @@ | |||
| # (C) Copyright 2004-2021 Enthought, Inc., Austin, TX | |||
There was a problem hiding this comment.
This should almost definitely end up in traitsui/examples/demo/StandardEditors
after creating it first modified: docs/source/traitsui_user_manual/advanced_view.rst new file: docs/source/traitsui_user_manual/examples/default_traits_view2.py
modified: docs/source/traitsui_user_manual/examples/enum_editor.py
This PR formats/cleans up the code examples in the traitsui user documentation. The code examples used to live in the root-level directory
\examples\tutorials\doc_examples\and the relevant ones have now been moved to\docs\source\traitsui_user_manual\examples. At the moment, none of the examples inexamples\tutorials\doc_examplesare used - and will be removed in a future PR. The moved examples have been formatted/cleaned up.