Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
97 lines (79 loc) · 2.16 KB
/
Copy pathpyproject.toml
File metadata and controls
97 lines (79 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "github-trending-api"
version = "0.1.0"
description = "Static JSON and RSS snapshots of GitHub Trending"
readme = "README.md"
requires-python = ">=3.14,<3.15"
dependencies = [
"beautifulsoup4>=4.13,<5",
"httpx>=0.28,<1",
]
[project.scripts]
github-trending = "github_trending.cli:main"
[dependency-groups]
dev = [
"complexipy>=8.0.1,<9",
"deptry>=0.23,<1",
"import-linter>=2.3,<3",
"mypy>=2.3.1,<3",
"pytest>=8.4,<10",
"ruff>=0.13,<1",
"types-beautifulsoup4>=4.12,<5",
]
[tool.hatch.build.targets.wheel]
packages = ["src/github_trending"]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.ruff]
target-version = "py314"
line-length = 100
[tool.ruff.lint]
select = [
"E4", "E7", "E9", "F", "I", "UP", "B", "A", "ASYNC", "BLE", "C4", "C90",
"D", "DTZ", "ERA", "G", "LOG", "N", "PERF", "PIE", "PGH", "PTH", "PT", "RET",
"RSE", "RUF", "S", "SIM", "T10", "TC", "TID", "PLE", "PLW", "PLR0911", "PLR0912",
"PLR0913", "PLR0915", "TRY004", "TRY201", "TRY203", "TRY400", "TRY401",
]
ignore = ["D100", "D104", "D105", "D107"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["D", "S101", "S105", "S106", "S108"]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pylint]
max-args = 5
max-branches = 12
max-returns = 6
max-statements = 50
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy]
strict = true
disallow_any_explicit = true
warn_unreachable = true
warn_unused_configs = true
show_error_codes = true
[tool.complexipy]
max-complexity-allowed = 15
exclude = ["tests/**"]
[tool.deptry]
known_first_party = ["github_trending"]
[tool.importlinter]
root_packages = ["github_trending"]
include_external_packages = true
[[tool.importlinter.contracts]]
name = "Domain is independent"
type = "forbidden"
source_modules = ["github_trending.domain"]
forbidden_modules = [
"github_trending.service",
"github_trending.adapters",
"github_trending.cli",
]
[[tool.importlinter.contracts]]
name = "Service depends on ports, not adapters"
type = "forbidden"
source_modules = ["github_trending.service"]
forbidden_modules = ["github_trending.adapters", "github_trending.cli"]