-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Parser and converter refactoring I #220
Merged
Merged
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
Remove usage of "_xml_content" which has already been removed with PR G-Node#66.
Add file as a first step to disentangle the various parsers and converters.
First step to remove those pesky cyclic import errors.
Removes the conversion odML -> python dict from the ODMLWriter class and uses DictWriter instead to further the disentanglement of parser code in this file.
- remove unused code - use 'with' statement for file handling
Closes G-Node#199
achilleas-k
approved these changes
Jan 25, 2018
achilleas-k
approved these changes
Jan 25, 2018
# for free
to join this conversation on GitHub.
Already have an account?
# 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.
With the merge of the RDF branch into master, the branch now contains all parsers and converters in the same branch. The parallel development of converters and the odML data format change from v1.0 to v1.1 has lead to dead code, inconsistencies and circular imports. This PR is the first step to reconciling and cleaning up code.
This PR
DictParser
class, that converts Python dictionary data to odML data and vice versa. Also removes the corresponding parsing code fromodmlparser
. With this change,odmlparser
is now just a clean switch relaying the actual parsing to the different appropriate parsing classes w/o doing any parsing of its own. This is also required to reduce the number of potential circular imports.ParserException
andSUPPORTED_PARSERS
totools/parser_utils
and uses them consistently throughout the project to a) define them only once and b) reduce the number of potential circular imports.circumvents previous circular import errors in
odmlparser
.format.py
to provide getter for all private attributes and consistently use them throughout the project.RDFReader.write
method.ODMLWriter
that RDF is not yet supported to avoid crashing later on.xmlparser
.jsonparser
; closes Remove jsonparser #219.