Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mpsonntag
Copy link
Contributor

This PR refactors the package structure to reduce the number of import cycles and make various parser classes available via the __init__ files. Command line scripts should be unaffected by the changes.

The PR closes #317 and #333.

This PR includes the following changes

  • a new subdirectory odml.tools.converters is added.
  • format_converter and version_converter are moved into this directory.
  • since odml-ui depends on the version_converter, a dummy file is left at its original location. It imports the VersionConverter class from its new location and prints a deprecation warning.
  • the dict RDFConversionFormats from file tools.utils has been moved to RDF_CONVERSION_FORMATS in file tools.parser_utils and all usages have been switched to the new dict.
  • the dict ConversionFormats from file tools.utils has been moved to the only file its using it, tools.converters.format_converter.
  • the now unused file tools.utils has been removed.
  • a new subdirectory odml.rdf is added and the files fuzzy_finder and query_creator are moved into this directory. Both files provide convenience and additional functions for odML specific RDF and are fairly independent from the rest of the library. Conceptually they are best kept separate from other convenience tools and parsers.

- Created the 'odml.tools.converters' directory.
- Moved format_converter and version_converter to
  new directory.
- Updated setup.py and imports in all affected files.
- Use simplified import of classes where applicable
- Update documentation and docstrings to new package structure
- dict RDFConversionFormats from file 'tools.utils' has been
  moved to RDF_CONVERSION_FORMATS in file 'tools.parser_utils' and
  all usages have been switched to the new dict.
- dict ConversionFormats from file 'tools.utils' has been moved to
  the only file its using it, 'tools.converters.format_converter'.
- The file 'tools.utils' has been removed.
- Docstrings have been updated.
The files fuzzy_finder and query_creater deal with odml specific rdf.
Conceptually they are best kept seperate from other convenience
tools and parsers.
Re-added 'odml.tools.version_converter.py' that imports the
'VersionConverter' class from its new location 'odml.tools.converters'
and prints a deprecation warning. This ensures backwards compatibility
with dependent tools like odml-ui during a grace period.
@coveralls
Copy link

coveralls commented Nov 27, 2019

Coverage Status

Coverage decreased (-0.008%) to 75.113% when pulling 33e1d21 on mpsonntag:refactor into db48012 on G-Node:master.

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.

version converter incorrect hint

3 participants