mirror of
https://github.com/trailofbits/algo.git
synced 2026-08-17 21:25:50 +02:00
0ee32a4f99
Bumps [cryptography](https://github.com/pyca/cryptography) from 48.0.0 to 48.0.1. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/48.0.0...48.0.1) --- updated-dependencies: - dependency-name: cryptography dependency-version: 48.0.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
141 lines
4.2 KiB
TOML
141 lines
4.2 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=82.0.1"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "algo"
|
|
description = "Set up a personal IPSEC VPN in the cloud"
|
|
version = "2.0.0-beta"
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"ansible==12.3.0",
|
|
"cryptography>=48.0.1",
|
|
"jinja2>=3.1.6",
|
|
"netaddr==1.3.0",
|
|
"pyyaml>=6.0.2",
|
|
"segno>=1.6.0",
|
|
]
|
|
|
|
[tool.setuptools]
|
|
# Explicitly disable package discovery since Algo is not a Python package
|
|
py-modules = []
|
|
|
|
[project.optional-dependencies]
|
|
# Cloud provider dependencies (installed automatically based on provider selection)
|
|
aws = [
|
|
"boto3>=1.43.21",
|
|
]
|
|
azure = [
|
|
"azure-identity>=1.15.0",
|
|
"azure-mgmt-compute>=38.0.0",
|
|
"azure-mgmt-network>=25.0.0",
|
|
"azure-mgmt-resource>=23.0.0",
|
|
"msrestazure>=0.6.4",
|
|
]
|
|
gcp = [
|
|
"google-auth>=2.53.0",
|
|
"requests>=2.34.2",
|
|
]
|
|
hetzner = [
|
|
"hcloud>=2.20.0",
|
|
]
|
|
linode = [
|
|
"linode-api4>=5.44.0",
|
|
]
|
|
openstack = [
|
|
"openstacksdk>=4.14.0",
|
|
]
|
|
cloudstack = [
|
|
"cs>=3.4.1",
|
|
]
|
|
|
|
[tool.ruff]
|
|
# Ruff configuration
|
|
target-version = "py311"
|
|
line-length = 120
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"F", # pyflakes
|
|
"I", # isort
|
|
"B", # flake8-bugbear
|
|
"C4", # flake8-comprehensions
|
|
"UP", # pyupgrade
|
|
"S", # flake8-bandit (security)
|
|
"SIM", # flake8-simplify
|
|
"RUF", # Ruff-specific rules
|
|
"ERA", # commented-out code detection
|
|
"PTH", # pathlib recommendations
|
|
]
|
|
ignore = [
|
|
"E501", # line too long (handled by formatter)
|
|
"B011", # assert False is acceptable in test code
|
|
"S101", # assert is acceptable in test code
|
|
"S110", # try-except-pass - used intentionally for optional checks
|
|
"S112", # try-except-continue - used intentionally for skipping files
|
|
"S603", # subprocess calls - needed for Ansible modules
|
|
"S607", # partial path - needed for Ansible modules
|
|
"S701", # jinja2 autoescape - templates are for config files, not HTML
|
|
"S602", # shell=True in subprocess - needed for test mocks
|
|
"SIM102", # nested if - sometimes clearer than combined conditions
|
|
"SIM108", # ternary - sometimes if/else is more readable
|
|
"ERA001", # commented code - some comments explain regex patterns
|
|
"RUF005", # iterable unpacking - concatenation is clearer in some cases
|
|
"PTH100", # pathlib - existing code uses os.path
|
|
"PTH108", # pathlib - existing code uses os.unlink
|
|
"PTH110", # pathlib - existing code uses os.path.exists
|
|
"PTH118", # pathlib - existing code uses os.path.join
|
|
"PTH119", # pathlib - existing code uses os.path.basename
|
|
"PTH120", # pathlib - existing code uses os.path.dirname
|
|
"PTH123", # pathlib - existing code uses open()
|
|
"PTH201", # pathlib - existing code uses Path(".")
|
|
"PTH207", # pathlib - existing code uses glob
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"library/*" = ["ALL"] # Exclude Ansible library modules (external code)
|
|
"tests/*" = ["S101"] # Allow assert in tests
|
|
|
|
[tool.ty.environment]
|
|
# Type checking configuration
|
|
python-version = "3.11"
|
|
|
|
[tool.ty.src]
|
|
# Exclude Ansible library modules and tests (test code has looser typing)
|
|
exclude = ["library/**", "tests/**"]
|
|
|
|
[tool.ty.rules]
|
|
# Ignore import warnings - ty doesn't see the venv when run via uv --with
|
|
# These are checked by Python's import system at runtime
|
|
unresolved-import = "ignore"
|
|
unknown-argument = "warn"
|
|
|
|
[tool.uv]
|
|
# Centralized uv version management
|
|
dev-dependencies = [
|
|
"pytest>=8.0.0",
|
|
"pytest-xdist>=3.0.0", # Parallel test execution
|
|
"ruff>=0.8.0", # Python linter and formatter
|
|
"yamllint>=1.35.0", # YAML linter
|
|
"ansible-lint>=24.0.0", # Ansible linter
|
|
"j2lint>=1.2.0", # Jinja2 template linter
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
python_files = ["test_*.py"]
|
|
python_classes = ["Test*"]
|
|
python_functions = ["test_*"]
|
|
addopts = [
|
|
"-v", # Verbose output
|
|
"--strict-markers", # Strict marker validation
|
|
"--strict-config", # Strict config validation
|
|
"--tb=short", # Short traceback format
|
|
]
|
|
markers = [
|
|
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
|
|
"integration: marks tests as integration tests",
|
|
]
|