Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions {{cookiecutter.project_name}}/.github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: Release
env:
ENABLE_PYPI_PUBLISH: {{ "true" if cookiecutter.enable_pypi_publish|lower == "yes" else "false" }}
ENABLE_TEST_PYPI_PUBLISH: false
RELEASE_PYTHON_VERSION: "3.12"
RELEASE_POETRY_VERSION: "2.0"
RELEASE_PYTHON_VERSION: "3.14"
RELEASE_POETRY_VERSION: "2.2"

on:
push:
Expand Down
3 changes: 2 additions & 1 deletion {{cookiecutter.project_name}}/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ jobs:
- "3.11"
- "3.12"
- "3.13"
- "3.14"
poetry-version:
- "2.0"
- "2.2"

runs-on: ${{ "{{" }} matrix.os }}-latest
steps:
Expand Down
4 changes: 2 additions & 2 deletions {{cookiecutter.project_name}}/.github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: Build
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ "{{" }} github.repository }}
RELEASE_PYTHON_VERSION: "3.12"
RELEASE_POETRY_VERSION: "2.0"
RELEASE_PYTHON_VERSION: "3.14"
RELEASE_POETRY_VERSION: "2.2"

on:
pull_request:
Expand Down
78 changes: 28 additions & 50 deletions {{cookiecutter.project_name}}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,51 +1,29 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: check-merge-conflict
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
args: ["--config", "pyproject.toml"]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--show-config"]
- repo: https://github.com/pycqa/bandit
rev: 1.7.4
hooks:
- id: bandit
additional_dependencies: ['.[toml]']
args: ["--configfile", "pyproject.toml"]
exclude: '^tests/'
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-pyproject
- flake8-simplify
- pep8-naming
- repo: https://github.com/pycqa/autoflake
rev: v2.0.1
hooks:
- id: autoflake
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: ["--py39-plus", "--keep-runtime-typing"]
- repo: local
hooks:
- id: mypy
name: mypy
language: python
types_or: [python, pyi]
entry: env -u VIRTUAL_ENV poetry run mypy
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: check-merge-conflict
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.11
hooks:
- id: ruff
args: ["--fix"]
- id: ruff-format
- repo: https://github.com/pycqa/bandit
rev: 1.9.2
hooks:
- id: bandit
additional_dependencies: ['.[toml]']
args: ["--configfile", "pyproject.toml"]
exclude: '^tests/'
- repo: local
hooks:
- id: mypy
name: mypy
language: python
types_or: [python, pyi]
entry: env -u VIRTUAL_ENV poetry run mypy
47 changes: 28 additions & 19 deletions {{cookiecutter.project_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
requires-python = ">=3.9,<4.0"
requires-python = ">=3.10,<4.0"
dynamic = [ "version" ]
dependencies = [
]
Expand All @@ -31,21 +31,15 @@ poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = ["plugin"] }

[tool.poetry.group.dev.dependencies]
bandit = {extras = ["toml"], version = "*"}
black = "*"
cruft = "*"
flake8 = "*"
flake8-bugbear = "*"
flake8-pyproject = "*"
flake8-simplify = "*"
isort = "*"
mypy = "*"
pep8-naming = "*"
poethepoet = "*"
pre-commit = "*"
pytest = "*"
pytest-cov = "*"
pytest-github-actions-annotate-failures = "*"
pytest-sugar = "*"
ruff = "*"

[tool.poetry-dynamic-versioning]
enable = true
Expand All @@ -67,9 +61,6 @@ help = "Run all tests"
[tool.bandit]
skips = ["B101"] # assert_used

[tool.black]
line-length = 79

[tool.coverage.run]
source = ["{{ cookiecutter.project_slug }}"]

Expand All @@ -80,14 +71,6 @@ show_missing = true
[tool.cruft]
skip = [".git"]

[tool.flake8]
exclude = "./.*"

[tool.isort]
atomic = true
profile = "black"
line_length = 79

[tool.mypy]
files = [ "tests", "{{ cookiecutter.project_slug }}" ]
mypy_path = "types"
Expand All @@ -107,4 +90,30 @@ addopts = """\
--junitxml=.pytest_results.xml \
"""

[tool.ruff]
target-version = "py310"
line-length = 79
fix = true

select = [
"E", "W", # pycodestyle
"F", # pyflakes
"I", # isort
"B", # bugbear
"SIM", # flake8-simplify
"N", # pep8-naming
"UP", # pyupgrade
]

exclude = [
".git",
".venv",
"__pycache__",
]

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"

# vim: ft=cfg