diff --git a/.github/workflows/skosprovider_rdf.yaml b/.github/workflows/skosprovider_rdf.yaml new file mode 100644 index 0000000..bd5deb8 --- /dev/null +++ b/.github/workflows/skosprovider_rdf.yaml @@ -0,0 +1,38 @@ +name: skosprovider_rdf backend tests +on: + push: + paths: + - skosprovider_rdf/** + - tests/** + - skosprovider_rdf.yaml + - pyproject.toml + - requirements*.txt +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ "3.10", "3.11", "3.12" ] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + # You can test your matrix by printing the current Python version + - name: Display Python version + run: python -c "import sys; print(sys.version)" + + - name: Install python requirements + env: + HATCH_BUILD_NO_HOOKS: true + working-directory: ./ + run: | + pip --version + pip install pip-tools + pip-sync requirements-dev.txt + pip install -e . + + - name: Python tests + run: pytest tests --exitfirst --capture=no -vvv --full-trace diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ae9ee9a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -sudo: false -os: linux -dist: focal -language: python -python: - - "3.8" - - "3.9" - - "3.10" - - "3.11" -install: - - pip install -U setuptools==59.6.0 - - pip install -r requirements.txt - - pip install -U pytest pytest-cov coveralls - - python setup.py develop -script: - py.test --cov skosprovider_rdf --cov-report term-missing tests -after_success: - coveralls diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..89d3bb3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,63 @@ +[build-system] +requires = ["hatchling", "hatch-fancy-pypi-readme"] +build-backend = "hatchling.build" + +[project] +version = "1.3.0" +name = "skosprovider_rdf" +dynamic = ["readme"] +authors = [ + { name = "Flanders Heritage Agency", email = "ict@onroerenderfgoed.be" }, +] +#license = "GPL-3.0-or-later" +description = "skosprovider_rdf" +requires-python = ">=3.10,<3.13" +keywords = ["rdf", "skos", "skosprovider", "vocabularies", "thesauri"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Framework :: Pyramid", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] +dependencies = [ + "skosprovider==1.2.0", + "rdflib==6.2.0", + "html5lib==1.1", +] + +[project.urls] +History = "https://github.com/OnroerendErfgoed/skosprovider_rdf/blob/master/HISTORY.rst" +Tracker = "https://github.com/OnroerendErfgoed/skosprovider_rdf/issues" +Source = "https://github.com/OnroerendErfgoed/skosprovider_rdf" +Documentation = "https://skosprovider_rdf.readthedocs.io/en/latest/" + +[project.optional-dependencies] +dev = [ + "pytest==8.3.3", + "pytest-cov==5.0.0", + "coveralls==4.0.1", +] + +## +# Build tool specific +## +[tool.hatch.build.targets.wheel] +# In the wheel we want to have skosprovider_rdf in the root as python module. +only-include = [ + "/skosprovider_rdf", +] + +[tool.hatch.metadata] +# This allows us to use github links as dependencies +allow-direct-references = true + +[tool.hatch.metadata.hooks.fancy-pypi-readme] +content-type = "text/x-rst" +fragments = [ + { path = "README.rst" }, + { path = "HISTORY.rst" }, +] diff --git a/requirements-dev.txt b/requirements-dev.txt index b1f27f3..03c7e35 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,62 @@ -# Runtime requirements ---requirement requirements.txt - -# Testing -pytest==6.2.5 -pytest-cov==3.0.0 -coveralls==3.3.1 +cachetools==5.5.0 + # via pyld +certifi==2024.8.30 + # via requests +charset-normalizer==3.3.2 + # via requests +coverage==7.6.1 + # via + # coveralls + # pytest-cov +coveralls==4.0.1 + # via skosprovider-rdf (pyproject.toml) +docopt==0.6.2 + # via coveralls +frozendict==2.4.4 + # via pyld +html5lib==1.1 + # via + # skosprovider-rdf (pyproject.toml) + # skosprovider +idna==3.10 + # via requests +iniconfig==2.0.0 + # via pytest +isodate==0.6.1 + # via rdflib +language-tags==1.2.0 + # via skosprovider +lxml==5.3.0 + # via pyld +packaging==24.1 + # via pytest +pluggy==1.5.0 + # via pytest +pyld==2.0.4 + # via skosprovider +pyparsing==3.1.4 + # via rdflib +pytest==8.3.3 + # via + # skosprovider-rdf (pyproject.toml) + # pytest-cov +pytest-cov==5.0.0 + # via skosprovider-rdf (pyproject.toml) +rdflib==6.2.0 + # via skosprovider-rdf (pyproject.toml) +requests==2.32.3 + # via coveralls +rfc3987==1.3.8 + # via skosprovider +setuptools==75.1.0 + # via rdflib +six==1.16.0 + # via + # html5lib + # isodate +skosprovider==1.2.0 + # via skosprovider-rdf (pyproject.toml) +urllib3==2.2.3 + # via requests +webencodings==0.5.1 + # via html5lib diff --git a/requirements.txt b/requirements.txt index 03ef6a5..9ae3865 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,32 @@ -skosprovider==1.2.0 -# -e git+https://github.com/koenedaele/skosprovider.git@DEV_0.7.0#egg=skosprovider -rdflib==6.2.0 +cachetools==5.5.0 + # via pyld +frozendict==2.4.4 + # via pyld html5lib==1.1 + # via + # skosprovider-rdf (pyproject.toml) + # skosprovider +isodate==0.6.1 + # via rdflib +language-tags==1.2.0 + # via skosprovider +lxml==5.3.0 + # via pyld +pyld==2.0.4 + # via skosprovider +pyparsing==3.1.4 + # via rdflib +rdflib==6.2.0 + # via skosprovider-rdf (pyproject.toml) +rfc3987==1.3.8 + # via skosprovider +setuptools==75.1.0 + # via rdflib +six==1.16.0 + # via + # html5lib + # isodate +skosprovider==1.2.0 + # via skosprovider-rdf (pyproject.toml) +webencodings==0.5.1 + # via html5lib diff --git a/setup.py b/setup.py deleted file mode 100644 index b917507..0000000 --- a/setup.py +++ /dev/null @@ -1,54 +0,0 @@ -import os -import sys - -try: - from setuptools import setup, find_packages -except ImportError: - from distutils.core import setup - -here = os.path.abspath(os.path.dirname(__file__)) -with open(os.path.join(here, 'README.rst')) as f: - README = f.read() -with open(os.path.join(here, 'HISTORY.rst')) as f: - HISTORY = f.read() - -packages = [ - 'skosprovider_rdf', -] - -requires = [ - 'skosprovider>=1.1.0', - 'rdflib', - 'html5lib' -] - -setup( - name='skosprovider_rdf', - version='1.3.0', - description='skosprovider_rdf', - long_description=README + '\n\n' + HISTORY, - long_description_content_type='text/x-rst', - package_data={'': ['LICENSE']}, - package_dir={'skosprovider_rdf': 'skosprovider_rdf'}, - include_package_data=True, - install_requires=requires, - license='MIT', - zip_safe=False, - classifiers=[ - 'Intended Audience :: Developers', - 'Natural Language :: English', - 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - ], - author='Flanders Heritage Agency', - author_email='ict@onroerenderfgoed.be', - url='http://github.com/OnroerendErfgoed/skosprovider_rdf', - keywords='rdf skos skosprovider vocabularies thesauri', - packages=find_packages(), - tests_require=requires, - test_suite="skosprovider_rdf" -) diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 0a672c2..0000000 --- a/tox.ini +++ /dev/null @@ -1,25 +0,0 @@ -[tox] -envlist = py38,py39,py310,py311,cover - -[testenv] -deps = - pytest -commands = - pip install -U setuptools pip - pip install -r requirements.txt - pip install pytest - python setup.py develop - py.test - -[testenv:cover] -basepython = - python3.8 -deps = - pytest - pytest-cov -commands = - pip install -U setuptools pip - pip install -r requirements.txt - pip install pytest pytest-cov - python setup.py develop - py.test --cov skosprovider_rdf --cov-report term-missing tests