bd31a3f2f3
- pyproject.toml (hatchling) with ruff/mypy/pytest dev deps - src/ci_orchestrator/: config, credentials, backends (Protocol + WorkstationVmrunBackend), transport (WinRM via pypsrp, SSH via paramiko) - CLI entry point with PoC 'wait-ready' subcommand (Windows + Linux guests) - tests/python/: 35 unit tests, 83% coverage, all backends/transport mocked - gitea/workflows/lint.yml: new 'python' job (ruff + mypy --strict + pytest --cov-fail-under=70) - config.example.toml + README setup section + .gitignore Python entries Neutral VmBackend Protocol prepared for Phase C ESXi extension. See plans/implementation-plan-A-B.md step A1.
90 lines
1.8 KiB
TOML
90 lines
1.8 KiB
TOML
[build-system]
|
|
requires = ["hatchling>=1.18"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "ci-orchestrator"
|
|
version = "0.1.0"
|
|
description = "Local CI/CD orchestrator (Phase A: Python rewrite of PowerShell scripts)"
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
license = { text = "Proprietary" }
|
|
authors = [{ name = "Local CI/CD System" }]
|
|
dependencies = [
|
|
"click>=8.1",
|
|
"pypsrp>=0.8",
|
|
"paramiko>=3.4",
|
|
"keyring>=24.0",
|
|
"tomli>=2.0; python_version < '3.11'",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=8.0",
|
|
"pytest-cov>=5.0",
|
|
"pytest-mock>=3.12",
|
|
"ruff>=0.5",
|
|
"mypy>=1.10",
|
|
"types-paramiko",
|
|
]
|
|
|
|
[project.scripts]
|
|
ci-orchestrator = "ci_orchestrator.__main__:cli"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/ci_orchestrator"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py311"
|
|
src = ["src", "tests"]
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"F", # pyflakes
|
|
"I", # isort
|
|
"B", # flake8-bugbear
|
|
"UP", # pyupgrade
|
|
"SIM", # flake8-simplify
|
|
"RUF", # ruff-specific
|
|
]
|
|
ignore = [
|
|
"E501", # line length handled by formatter
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"tests/**" = ["B011", "SIM117"]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.11"
|
|
strict = true
|
|
files = ["src"]
|
|
warn_unused_ignores = true
|
|
warn_redundant_casts = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["pypsrp.*", "keyring.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[tool.pytest.ini_options]
|
|
minversion = "8.0"
|
|
addopts = "-q --strict-markers"
|
|
testpaths = ["tests"]
|
|
pythonpath = ["src"]
|
|
markers = [
|
|
"integration: requires real VM/network (skipped in unit-test runs)",
|
|
]
|
|
|
|
[tool.coverage.run]
|
|
source = ["ci_orchestrator"]
|
|
branch = true
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
"pragma: no cover",
|
|
"if TYPE_CHECKING:",
|
|
"raise NotImplementedError",
|
|
]
|