-
Notifications
You must be signed in to change notification settings - Fork 30
General updates and PEP8 code cleanup #385
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
Conversation
Closes G-Node#359 Changed plain Exception in '_parse' to odml.tools.parser_utils.ParserException.
The terminology test was removed since - the test should not depend on an offsite repository. - should be in its own file 'test_terminology'.
Refactors the Property.export_leaf method and the corresponding tests. When exporting a document from a Property the direct parent now also exports all Properties and not just the Property that starts the export.
Reducing the impressive number of pylint warnings; this fixes the following issues: - no-else-raise - consider-using-in - import-outside-toplevel - inconsistent-return-statements - unnecessary-comprehension
This commit fixes the following PEP98 code warnings: - no-else-return - no-else-raise - protected-access (section._merged) - no-self-use (_convert_value_input -> staticmethod)
This commit fixes the following PEP8 code warnings: - function-redefined - no-else-return - no-else-raise - inconsistent-return-statements - no-self-use (staticmethod: _validate_parent)
The terminology refresh test requires a brief sleep between creating the original file and the refresh of the same file to receive different mtimes. On Linux 0.100s is sufficient, macOS requires a time > 0.700ms.
jgrewe
left a comment
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 was a big beast, thanks for the effort
|
|
||
| p2 = Property("test", {"name": "Marie", "name": "Johanna"}) | ||
| self.assertEqual(len(p2), 1) | ||
| prop2 = Property("test", {"name": "Marie"}) |
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.
oh, no, you destroyed the old pun: "Marie Johanna" ;)
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.
I did not even get that one... makes me sad, but I shall be strong and endure it. :p
This large PR adds various updates and general cleanups for simplification and PEP8 compliance.
In detail it
odml.Document.origin_file_nameattribute. This closes issue [Document] Add '_origin_file_name' accessor methods #358.odml.tools.converters.VersionConvertertoodml.tools.parser_utils.ParserException. This closes issue [VersionConverter] Specify Exception in 'convert' method #359.test/test_terminology.pyand adds a test for theterminology.refreshmethod.odml.Property.export_leafmethod to also include sibling properties in the export.pprintand the addedcardinalityfeature and adds a link to thetemplateshosting site.