diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a4a3f4a..8420694 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,3 @@ -exclude: '^pint/_vendor' repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 @@ -6,16 +5,12 @@ repos: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace -- repo: https://github.com/psf/black - rev: 23.1.0 - hooks: - - id: black - - id: black-jupyter - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: 'v0.0.240' + rev: v0.1.5 hooks: - id: ruff args: ["--fix"] + - id: ruff-format - repo: https://github.com/executablebooks/mdformat rev: 0.7.16 hooks: diff --git a/pyproject.toml b/pyproject.toml index 9fdb361..5a13102 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "flexparser" authors = [ {name="Hernan E. Grecco", email="hernan.grecco@gmail.com"} ] -license = {text = "BSD"} +license = {text = "BSD-3-Clause"} description = "Parsing made fun ... using typing." readme = "README.rst" maintainers = [ @@ -24,31 +24,25 @@ classifiers = [ "Topic :: Utilities", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11" + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] requires-python = ">=3.9" -dynamic = ["version"] # Version is taken from git tags using setuptools_scm -dependencies = [ - "typing_extensions" -] +dynamic = ["dependencies", "optional-dependencies", "version"] [tool.setuptools.package-data] flexparser = ["py.typed"] -[project.optional-dependencies] -test = [ - "pytest", - "pytest-mpl", - "pytest-cov", - "pytest-subtests" -] - [project.urls] Homepage = "https://github.com/hgrecco/flexparser" [tool.setuptools] packages = ["flexparser"] +[tool.setuptools.dynamic] +dependencies = {file = "requirements.txt"} +optional-dependencies.test = {file = "requirements.test.txt"} + [build-system] requires = ["setuptools>=61", "wheel", "setuptools_scm[toml]>=3.4.3"] build-backend = "setuptools.build_meta" diff --git a/requirements.test.txt b/requirements.test.txt new file mode 100644 index 0000000..4eca11b --- /dev/null +++ b/requirements.test.txt @@ -0,0 +1,4 @@ +pytest +pytest-mpl +pytest-cov +pytest-subtests diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5fd4f05 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +typing_extensions