diff --git a/.github/workflows/pyramid_skosprovider.yaml b/.github/workflows/pyramid_skosprovider.yaml new file mode 100644 index 0000000..90008c4 --- /dev/null +++ b/.github/workflows/pyramid_skosprovider.yaml @@ -0,0 +1,38 @@ +name: pyramid_skosprovider backend tests +on: + push: + paths: + - pyramid_skosprovider/** + - tests/** + - pyramid_skosprovider.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 b8317a0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -sudo: false -language: python -os: linux -dist: focal -python: - - "3.8" - - "3.9" - - "3.10" - - "3.11" -install: - - pip install -r requirements-dev.txt - - python setup.py develop -script: py.test --cov pyramid_skosprovider --cov-report term-missing -after_success: coveralls diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..eef4b42 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,73 @@ +[build-system] +requires = ["hatchling", "hatch-fancy-pypi-readme"] +build-backend = "hatchling.build" + +[project] +version = "1.2.2" +name = "pyramid_skosprovider" +dynamic = ["readme"] +authors = [ + { name = "Flanders Heritage Agency", email = "ict@onroerenderfgoed.be" }, +] +license = "MIT" +description = "ntegration of skosprovider in pyramid" +requires-python = ">=3.10,<3.13" +keywords = ["pyramid", "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 = [ + "pyramid==2.0.2", + "skosprovider==1.2.0", +] + +[project.urls] +History = "https://github.com/OnroerendErfgoed/pyramid_skosprovider/blob/master/HISTORY.rst" +Tracker = "https://github.com/OnroerendErfgoed/pyramid_skosprovider/issues" +Source = "https://github.com/OnroerendErfgoed/pyramid_skosprovider" +Documentation = "https://pyramid_skosprovider.readthedocs.io/en/latest/" + +[project.optional-dependencies] +dev = [ + "uv==0.4.11", + # Documentation + "sphinx==7.4.7", + "sphinxcontrib-httpdomain==1.8.1", + "pygments==2.18.0", + "sphinx_rtd_theme==2.0.0", + # Linting + "flake8==7.1.1", + # Unit testing + "pytest==8.3.3", + "webtest==3.0.1", + "pytest-cov==5.0.0", + "coveralls==4.0.1", + "responses==0.25.3", +] + +## +# Build tool specific +## +[tool.hatch.build.targets.wheel] +# In the wheel we want to have pyramid_skosprovider in the root as python module. +only-include = [ + "/pyramid_skosprovider", +] + +[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 a427eae..bc68413 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,18 +1,154 @@ -# Runtime requirements ---requirement requirements.txt - -# Documentation -Sphinx==6.2.1 +alabaster==0.7.16 + # via sphinx +babel==2.16.0 + # via sphinx +beautifulsoup4==4.12.3 + # via webtest +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 pyramid-skosprovider (pyproject.toml) +docopt==0.6.2 + # via coveralls +docutils==0.20.1 + # via + # sphinx + # sphinx-rtd-theme +flake8==7.1.1 + # via pyramid-skosprovider (pyproject.toml) +frozendict==2.4.4 + # via pyld +html5lib==1.1 + # via skosprovider +hupper==1.12.1 + # via pyramid +idna==3.10 + # via requests +imagesize==1.4.1 + # via sphinx +iniconfig==2.0.0 + # via pytest +jinja2==3.1.4 + # via sphinx +language-tags==1.2.0 + # via skosprovider +lxml==5.3.0 + # via pyld +markupsafe==2.1.5 + # via jinja2 +mccabe==0.7.0 + # via flake8 +packaging==24.1 + # via + # pytest + # sphinx +pastedeploy==3.1.0 + # via plaster-pastedeploy +plaster==1.1.2 + # via + # plaster-pastedeploy + # pyramid +plaster-pastedeploy==1.0.1 + # via pyramid +pluggy==1.5.0 + # via pytest +pycodestyle==2.12.1 + # via flake8 +pyflakes==3.2.0 + # via flake8 +pygments==2.18.0 + # via + # pyramid-skosprovider (pyproject.toml) + # sphinx +pyld==2.0.4 + # via skosprovider +pyramid==2.0.2 + # via pyramid-skosprovider (pyproject.toml) +pytest==8.3.3 + # via + # pyramid-skosprovider (pyproject.toml) + # pytest-cov +pytest-cov==5.0.0 + # via pyramid-skosprovider (pyproject.toml) +pyyaml==6.0.2 + # via responses +requests==2.32.3 + # via + # coveralls + # responses + # sphinx +responses==0.25.3 + # via pyramid-skosprovider (pyproject.toml) +rfc3987==1.3.8 + # via skosprovider +setuptools==75.1.0 + # via + # pyramid + # zope-deprecation + # zope-interface +six==1.16.0 + # via + # html5lib + # sphinxcontrib-httpdomain +skosprovider==1.2.0 + # via pyramid-skosprovider (pyproject.toml) +snowballstemmer==2.2.0 + # via sphinx +soupsieve==2.6 + # via beautifulsoup4 +sphinx==7.4.7 + # via + # pyramid-skosprovider (pyproject.toml) + # sphinx-rtd-theme + # sphinxcontrib-httpdomain + # sphinxcontrib-jquery +sphinx-rtd-theme==2.0.0 + # via pyramid-skosprovider (pyproject.toml) +sphinxcontrib-applehelp==2.0.0 + # via sphinx +sphinxcontrib-devhelp==2.0.0 + # via sphinx +sphinxcontrib-htmlhelp==2.1.0 + # via sphinx sphinxcontrib-httpdomain==1.8.1 -pygments==2.16.1 -sphinx_rtd_theme==1.3.0 - -# Linting -flake8==4.0.1 - -# Unit testing -pytest==7.4.2 -webtest==3.0.0 -pytest-cov==4.1.0 -coveralls==3.3.1 -responses==0.23.3 + # via pyramid-skosprovider (pyproject.toml) +sphinxcontrib-jquery==4.1 + # via sphinx-rtd-theme +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==2.0.0 + # via sphinx +sphinxcontrib-serializinghtml==2.0.0 + # via sphinx +translationstring==1.4 + # via pyramid +urllib3==2.2.3 + # via + # requests + # responses +uv==0.4.11 + # via pyramid-skosprovider (pyproject.toml) +venusian==3.1.0 + # via pyramid +waitress==3.0.0 + # via webtest +webencodings==0.5.1 + # via html5lib +webob==1.8.8 + # via + # pyramid + # webtest +webtest==3.0.1 + # via pyramid-skosprovider (pyproject.toml) +zope-deprecation==5.0 + # via pyramid +zope-interface==7.0.3 + # via pyramid diff --git a/requirements.txt b/requirements.txt index 3f1e5ea..e42b4bf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,47 @@ +cachetools==5.5.0 + # via pyld +frozendict==2.4.4 + # via pyld +html5lib==1.1 + # via skosprovider +hupper==1.12.1 + # via pyramid +language-tags==1.2.0 + # via skosprovider +lxml==5.3.0 + # via pyld +pastedeploy==3.1.0 + # via plaster-pastedeploy +plaster==1.1.2 + # via + # plaster-pastedeploy + # pyramid +plaster-pastedeploy==1.0.1 + # via pyramid +pyld==2.0.4 + # via skosprovider pyramid==2.0.2 + # via pyramid-skosprovider (pyproject.toml) +rfc3987==1.3.8 + # via skosprovider +setuptools==75.1.0 + # via + # pyramid + # zope-deprecation + # zope-interface +six==1.16.0 + # via html5lib skosprovider==1.2.0 -# -e git+https://github.com/koenedaele/skosprovider.git@develop#egg=skosprovider + # via pyramid-skosprovider (pyproject.toml) +translationstring==1.4 + # via pyramid +venusian==3.1.0 + # via pyramid +webencodings==0.5.1 + # via html5lib +webob==1.8.8 + # via pyramid +zope-deprecation==5.0 + # via pyramid +zope-interface==7.0.3 + # via pyramid diff --git a/setup.py b/setup.py deleted file mode 100644 index 81796c0..0000000 --- a/setup.py +++ /dev/null @@ -1,52 +0,0 @@ -import os - -from setuptools import setup, find_packages - -here = os.path.abspath(os.path.dirname(__file__)) -README = open(os.path.join(here, 'README.rst')).read() -CHANGES = open(os.path.join(here, 'HISTORY.rst')).read() - -requires = [ - 'pyramid>=2.0', - 'skosprovider>=1.1.0' -] - -tests_requires = [ - 'pytest', - 'pytest-cov', - 'webtest' -] - -testing_extras = tests_requires + [] - -setup( - name='pyramid_skosprovider', - version='1.2.2', - license='MIT', - description='Integration of skosprovider in pyramid', - long_description=README + '\n\n' + CHANGES, - long_description_content_type='text/x-rst', - classifiers=[ - 'Intended Audience :: Developers', - 'Development Status :: 5 - Production/Stable', - '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', - 'Framework :: Pyramid', - ], - author='Koen Van Daele', - author_email='koen_van_daele@telenet.be', - url='https://github.com/OnroerendErfgoed/pyramid_skosprovider', - keywords='pyramid skos skosprovider thesauri vocabularies', - packages=find_packages(), - include_package_data=True, - zip_safe=False, - install_requires=requires, - tests_require=tests_requires, - extras_require={ - 'testing': testing_extras - }, -) diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 9363fa2..0000000 --- a/tox.ini +++ /dev/null @@ -1,24 +0,0 @@ -[tox] -envlist = py38,py39,py310,cover - -[testenv] -passenv = 3.8 -commands = - python setup.py develop - pip install -r requirements-dev.txt # Fix versions - py.test -deps = - pytest - webtest - -[testenv:cover] -basepython = - python3.8.0 -commands = - python setup.py develop - pip install -r requirements-dev.txt # Fix versions - py.test --cov pyramid_skosprovider --cov-report term-missing tests -deps = - webtest - pytest - pytest-cov