-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
81 lines (69 loc) · 2.23 KB
/
pyproject.toml
File metadata and controls
81 lines (69 loc) · 2.23 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "moderators"
dynamic = ["version"]
description = "Moderators: One package to moderate them all"
readme = "README.md"
requires-python = ">=3.9"
license = "Apache-2.0"
authors = [{ name = "Moderators Team" }]
dependencies = [
"huggingface-hub>=0.22",
"requests"
]
[project.urls]
Homepage = "https://github.com/viddexa/moderators"
Source = "https://github.com/viddexa/moderators"
"Bug Reports" = "https://github.com/viddexa/moderators/discussions/categories/q-a"
Changelog = "https://github.com/viddexa/moderators/releases"
[project.optional-dependencies]
transformers = ["transformers>=4.36"]
dev = [
"pytest>=7.0",
"pytest-xdist",
"pillow>=9.0",
"ruff",
"docformatter",
"torch"
]
[project.scripts]
moderators = "moderators.cli:main"
[tool.hatch.version]
path = "src/moderators/__init__.py"
[tool.hatch.build.targets.wheel]
packages = ["src/moderators"]
[tool.ruff]
line-length = 120
target-version = "py39"
[tool.ruff.lint]
extend-select = ["F", "I", "D", "UP", "RUF", "FA"]
ignore = [
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D203", # 1 blank line required before class docstring
"D205", # 1 blank line required between summary line and description
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
"D401", # First line should be in imperative mood
"D406", # Section name should end with a newline
"D407", # Missing dashed underline after section
"D413", # Missing blank line after last section
"RUF001", # Ambiguous Unicode characters in strings
"RUF002", # Ambiguous Unicode characters in docstrings
"RUF012", # Mutable default values in class attributes
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["D103"] # Missing docstring in public function (tests don't need docstrings)
[tool.docformatter]
wrap-summaries = 120
wrap-descriptions = 120
pre-summary-newline = true
close-quotes-on-newline = true
[tool.uv.sources]
torch = { index = "pytorch-cpu" }
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true