Files
grm/pyproject.toml
T
emil c4fe70979c
Post-merge / detect-and-configure (push) Waiting to run
Post-merge / release-and-maintain (push) Waiting to run
GRM-146: ci: consolidate CI and post-merge workflows
2026-07-12 01:53:47 +00:00

147 lines
4.3 KiB
TOML

[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "grm"
dynamic = ["version"]
description = "Lean CLI to manage Gitea Actions runners"
readme = "README.md"
license = {text = "GPL-3.0"}
requires-python = ">=3.12"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
]
dependencies = [
"python-dotenv==1.2.2",
"click==8.4.2",
"ansible==14.1.0",
]
[project.scripts]
grm = "grm.cli:cli"
[tool.setuptools.dynamic]
version = {attr = "grm.__version__"}
[project.optional-dependencies]
# Minimal deps for CI scripts that only need click/dotenv
# (validate job steps: detect-changes, discover-runners, pr-review;
# release-and-maintain job steps: sync-wiki, badges, etc.)
ci = [
"pytest==9.1.1",
"pytest-cov==7.1.0",
"build==1.5.0",
"twine==6.2.0",
# Reusable CI/CD and dev tools (auto-merge, pr-review, pre-push checks, etc.)
"devx==0.40.0",
]
# Lint and type-checking tools (validate job)
lint = [
"ruff==0.15.20",
"pyright==1.1.411",
"bandit==1.9.4",
"pip-audit==2.10.1",
"pre-commit==4.6.0",
"ansible-lint==26.4.0",
]
# Molecule testing (molecule-tests job — stays as a separate CI job)
molecule = [
"molecule==26.6.0",
"molecule-docker==2.1.0",
]
# Full dev environment (local development, includes everything)
dev = [
"grm[ci,lint,molecule]",
# Reusable CI/CD and dev tools (pre-push hooks, create-task, create-pr)
"devx==0.40.0",
# Non-Python dev dependency: checkmake (Makefile linter)
# Install via: go install github.com/checkmake/checkmake/cmd/checkmake@latest
]
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
grm = ["translations.json"]
[tool.pytest.ini_options]
testpaths = ["tests", "scripts/tests"]
pythonpath = ["src", "scripts"]
addopts = "--cov=src/grm --cov=scripts/prune_runner_images.py --cov-report=term-missing --cov-fail-under=100"
markers = [
"integration: marks tests as integration tests (not counted in coverage)",
]
[tool.ruff]
target-version = "py312"
line-length = 120
[tool.ruff.lint]
select = ["E", "F", "I", "W", "UP", "B", "C4", "SIM"]
ignore = ["SIM117"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.pyright]
include = ["src"]
pythonVersion = "3.12"
strict = ["src/grm"]
# ---------------------------------------------------------------------------
# Change classification — determines which changes trigger a release
# ---------------------------------------------------------------------------
# The framework provides DEFAULT_INFRASTRUCTURE (CI workflows, tests, docs,
# Project-specific devx configuration (read by devx.config)
[tool.devx]
task_prefix = "GRM"
vikunja_project_id = 6
repo_owner = "oblachno-oss"
repo_name = "grm"
# grm doesn't have its own CI scripts — it uses devx's CI modules.
# Skip CI script checks (doc_coverage would otherwise look for src/ci/).
[tool.devx.doc_coverage]
ci_scripts_dir = ""
# Molecule test weights for LPT scheduling.
# GRM has a single role (gitea-runner) with 7 scenarios.
# Weights are estimates — recalibrate from CI logs after next run.
[tool.devx.molecule.weights]
"multi-instance" = 8
"lifecycle" = 6
"update" = 5
"default" = 4
"deregister" = 3
"remove" = 3
"template-content" = 2
# lint config, etc.) that applies to any Python project. We only specify
# what's different about GRM.
[tool.devx.classify]
# use_defaults = true # (default) merge with DEFAULT_INFRASTRUCTURE
# Project-specific infrastructure paths (merged with defaults).
# scripts/** — dev tools and CI/CD automation, not part of the installed package.
# (scripts were migrated to devx in GRM-64, but the path is kept for
# historical correctness and in case scripts are added back.)
infrastructure = ["scripts/**"]
# Infrastructure overrides — files that would default to user-facing
# but are actually infrastructure:
# - __init__.py: only contains __version__ (set by release.py, not user code)
infrastructure_overrides = [
"src/grm/__init__.py",
]
# User-facing overrides — safety override for broad infrastructure patterns
user_facing_overrides = []
# Tag patterns — additional categories for CI conditional execution
# Orthogonal to release impact (user-facing vs infrastructure)
[tool.devx.classify.tags]
ansible = ["ansible/**", ".ansible-lint"]