Skip to content

Commit

Permalink
chore: update api pyproject
Browse files Browse the repository at this point in the history
Signed-off-by: JP-Ellis <[email protected]>
  • Loading branch information
JP-Ellis committed Nov 19, 2024
1 parent 2cf0b68 commit d5f03fa
Showing 1 changed file with 16 additions and 45 deletions.
61 changes: 16 additions & 45 deletions pypacter-api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ classifiers = [
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Code Generators",
]

requires-python = ">=3.8"
requires-python = ">=3.13"

dependencies = [
"fastapi~=0.0",
Expand Down Expand Up @@ -67,56 +67,34 @@ raw-options = { root = ".." }
[tool.hatch.build.hooks.vcs]
version-file = "src/pypacter_api/__version__.py"

[tool.hatch.build.targets.sdist]
include = [
# Source
"/src/pypacter_api/**/*.py",
"/src/pypacter_api/**/*.pyi",
"/src/pypacter_api/py.typed",
# Metadata
"/LICENSE",
]

[tool.hatch.build.targets.wheel]
packages = ["/src/pypacter_api"]
include = [
# Source
"/src/pypacter_api/**/*.py",
"/src/pypacter_api/**/*.pyi",
"/src/pypacter_api/py.typed",
]

[tool.hatch.envs.default]
installer = "uv"
features = ["devel"]
pre-install-commands = [
"pip install -q --disable-pip-version-check --no-deps --editable {root:parent:uri}[devel]",
]
# This is require to get around an incompatibility between hatch and uv
# See: https://github.com/pypa/hatch/issues/1639
pre-install-commands = ["uv pip install .[devel]"]


[tool.hatch.envs.default.scripts]
# The update is necessary as we are not using editable installs
lint = "ruff check --show-source --show-fixes {args} src tests"
typecheck = "mypy src tests {args}"
format = "ruff format src tests {args}"
test = "pytest tests/ {args}"
all = ["format", "lint", "typecheck", "test"]
lint = "ruff check --output-format full --show-fixes {args} src tests"
typecheck = "mypy . {args}"
format = "ruff format . {args}"
test = "pytest tests/ {args}"
all = ["format", "lint", "typecheck", "test"]

[tool.hatch.envs.test]
installer = "uv"
features = ["devel"]
pre-install-commands = [
"pip install -q --disable-pip-version-check --no-deps --editable {root:parent:uri}[devel]",
]

[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
# This is require to get around an incompatibility between hatch and uv
# See: https://github.com/pypa/hatch/issues/1639
pre-install-commands = ["uv pip install .[devel-test]"]

################################################################################
## Ruff Configuration
################################################################################

[tool.ruff]
extend = "../pyproject.toml"
target-version = "py38"

[tool.ruff.format]
preview = true
Expand Down Expand Up @@ -144,7 +122,7 @@ plugins = "pydantic.mypy"
################################################################################

[tool.coverage.paths]
pypacter_api = ["/src/pypacter_api"]
pypacter_api = ["src/pypacter_api"]
tests = ["tests"]

[tool.coverage.report]
Expand All @@ -154,10 +132,3 @@ exclude_lines = [
"raise NotImplementedError", # Ignore defensive assertions
"@(abc\\.)?abstractmethod", # Ignore abstract methods
]

################################################################################
## CI Build Wheel
################################################################################

[tool.cibuildwheel]
test-command = "pytest"

0 comments on commit d5f03fa

Please sign in to comment.