diff --git a/.editorconfig b/.editorconfig index d325166..f8cb9aa 100644 --- a/.editorconfig +++ b/.editorconfig @@ -25,3 +25,7 @@ indent_size = 2 # Matches the exact files either package.json or .travis.yml [{package.json,.travis.yml}] indent_size = 2 + +# Align TOML indenting with Tombi +[*.toml] +indent_size = 2 diff --git a/.gitignore b/.gitignore index 09f5713..2ed1e34 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,4 @@ target/ *.kdev4 .idea +uv.lock diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 7cbbc79..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,25 +0,0 @@ -# SPDX-FileCopyrightText: 2015, 2016 CERN. -# SPDX-License-Identifier: BSD-3-Clause -# -# In applying this license, CERN does not waive the privileges and immunities -# granted to it by virtue of its status as an Intergovernmental Organization -# or submit itself to any jurisdiction. - -include *.rst -include .coveragerc -include .editorconfig -include docs/*.py -include docs/*.rst -include docs/Makefile -include docs/requirements.txt -include .lgtm -include LICENSE -include MAINTAINERS -include pytest.ini -include run-tests.sh -recursive-include *.py *.css *.css_t *.conf *.html -recursive-include docs *.py -recursive-include tests *.py -recursive-include .github/workflows *.yml -include .git-blame-ignore-revs -include .readthedocs.yaml diff --git a/pyproject.toml b/pyproject.toml index ec4e1ea..26010bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,61 @@ +# SPDX-FileCopyrightText: 2015-2022 CERN. +# SPDX-FileCopyrightText: 2022 Graz University of Technology. +# SPDX-FileCopyrightText: 2026 TU Wien. +# SPDX-License-Identifier: MIT + +[project] +name = "idutils" +description = "Small library for persistent identifiers used in scholarly communication." +readme = "README.rst" +requires-python = ">=3.9" +license = "BSD-3-Clause" +authors = [ + { name = "Invenio Software", email = "info@inveniosoftware.org" }, +] +keywords = [ + "identifiers", + "persistent", +] +classifiers = [ + "Development Status :: 5 - Production/Stable", +] +dependencies = [ + "isbnlib2>=3.11.7", +] +dynamic = ["version"] + +[project.urls] +Repository = "https://github.com/inveniosoftware/idutils" + +[project.optional-dependencies] +docs = [] +tests = [ + "pytest-black-ng>=0.4.0", + "pytest-cache>=1.0", + "pytest-invenio>=1.4.0", + "pytest-runner>=2.6.2", + "sphinx>=4.5", +] + [build-system] -requires = ["setuptools", "wheel", "babel>2.8"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.version] +path = "idutils/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/idutils", +] + +[tool.isort] +profile = "black" + +[tool.pydocstyle] +add_ignore = "" + +[tool.pytest.ini_options] +addopts = '--black --isort --pydocstyle --doctest-glob="*.rst" --doctest-modules --cov=idutils --cov-report=term-missing' +testpaths = "tests idutils" +live_server_scope = "module" diff --git a/run-tests.sh b/run-tests.sh index e8e3a61..2b0e3a2 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -9,6 +9,5 @@ set -o errexit # Quit on unbound symbols set -o nounset -python -m check_manifest python -m sphinx.cmd.build -qnNW docs docs/_build/html python -m pytest diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 25296bf..0000000 --- a/setup.cfg +++ /dev/null @@ -1,58 +0,0 @@ -# SPDX-FileCopyrightText: 2016 CERN. -# SPDX-FileCopyrightText: 2022 Graz University of Technology. -# SPDX-License-Identifier: BSD-3-Clause -# -# In applying this license, CERN does not waive the privileges and immunities -# granted to it by virtue of its status as an Intergovernmental Organization -# or submit itself to any jurisdiction. - -[metadata] -name = idutils -version = attr: idutils.__version__ -description = "Small library for persistent identifiers used in scholarly communication." -long_description = file: README.rst, CHANGES.rst -keywords = persistent identifiers -license = Revised BSD License -author = Invenio Software -author_email = info@inveniosoftware.org -platforms = any -url = https://github.com/inveniosoftware/idutils -classifiers = - Development Status :: 5 - Production/Stable - -[options] -include_package_data = True -packages = find: -python_requires = >=3.7 -zip_safe = False -install_requires = - isbnlib2>=3.11.7 - -[options.extras_require] -tests = - pytest-black-ng>=0.4.0 - pytest-cache>=1.0 - pytest-invenio>=1.4.0 # required for fixtures - pytest-runner>=2.6.2 - sphinx>=4.5 -# Kept for backwards compatibility -docs = - -[build_sphinx] -source-dir = docs/ -build-dir = docs/_build -all_files = 1 - -[bdist_wheel] -universal = 1 - -[isort] -profile=black - -[check-manifest] -ignore = - *-requirements.txt - -[tool:pytest] -addopts = --black --isort --pydocstyle --doctest-glob="*.rst" --doctest-modules --cov=idutils --cov-report=term-missing -testpaths = tests idutils diff --git a/setup.py b/setup.py deleted file mode 100644 index 897b28e..0000000 --- a/setup.py +++ /dev/null @@ -1,14 +0,0 @@ -# SPDX-FileCopyrightText: 2015-2022 CERN. -# SPDX-FileCopyrightText: 2022 Graz University of Technology. -# SPDX-License-Identifier: BSD-3-Clause -# -# In applying this license, CERN does not waive the privileges and immunities -# granted to it by virtue of its status as an Intergovernmental Organization -# or submit itself to any jurisdiction. - - -"""Small library for persistent identifiers used in scholarly communication.""" - -from setuptools import setup - -setup()