-
Notifications
You must be signed in to change notification settings - Fork 28
/
pyproject.toml
124 lines (116 loc) · 3.87 KB
/
pyproject.toml
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
[project]
name = "github-mirror"
version = "0.1.0"
description = "GitHub API mirror that caches the responses and implements conditional requests, serving the client with the cached responses when the GitHub API replies with a 304 HTTP code, reducing the number of API calls, making a more efficient use of the GitHub API rate limit."
authors = [
# Feel free to add or change authors
{ name = "Red Hat Application SRE Team", email = "[email protected]" },
]
license = { text = "GPLv2+" }
readme = "README.md"
requires-python = "~= 3.11.0"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Environment :: Web Environment",
"Framework :: Flask",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware",
]
dependencies = [
# 'uv add/remove XXX' to add and remove dependencies
"Flask ~=3.1.0",
"requests ~=2.32.3",
"prometheus_client ~=0.20",
"gunicorn ~=22.0.0",
"redis ~=5.0.4",
]
[project.urls]
homepage = "https://github.com/app-sre/github-mirror"
repository = "https://github.com/app-sre/github-mirror"
documentation = "https://github.com/app-sre/github-mirror"
[dependency-groups]
dev = [
# Development dependencies
"ruff ~=0.8",
"mypy ~=1.13",
"pytest ~=8.2.0",
"pytest-cov ~=5.0.0",
"pytest-forked ~=1.6.0",
"types-requests>=2.32.0.20241016",
]
# Ruff configuration
[tool.ruff]
line-length = 88
src = ["ghmirror"]
extend-exclude = [
# exclude some common cache and tmp directories
".local",
".cache",
"tmp",
]
fix = true
[tool.ruff.lint]
preview = true
select = ["ALL"]
ignore = [
"CPY", # Missing copyright header
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D203", # 1 blank line required before class docstring
"D211", # No blank lines allowed before class docstring
"D212", # multi-line-summary-first-line
"D213", # multi-line-summary-second-line
"D4", # Doc string style
"E501", # Line too long
"G004", # Logging statement uses f-string
"PLR0904", # Too many public methods
"PLR0913", # Too many arguments
"PLR0917", # Too many positional arguments
"S101", # Use of assert detected. Pytest uses assert
"S404", # subprocess import
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"S311", # Standard pseudo-random generators are not suitable for security/cryptographic purposes
"S324", # sha1 hash
"S403", # pickle usage
"TRY003", # Avoid specifying long messages outside the exception class
"TRY300", # try-consider-else
# pydoclint
"DOC",
# May conflict with the formatter, https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191",
"E111",
"E114",
"E117",
"D206",
"D300",
"Q",
"COM812",
"COM819",
"ISC001",
# Room for future improvements and refactoring
"ANN", # Missing annotation
"PT", # Use PyTest stuff instead unittest
"RUF012", # need type annotations
]
[tool.ruff.format]
preview = true
[tool.ruff.lint.isort]
known-first-party = ["ghmirror"]
# Coverage configuration
[tool.coverage.run]
branch = true
omit = ["*/tests/*"]
[tool.coverage.report]
fail_under = 98