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

Skip to content

Conversation

@mpsonntag
Copy link
Contributor

@mpsonntag mpsonntag commented Apr 17, 2023

The rdflib library version upgrade from 5 to 6 introduced breaking changes and dropped support for Python versions < 3.7.

This PR

  • updates the relevant codebase of the odml library to work with rdflib version 6+ on default installation with Python versions 3.7+.
  • additionally the odml library still supports an installation with Python versions < 3.7 pinning the rdflib version to 5.0.0, but informs on installation and usage that both Python version and rdflib version are outdated, this installation is untested and both Python and rdflib version should be upgraded to a more recent distribution.
  • CI tests for Python 3.5 and 3.6 are removed.
  • installation tests for Python 3.5 and 3.6 via the scripts/release_test scripts are still available and functional to check basic installation and usage of the odml library for all Python versions 3.5 - 3.10 for installation from source and package installation from PyPITest and PyPI proper.
  • the content of info.json is updated to reflect the officially supported Python versions and the odml package version number is updated to v1.5.3.
  • the CI build matrices now also include Python 3.11.

Also successfully tested a package release on Test PyPI including installation of the odmltools and nixodmlconverter packages.

The handling of RDF Seq items has changed from rdflib
version 5 to 6. The intruduced changes support both
library versions.
When saving odml values to an RDF file, use the rdflib version 6+
handling as the default handling.
Remove the rdflib 5.0.0 pin and upgrade to the latest rdflib
distribution. Also upgrade dependent test library owlrl and
remove the pinned pyparsing version that rdflib 5.0.0 was
dependent on.
The rdflib dependency requires Python 3.7+. Update the "untested package"
notice on install from Python < 3.6 to < 3.7.
The rdflib > 6.0.0 requires Python 3.7. The introduced changes
still support the odml package installation with a Python version
< 3.7 and an rdflib version pinned to 5.0.0.
Remove tests for Python < 3.7 due to updated rdflib version.
Remove tests for Python < 3.7 due to updated rdflib version.
@coveralls
Copy link

coveralls commented Apr 17, 2023

Coverage Status

Coverage: 80.747% (-0.4%) from 81.134% when pulling f4037bd on mpsonntag:updateRDFlib into a5e6f12 on G-Node:master.

@achilleas-k achilleas-k self-requested a review April 17, 2023 14:19
@codecov-commenter
Copy link

codecov-commenter commented Apr 18, 2023

Codecov Report

Merging #419 (007222b) into master (a5e6f12) will decrease coverage by 0.26%.
The diff coverage is 43.13%.

@@            Coverage Diff             @@
##           master     #419      +/-   ##
==========================================
- Coverage   91.27%   91.02%   -0.26%     
==========================================
  Files          64       64              
  Lines        8942     8965      +23     
==========================================
- Hits         8162     8160       -2     
- Misses        780      805      +25     
Impacted Files Coverage Δ
setup.py 0.00% <0.00%> (ø)
test/test_rdf_writer.py 100.00% <ø> (ø)
odml/tools/rdf_converter.py 86.71% <43.24%> (-6.70%) ⬇️
test/test_rdf_reader.py 97.82% <71.42%> (-2.18%) ⬇️
odml/__init__.py 71.05% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

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

LGTM in general. Couple of small comments.

print("Could not parse rdflib version %s" % rdflib_version)
return 0
elif not version_split[0].isdigit():
print("Could not parse rdflib version %s" % rdflib_version)
Copy link
Member

Choose a reason for hiding this comment

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

If this is printed, the next line will cause an exception. Is that what we want? Should it instead return 0 like above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, this should probably return 0 as well.

README.md Outdated
## Previous Python versions

Python 2 has reached end of life. We will not keep any future versions of odml Python 2 compatible and will completely drop support for Python 2 with August 2020. We also recommend using a Python version >= 3.6. If a Python version < 3.6 is a requirement, the following dependency needs to be installed as well:
Python 2 has reached end of life. We will not keep any future versions of odml Python 2 compatible and will drop support for Python 2 with August 2020. We also recommend using a Python version >= 3.7. If a Python version < 3.7 is a requirement, the following dependency needs to be installed as well:
Copy link
Member

Choose a reason for hiding this comment

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

Could change the tense here for Python 2 since it's been almost 3 years to say:

Python 2 has reached end of life. Current and future versions of odml are not Python 2 compatible. We removed support for Python 2 in August 2020 with version x.y.z.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very good suggestion, will change it in readthedocs as well.

Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

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

👍

@achilleas-k achilleas-k merged commit 054e8a3 into G-Node:master May 2, 2023
@mpsonntag mpsonntag deleted the updateRDFlib branch May 2, 2023 13:36
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.

4 participants