Files
server-toolset/many-rsync/pyproject.toml
Yigid BALABAN a168b4cbea add project tooling and test suite for many-rsync
- Add pyproject.toml: hatchling build, many-rsync entrypoint, ruff/mypy/pytest config
with 60% coverage floor
- Add uv.lock for reproducible dev installs
- Add .pre-commit-config.yaml: ruff (with --fix) + mypy hooks
- Add test_main.py: unit tests for _build_rsync_cmd, _load_raw, and load_config
covering happy paths and FATAL exit cases
- Add explanation.md: architecture overview with flowchart
- main.py: refactor into typed, testable functions (_load_raw, _build_rsync_cmd
extracted); add RsyncParameters/Config TypedDicts; add rsync_parameters config support
(rsync_path, exclude_from); harden validation (n clamped, log_level validated)
- README.md: update install instructions and document all config fields including
rsync_parameters
2026-03-31 22:05:08 +03:00

57 lines
1.6 KiB
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "many-rsync"
version = "0.1.0"
description = "Parallel rsync runner. Reads config from TOML or JSON."
requires-python = ">=3.11"
dependencies = []
[tool.hatch.build.targets.wheel]
only-include = ["main.py"]
[project.scripts]
many-rsync = "main:main"
[dependency-groups]
dev = [
"ruff",
"mypy",
"pytest",
"pytest-cov",
"pre-commit",
]
# ── ruff ─────────────────────────────────────────────────────────────────────
[tool.ruff]
line-length = 88
target-version = "py311"
[tool.ruff.lint]
select = [
"E", "W", # pycodestyle
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"SIM", # flake8-simplify
"RUF", # ruff-specific
]
# ── mypy ─────────────────────────────────────────────────────────────────────
[tool.mypy]
strict = true
python_version = "3.11"
warn_return_any = true
warn_unused_ignores = true
# ── pytest ───────────────────────────────────────────────────────────────────
[tool.pytest.ini_options]
addopts = "--cov=. --cov-fail-under=60"