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

Address warnings when parsing demo docstrings #1378

Merged
merged 1 commit into from Oct 19, 2020

Conversation

rahulporuri
Copy link
Contributor

fixes #1126

This PR fixes issues that arise when parsing the demo module docstrings - displayed in the etsdemo application.

	modified:   traitsui/examples/demo/Advanced/Auto_update_TabularEditor_demo.py
	modified:   traitsui/examples/demo/Advanced/Dynamic_EnumEditor_demo.py
	modified:   traitsui/examples/demo/Advanced/Dynamic_range_trait_and_editor.py
	modified:   traitsui/examples/demo/Advanced/Popup_Dialog_demo.py
	modified:   traitsui/examples/demo/Advanced/Tabular_editor_demo.py
	modified:   traitsui/examples/demo/Standard_Editors/File_Dialog/File_Open_with_ImageInfo_Extension.py
	modified:   traitsui/examples/demo/Standard_Editors/File_Dialog/File_Open_with_TextInfo_Extension.py
	modified:   traitsui/examples/demo/Standard_Editors/SetEditor_demo.py
	modified:   traitsui/examples/demo/Standard_Editors/TreeEditor_demo.py
Comment on lines +26 to +28
- The key point of the demo is the use of the 'name' trait in the EnumEditor
definition, which links the list of available entrees from the
KitchenCapabilities object to the OrderMenu object's entree EnumEditor.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these weren't raising warnings but they did have an awkward indentation.

Comment on lines +40 to +42
- The dynamic range trait is the 'temperature' trait in the Guest class. It
depends upon traits defined both in the Guest instance as well as in the
containing Hotel object.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these were also not raising warnings but like with the other comment, these had an awkward indentation.

@@ -55,39 +55,39 @@
- If the demo is running under QT, you can move rows by clicking and dragging.

Hopefully, this simple example conveys some of the power and flexibility that
the :py:class:`TabularAdapter` class provides you. But, just in case it
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The :py:class: (and other :py:*: tags) don't work in the standalone etsdemo application because the code has no access to documentation.

Comment on lines +10 to +12
- Company
- Department
- Employee
Copy link
Contributor Author

Choose a reason for hiding this comment

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

without proper indentation, this was raising warnings, which is fixed by adding tabs for indentation.

Copy link
Contributor

@aaronayres35 aaronayres35 left a comment

Choose a reason for hiding this comment

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

Changes LGTM!
I didn't see any warnings when running the application

@rahulporuri rahulporuri added the need backport to maint/* PRs that need to be backported to a maintenance branch label Oct 19, 2020
@kitchoi kitchoi merged commit f9dfbdc into master Oct 19, 2020
@kitchoi kitchoi deleted the fix/docstring-issues-in-demos branch October 19, 2020 12:36
kitchoi pushed a commit that referenced this pull request Oct 19, 2020
modified:   traitsui/examples/demo/Advanced/Auto_update_TabularEditor_demo.py
	modified:   traitsui/examples/demo/Advanced/Dynamic_EnumEditor_demo.py
	modified:   traitsui/examples/demo/Advanced/Dynamic_range_trait_and_editor.py
	modified:   traitsui/examples/demo/Advanced/Popup_Dialog_demo.py
	modified:   traitsui/examples/demo/Advanced/Tabular_editor_demo.py
	modified:   traitsui/examples/demo/Standard_Editors/File_Dialog/File_Open_with_ImageInfo_Extension.py
	modified:   traitsui/examples/demo/Standard_Editors/File_Dialog/File_Open_with_TextInfo_Extension.py
	modified:   traitsui/examples/demo/Standard_Editors/SetEditor_demo.py
	modified:   traitsui/examples/demo/Standard_Editors/TreeEditor_demo.py
(cherry picked from commit f9dfbdc)
kitchoi added a commit that referenced this pull request Oct 19, 2020
* Add IsEnabled to the tester api docstring (#1367)

(cherry picked from commit e454a7b)

* Refresh developer command for generating API documentation (#1368)

* Update docs command to autogenerate API documentation source

* Remove source which will now be generated automatically

* Update API index page

* Ignore the generated source directory in .gitignore

(cherry picked from commit 79b9e3c)

* Allow docs command to be run on Windows (#1369)

(cherry picked from commit 8265c31)

* Add a test for traitsui.testing.api (#1370)

* adding a test_api file for traitsui.testing.api

* flake8

* adding comment about ordering of imports in api matching docstring

* not importing from api in internal non-test code

* typo

(cherry picked from commit 382fa8e)

* have test_ListEditor_demo.py use traitsui.testing.api module for imports (#1371)

(cherry picked from commit 7d9d1e1)

* Skip load_tests in API documentation (#1376)

(cherry picked from commit 175c0a1)

* Don't import from traitsui.testing.api in internal editor implementations (#1377)

* not importing from API in internal editor implementations

* alphabetical order imports

* suggested change (typo)

(cherry picked from commit cfa7781)

* FIX : Address SyntaxErrors when parsing demo docs (#1378)

modified:   traitsui/examples/demo/Advanced/Auto_update_TabularEditor_demo.py
	modified:   traitsui/examples/demo/Advanced/Dynamic_EnumEditor_demo.py
	modified:   traitsui/examples/demo/Advanced/Dynamic_range_trait_and_editor.py
	modified:   traitsui/examples/demo/Advanced/Popup_Dialog_demo.py
	modified:   traitsui/examples/demo/Advanced/Tabular_editor_demo.py
	modified:   traitsui/examples/demo/Standard_Editors/File_Dialog/File_Open_with_ImageInfo_Extension.py
	modified:   traitsui/examples/demo/Standard_Editors/File_Dialog/File_Open_with_TextInfo_Extension.py
	modified:   traitsui/examples/demo/Standard_Editors/SetEditor_demo.py
	modified:   traitsui/examples/demo/Standard_Editors/TreeEditor_demo.py
(cherry picked from commit f9dfbdc)

* Update Changelog

* Update deprecation warnings for removing traitsui.image (#1384)

* Update deprecation warnings for removing traitsui.image

* Update message to mention previous plan

(cherry picked from commit 04a7b04)

* Add 'Future removals' section in the changelog

* Sort last names alphabetically

Co-authored-by: aaronayres35 <36972686+aaronayres35@users.noreply.github.com>
Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>
@kitchoi kitchoi removed the need backport to maint/* PRs that need to be backported to a maintenance branch label Oct 19, 2020
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.

"System Message:" warnings/errors in demo descriptions
3 participants