Skip to content

Commit

Permalink
Externalize package requirments (#65)
Browse files Browse the repository at this point in the history
* GHA reusable action renames

* Externalize package requirements

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
ssbarnea and pre-commit-ci[bot] authored Jun 14, 2024
1 parent b6f8e1d commit 2ac36f4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .config/requirements-test.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pytest-cov>=2.7.1
pytest-mock>=3.3.1
pytest-plus
pytest-xdist>=1.29.0
pytest>=5.4.0
1 change: 1 addition & 0 deletions .config/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rich>=10.0.0,<12.5.0 # https://github.com/pycontribs/enrich/issues/40
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,4 @@ dmypy.json

# Pyre type checker
.pyre/
src/enrich/_version.py
33 changes: 20 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
[build-system]
requires = [
# Needed for PEP 621 support
"setuptools >= 61.0",
"setuptools_scm[toml] >= 7.0.0",
"setuptools >= 65.3.0", # required by pyproject+setuptools_scm integration and editable installs
"setuptools_scm[toml] >= 7.0.5", # required for "no-local-version" scheme
]
build-backend = "setuptools.build_meta"

[project]
# https://peps.python.org/pep-0621/#readme
requires-python = ">=3.8"
dynamic = ["version"]
dynamic = ["version", "dependencies", "optional-dependencies"]
name = "enrich"
description = "enrich"
readme = "README.md"
Expand Down Expand Up @@ -40,21 +39,13 @@ classifiers = [
"Topic :: Utilities",
]
keywords = ["console", "logging", "rich"]
dependencies = ["rich >= 10.0.0, < 12.5.0"]


[project.urls]
homepage = "https://github.com/pycontribs/enrich"
repository = "https://github.com/pycontribs/enrich"
changelog = "https://github.com/pycontribs/enrich/releases"

[project.optional-dependencies]
test = [
"pytest-cov>=2.7.1",
"pytest-mock>=3.3.1",
"pytest-plus",
"pytest-xdist>=1.29.0",
"pytest>=5.4.0",
]

[tool.isort]
profile = "black"
Expand Down Expand Up @@ -82,5 +73,21 @@ filterwarnings = [
# ignore::UserWarning
]

[tool.setuptools.dynamic]
dependencies = { file = [".config/requirements.in"] }
optional-dependencies.test = { file = [".config/requirements-test.in"] }

[tool.setuptools_scm]
local_scheme = "no-local-version"
tag_regex = "^(?P<prefix>v)?(?P<version>[0-9.]+)(?P<suffix>.*)?$"
write_to = "src/enrich/_version.py"
# To prevent accidental pick of mobile version tags such 'v6'
git_describe_command = [
"git",
"describe",
"--dirty",
"--tags",
"--long",
"--match",
"v*.*",
]

0 comments on commit 2ac36f4

Please sign in to comment.