-
Notifications
You must be signed in to change notification settings - Fork 30
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
General updates and PEP8 code cleanup #385
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.
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_name
attribute. This closes issue [Document] Add '_origin_file_name' accessor methods #358.odml.tools.converters.VersionConverter
toodml.tools.parser_utils.ParserException
. This closes issue [VersionConverter] Specify Exception in 'convert' method #359.test/test_terminology.py
and adds a test for theterminology.refresh
method.odml.Property.export_leaf
method to also include sibling properties in the export.pprint
and the addedcardinality
feature and adds a link to thetemplates
hosting site.