Skip to content

Commit

Permalink
Merge pull request #415 from mpsonntag/rdfFixes
Browse files Browse the repository at this point in the history
thank you!
  • Loading branch information
jgrewe authored Nov 2, 2021
2 parents 174bc85 + 4c22a8f commit 7591c07
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 11 deletions.
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,20 @@
Used to document all changes from previous releases and collect changes
until the next release.

# Latest

# Dropping Python 2 support
# Version 1.5.2

## Pinning rdflib version to 5.0.0 until further notice

Due to major breaking changes introduced in the upgrade of
rdflib 5.0.0 to 6.0.0, the rdflib version is pinned to 5.0.0
until the breaking code has been fixed.

## Dropping Python 2 support

Python 2 has reached end of life. The codebase has been cleaned from Python 2 and Python 3 compatible code, all tests now run exclusively on Python 3 versions.

# Features
## Features
- `odml.save` and `odmlparser.ODMLWriter` now support additional keywords. See issue #402 and PR #403 for details.


Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2011-2018, German Neuroinformatics Node (G-Node)
Copyright (c) 2011-2021, German Neuroinformatics Node (G-Node)

All rights reserved.

Expand Down
13 changes: 12 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ environment:
- PYTHON: "C:\\Python38"
PYVER: 3
BITS: 32
- PYTHON: "C:\\Python39"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
PYVER: 3
BITS: 32
- PYTHON: "C:\\Python36-x64"
PYVER: 3
BITS: 64
Expand All @@ -22,6 +26,10 @@ environment:
- PYTHON: "C:\\Python38-x64"
PYVER: 3
BITS: 64
- PYTHON: "C:\\Python39-x64"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
PYVER: 3
BITS: 64

init:
- "ECHO %PYTHON% %vcvars% (%bits%)"
Expand All @@ -37,4 +45,7 @@ install:

test_script:
- python --version
- python -m pytest -v
- python -m pytest -v -k "not handle_include and not handle_repository"
# appveyor issues with SSL certificates; deactivating the affected tests,
# since they run fine on GH actions Windows builds.
# - python -m pytest -v
3 changes: 2 additions & 1 deletion odml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def _format_warning(warn_msg, *args, **kwargs):
warnings.formatwarning = _format_warning

if _python_version.major < 3:
msg = "Python 2 has been deprecated.\n\todML support for Python 2 will be dropped August 2020."
msg = "Python 2 has reached end of live."
msg += "\n\todML support for Python 2 has been dropped."
warnings.warn(msg, category=DeprecationWarning, stacklevel=2)
elif _python_version.major == 3 and _python_version.minor < 6:
msg = "The '%s' package is not tested with your Python version. " % __name__
Expand Down
5 changes: 3 additions & 2 deletions odml/info.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"VERSION": "1.5.1",
"VERSION": "1.5.2",
"FORMAT_VERSION": "1.1",
"AUTHOR": "Hagen Fritsch, Jan Grewe, Christian Kellner, Achilleas Koutsou, Michael Sonntag, Lyuba Zehl",
"COPYRIGHT": "(c) 2011-2020, German Neuroinformatics Node",
"COPYRIGHT": "(c) 2011-2021, German Neuroinformatics Node",
"CONTACT": "[email protected]",
"HOMEPAGE": "https://github.com/G-Node/python-odml",
"CLASSIFIERS": [
Expand All @@ -11,6 +11,7 @@
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License"
Expand Down
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pytest
owlrl
owlrl==5.2.3
requests
18 changes: 16 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import json
import os

from sys import version_info as _python_version

try:
from setuptools import setup
except ImportError as ex:
Expand Down Expand Up @@ -31,9 +33,11 @@

# pyparsing needs to be pinned to 2.4.7 for the time being. setup install fetches a pre-release
# package that currently results in issues with the rdflib library.
install_req = ["lxml", "pyyaml>=5.1", "rdflib", "docopt", "pathlib", "pyparsing==2.4.7"]
install_req = ["lxml", "pyyaml>=5.1", "rdflib==5.0.0", "docopt", "pathlib", "pyparsing==2.4.7"]

tests_req = ["pytest", "owlrl", "requests"]
# owlrl depends on rdflib - the pinned version should be removed once the version pin has also been
# removed from rdflib. Also needs to be updated in requirements-test.txt
tests_req = ["pytest", "owlrl==5.2.3", "requests"]

setup(
name='odML',
Expand All @@ -56,3 +60,13 @@
'odmlconvert=odml.scripts.odml_convert:main',
'odmlview=odml.scripts.odml_view:main']}
)

# Make this the last thing people read after a setup.py install
if _python_version.major < 3:
msg = "Python 2 has reached end of live."
msg += "\n\todML support for Python 2 has been dropped."
print(msg)
elif _python_version.major == 3 and _python_version.minor < 6:
msg = "\n\nThis package is not tested with your Python version. "
msg += "\n\tPlease consider upgrading to the latest Python distribution."
print(msg)

0 comments on commit 7591c07

Please sign in to comment.