Skip to content

Commit

Permalink
revert pyproject.toml changes
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Aug 23, 2024
1 parent eeda0bf commit 976492c
Show file tree
Hide file tree
Showing 4 changed files with 194 additions and 187 deletions.
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ repos:
- id: biome-format
additional_dependencies: ["@biomejs/[email protected]"]
# Hooks that are run for scripts
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.2.1"
hooks:
- id: pyproject-fmt
files: ^scripts/
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.1
hooks:
Expand Down
174 changes: 88 additions & 86 deletions scripts/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,45 +1,44 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
requires = [ "hatch-vcs", "hatchling" ]

[project]
name = "scverse-template-scripts"
dynamic = ["version"]
description = "scripts for ecosystem package data"
readme = "../README.md"
requires-python = ">=3.11"
license = "GPL-3.0"
authors = [
{ name = "Philipp A.", email = "[email protected]" },
]
requires-python = ">=3.11"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dynamic = [ "version" ]
dependencies = [
"cruft",
"furl",
"gitpython",
"pre-commit", # is ran by cruft
"pygithub>=2",
"pyyaml",
"rich",
"typer",
]
optional-dependencies.test = [
"pytest",
"pytest-responsemock",
"pytest-socket",
{ name = "Philipp A.", email = "[email protected]" },
]
urls.Documentation = "https://github.com/scverse/cookiecutter-scverse#readme"
urls.Issues = "https://github.com/scverse/cookiecutter-scverse/issues"
urls.Source = "https://github.com/scverse/cookiecutter-scverse"
scripts.make-rich-output = "scverse_template_scripts.make_rich_output:main"
scripts.send-cruft-prs = "scverse_template_scripts.cruft_prs:cli"
dependencies = [
"cruft",
"rich",
"typer",
"furl",
"GitPython",
"PyGitHub >= 2",
"PyYAML",
"pre-commit", # is ran by cruft
]

[project.optional-dependencies]
test = [
"pytest",
"pytest-socket",
"pytest-responsemock",
]

[project.scripts]
send-cruft-prs = "scverse_template_scripts.cruft_prs:cli"
make-rich-output = "scverse_template_scripts.make_rich_output:main"

[tool.hatch.build.targets.wheel]
packages = [ "src/testing", "src/scverse_template_scripts" ]
packages = ["src/testing", "src/scverse_template_scripts"]

[tool.hatch.version]
source = "vcs"
Expand All @@ -49,72 +48,75 @@ fallback-version = "0.0"
python = "3.11"

[tool.hatch.envs.hatch-test]
features = [ "test" ]
features = ["test"]

[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
"--disable-socket",
"-presponsemock",
"-ptesting.scverse_template_scripts._pytest"
]
filterwarnings = [
"error",
# https://github.com/man-group/pytest-plugins/issues/224
"ignore::DeprecationWarning:pytest_shutil",
]

[tool.ruff]
line-length = 120

format.docstring-code-format = true
[tool.ruff.format]
docstring-code-format = true

lint.select = [
"A",
"ARG",
"B",
"C",
"DTZ",
"E",
"EM",
"F",
"FBT",
"I",
"ICN",
"ISC",
"N",
"PLC",
"PLE",
"PLR",
"PLW",
"Q",
"RUF",
"S",
"T",
"TCH",
"TID",
"UP",
"W",
"YTT",
]
lint.ignore = [
"ISC001", # conflicts with formatter
"S101", # assert should be allowed
"S311", # we don’t need cryptographically secure RNG
"S603", # subprocess with shell=False should be allowed
[tool.ruff.lint]
allowed-confusables = ["", "×"]
select = [
"A",
"ARG",
"B",
"C",
"DTZ",
"E",
"EM",
"F",
"FBT",
"I",
"ICN",
"ISC",
"N",
"PLC",
"PLE",
"PLR",
"PLW",
"Q",
"RUF",
"S",
"T",
"TCH",
"TID",
"UP",
"W",
"YTT",
]
lint.per-file-ignores."tests/*.py" = [
"ARG001", # pytest fixtures don’t need to be used
"PLR0913", # allow as many pytest fixtures being used as one likes
ignore = [
"S101", # assert should be allowed
"S603", # subprocess with shell=False should be allowed
"S311", # we don’t need cryptographically secure RNG
"ISC001", # conflicts with formatter
]
lint.unfixable = [
"RUF001", # never “fix” “confusables”
]
lint.allowed-confusables = [ "×", "" ]
lint.flake8-type-checking.exempt-modules = [ ]
lint.flake8-type-checking.strict = true
lint.isort.known-first-party = [ "scverse_template_scripts", "testing.scverse_template_scripts" ]
lint.isort.required-imports = [ "from __future__ import annotations" ]
unfixable = ["RUF001"] # never “fix” “confusables”

[tool.pyproject-fmt]
column_width = 120
[tool.ruff.lint.isort]
known-first-party = ["scverse_template_scripts", "testing.scverse_template_scripts"]
required-imports = ["from __future__ import annotations"]

[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
"--disable-socket",
"-presponsemock",
"-ptesting.scverse_template_scripts._pytest",
]
filterwarnings = [
"error",
# https://github.com/man-group/pytest-plugins/issues/224
"ignore::DeprecationWarning:pytest_shutil",
[tool.ruff.lint.flake8-type-checking]
exempt-modules = []
strict = true

[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
"ARG001", # pytest fixtures don’t need to be used
"PLR0913", # allow as many pytest fixtures being used as one likes
]
4 changes: 0 additions & 4 deletions {{cookiecutter.project_name}}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ repos:
hooks:
- id: biome-format
additional_dependencies: ["@biomejs/[email protected]"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.2.1"
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.1
hooks:
Expand Down
Loading

0 comments on commit 976492c

Please sign in to comment.