Skip to content

Commit 88bc9e8

Browse files
committed
Merge branch 'modernising' into dev
2 parents ddcebf5 + 8edf2c1 commit 88bc9e8

12 files changed

+105
-116
lines changed

.bumpversion.cfg

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[bumpversion]
2+
current_version = 2.0.1
3+
commit = True
4+
tag = True
5+
tag_name = {new_version}
6+
7+
[bumpversion:file:src/prov/__init__.py]

.github/workflows/CI.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
18+
python-version: ["3.9", "3.10", "3.11", "3.12"]
1919

2020
steps:
2121
- uses: actions/checkout@v4

.readthedocs.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
version: 2
22

33
build:
4-
os: ubuntu-22.04
5-
tools:
6-
python: "3.12"
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.12"
77

88
sphinx:
9-
configuration: docs/conf.py
9+
configuration: docs/conf.py
1010

1111
formats: all
1212

1313
python:
14-
install:
15-
- requirements: requirements.txt
14+
install:
15+
- path: .
16+
extra_requirements:
17+
- xml
18+
- rdf
19+

CONTRIBUTING.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ Ready to contribute? Here's how to set up `prov` for local development.
6868
$ cd prov/
6969
$ pip install -r requirements-dev.txt
7070

71+
(NOTE: To be updated. The above step is no longer correct.)
72+
7173
4. Create a branch for local development::
7274

7375
$ git checkout -b name-of-your-bugfix-or-feature
@@ -97,8 +99,6 @@ Before you submit a pull request, check that it meets these guidelines:
9799
2. If the pull request adds functionality, the docs should be updated. Put
98100
your new functionality into a function with a docstring, and add the
99101
feature to the list in README.rst.
100-
3. The pull request should work for Python 3.6+ and for PyPy3.
101-
Check https://travis-ci.org/trungdong/prov/pull_requests
102-
and make sure that the tests pass for all supported Python versions.
103-
(See `pyenv <https://github.com/yyuu/pyenv>`_ for help on setting up
104-
multiple versions of Python locally for testing.)
102+
3. The pull request should work for Python 3.9+ and for PyPy3.
103+
Look for the automated checks at the bottom of your pull request and make sure that
104+
the tests pass for all supported Python versions.

HISTORY.rst

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
History
44
-------
55

6+
New changes
7+
^^^^^^^^^^^
8+
* Removed support for EOL Python 3.8
9+
610
2.0.1 (2024-06-10)
711
^^^^^^^^^^^^^^^^^^
812
* Removed support for EOL Python 3.6 and 3.7
913
* Minor documentation update (#153)
10-
* Stopped using deepcopy when duplicating Namespace (#158
11-
* Restricting rdflib package version to "<7" (#156
14+
* Stopped using deepcopy when duplicating Namespace (#158)
15+
* Restricting rdflib package version to "<7" (#156)
1216
* Raise an exception when an empty URI is registered as a namespace (#142)
1317
* Ensure rdflib 6+ returns bytes when serializing tests (fixed #151)
1418
* Removed fancy label output for bundle

pyproject.toml

+68-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,77 @@
1+
[project]
2+
name = "prov"
3+
dynamic = ["version"]
4+
description = "A library for W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)"
5+
readme = "README.rst"
6+
authors = [
7+
{ name = "Trung Dong Huynh", email = "[email protected]" }
8+
]
9+
keywords = ["provenance", "graph", "model", "PROV", "PROV-DM", "PROV-JSON", "W3C", "PROV-XML", "PROV-N", "PROV-O", "RDF"]
10+
license = {file = "LICENSE"}
11+
classifiers = [
12+
"Development Status :: 4 - Beta",
13+
"Intended Audience :: Developers",
14+
"Intended Audience :: Information Technology",
15+
"License :: OSI Approved :: MIT License",
16+
"Natural Language :: English",
17+
"Operating System :: OS Independent",
18+
"Programming Language :: Python :: 3",
19+
"Programming Language :: Python :: 3.9",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: 3.11",
22+
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3 :: Only",
24+
"Programming Language :: Python :: Implementation :: CPython",
25+
"Programming Language :: Python :: Implementation :: PyPy",
26+
"Topic :: Scientific/Engineering :: Information Analysis",
27+
"Topic :: Security",
28+
"Topic :: System :: Logging",
29+
]
30+
requires-python = ">=3.9"
31+
dependencies = [
32+
"networkx>=2.0",
33+
# Supporting graphic outputs (e.g. PNG, SVG, PDF) - a local graphviz is required
34+
"pydot>=1.2.0",
35+
"python-dateutil>=2.2", # TODO: is this really needed?
36+
]
37+
38+
[project.optional-dependencies]
39+
rdf = [
40+
"rdflib>=4.2.1,<7",
41+
]
42+
xml = [
43+
"lxml>=3.3.5",
44+
]
45+
46+
[project.urls]
47+
Homepage = "https://github.com/trungdong/prov"
48+
Documentation = "https://prov.readthedocs.io"
49+
Repository = "https://github.com/trungdong/prov"
50+
Issues = "https://github.com/trungdong/prov/issues"
51+
Changelog = "https://prov.readthedocs.io/en/latest/history.html"
52+
153
[build-system]
254
requires = ["setuptools>=40.8.0", "wheel"] # PEP 508 specifications.
355
build-backend = "setuptools.build_meta"
456

57+
[tool.setuptools.dynamic]
58+
version = {attr = "prov.__version__"}
59+
60+
[dependency-groups]
61+
dev = [
62+
"black>=24.10.0",
63+
"bumpversion>=0.6.0",
64+
"coverage>=7.6.10",
65+
"flake8>=7.1.1",
66+
"setuptools>=75.8.0",
67+
"sphinx>=8.1.3",
68+
"tox>=4.23.2",
69+
"wheel>=0.45.1",
70+
]
71+
572
[tool.black]
673
line-length = 88
7-
target-version = ['py36']
74+
target-version = ["py39", "py310", "py311", "py312"]
875
include = '\.pyi?$'
976
exclude = '''
1077
(

requirements-dev.txt

-8
This file was deleted.

requirements.txt

-5
This file was deleted.

setup.cfg

-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
[bumpversion]
2-
current_version = 2.0.1
3-
commit = True
4-
tag = True
5-
tag_name = {new_version}
6-
7-
[bumpversion:file:setup.py]
8-
9-
[bumpversion:file:src/prov/__init__.py]
10-
11-
[metadata]
12-
description-file = README.rst
13-
141
[flake8]
152
max-line-length = 88
163
extend-ignore = E203, W503

setup.py

+1-70
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,5 @@
1-
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
3-
4-
from setuptools import setup, find_packages
5-
import pathlib
6-
7-
here = pathlib.Path(__file__).parent.resolve()
8-
9-
long_description = (here / "README.rst").read_text(encoding="utf-8")
10-
11-
requirements = ["python-dateutil>=2.2", "networkx>=2.0", "lxml>=3.3.5", "rdflib>=4.2.1,<7"]
12-
13-
test_requirements = ["pydot>=1.2.0"]
1+
from setuptools import setup
142

153
setup(
16-
name="prov",
17-
version="2.0.1",
18-
description="A library for W3C Provenance Data Model supporting PROV-JSON, "
19-
"PROV-XML and PROV-O (RDF)",
20-
long_description=long_description,
21-
author="Trung Dong Huynh",
22-
author_email="[email protected]",
23-
url="https://github.com/trungdong/prov",
24-
project_urls={
25-
"Bug Reports": "https://github.com/trungdong/prov/issues",
26-
"Source": "https://github.com/trungdong/prov",
27-
},
28-
packages=find_packages(where="src"),
29-
package_dir={"": "src"},
30-
python_requires=">=3.6, <4",
314
scripts=["scripts/prov-convert", "scripts/prov-compare"],
32-
include_package_data=True,
33-
install_requires=requirements,
34-
extras_require={
35-
"dot": ["pydot>=1.2.0"],
36-
},
37-
license="MIT",
38-
zip_safe=False,
39-
keywords=[
40-
"provenance",
41-
"graph",
42-
"model",
43-
"PROV",
44-
"PROV-DM",
45-
"PROV-JSON",
46-
"W3C",
47-
"PROV-XML",
48-
"PROV-N",
49-
"PROV-O",
50-
"RDF",
51-
],
52-
classifiers=[
53-
"Development Status :: 4 - Beta",
54-
"Intended Audience :: Developers",
55-
"Intended Audience :: Information Technology",
56-
"License :: OSI Approved :: MIT License",
57-
"Natural Language :: English",
58-
"Operating System :: OS Independent",
59-
"Programming Language :: Python :: 3",
60-
"Programming Language :: Python :: 3.8",
61-
"Programming Language :: Python :: 3.9",
62-
"Programming Language :: Python :: 3.10",
63-
"Programming Language :: Python :: 3.11",
64-
"Programming Language :: Python :: 3.12",
65-
"Programming Language :: Python :: 3 :: Only",
66-
"Programming Language :: Python :: Implementation :: CPython",
67-
"Programming Language :: Python :: Implementation :: PyPy",
68-
"Topic :: Scientific/Engineering :: Information Analysis",
69-
"Topic :: Security",
70-
"Topic :: System :: Logging",
71-
],
72-
test_suite="prov.tests",
73-
tests_require=test_requirements,
745
)

src/prov/tests/test_dot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
import unittest
77

88
# Skipping SVG tests if pydot is not installed
9-
from pkgutil import find_loader
9+
from importlib.util import find_spec
1010

11-
if find_loader("pydot") is not None:
11+
if find_spec("pydot") is not None:
1212

1313
from prov.dot import prov_to_dot
1414
from prov.tests.test_model import AllTestsBase

tox.ini

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = python3.8, python3.9, python3.10, python3.11, python3.12, pypy3
2+
envlist = python3.9, python3.10, python3.11, python3.12, pypy3
33

44
# Define the minimal tox version required to run;
55
# if the host tox is less than this the tool with create an environment and
@@ -16,9 +16,11 @@ isolated_build = true
1616
setenv =
1717
PYTHONPATH = {toxinidir}:{toxinidir}/src/prov
1818
commands =
19-
check-manifest --ignore 'tox.ini,.coveragerc,.editorconfig,tests/**,cla/**,requirements*.txt,Makefile,.readthedocs.yml'
19+
check-manifest --ignore 'tox.ini,.bumpversion.cfg,.coveragerc,.editorconfig,tests/**,cla/**,Makefile,.readthedocs.yml'
2020
python setup.py check -m -r -s
21-
python setup.py test
21+
python -m unittest discover -s src/
2222
deps =
2323
check-manifest >= 0.42
2424
readme_renderer
25+
rdflib>=4.2.1,<7
26+
lxml>=3.3.5

0 commit comments

Comments
 (0)