forked from gradio-app/gradio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
98 lines (85 loc) · 2.86 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
[build-system]
requires = ["hatchling", "hatch-requirements-txt", "hatch-fancy-pypi-readme>=22.5.0"]
build-backend = "hatchling.build"
[project]
name = "gradio"
dynamic = ["version", "dependencies", "readme"]
description = "Python library for easily interacting with trained machine learning models"
license = "Apache-2.0"
requires-python = ">=3.7"
authors = [
{ name = "Abubakar Abid", email = "[email protected]" },
{ name = "Ali Abid", email = "[email protected]" },
{ name = "Ali Abdalla", email = "[email protected]" },
{ name = "Dawood Khan", email = "[email protected]" },
{ name = "Ahsen Khaliq", email = "[email protected]" },
{ name = "Pete Allen", email = "[email protected]" },
{ name = "Ömer Faruk Özdemir", email = "[email protected]" },
]
keywords = ["machine learning", "reproducibility", "visualization"]
[project.scripts]
gradio = "gradio.reload:main"
upload_theme = "gradio.themes.upload_theme:main"
[project.urls]
Homepage = "https://github.com/gradio-app/gradio"
[tool.hatch.version]
path = "gradio/version.txt"
pattern = "(?P<version>.+)"
[tool.hatch.metadata.hooks.requirements_txt]
filename = "requirements.txt"
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"
fragments = [
{ path = "README.md" },
]
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
pattern = "(website/homepage|readme_files)/"
replacement = 'https://raw.githubusercontent.com/gradio-app/gradio/main/\g<1>/'
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
pattern = 'demo/([\S]*.gif)'
replacement = 'https://raw.githubusercontent.com/gradio-app/gradio/main/demo/\g<1>'
[tool.hatch.build]
artifacts = [
"/gradio/templates",
]
[tool.hatch.build.targets.sdist]
include = [
"/gradio",
"/test",
"/README.md",
"/requirements.txt",
]
[tool.ruff]
target-version = "py37"
extend-select = [
"B",
"C",
"I",
"N",
"SIM",
"UP",
]
ignore = [
"C901", # function is too complex (TODO: un-ignore this)
"B023", # function definition in loop (TODO: un-ignore this)
"B008", # function call in argument defaults
"B017", # pytest.raises considered evil
"B028", # explicit stacklevel for warnings
"E501", # from scripts/lint_backend.sh
"SIM105", # contextlib.suppress (has a performance cost)
"SIM117", # multiple nested with blocks (doesn't look good with gr.Row etc)
"UP007", # use X | Y for type annotations (TODO: can be enabled once Pydantic plays nice with them)
]
[tool.ruff.per-file-ignores]
"demo/*" = [
"E402", # Demos may have imports not at the top
"E741", # Demos may have ambiguous variable names
"F405", # Demos may use star imports
"I", # Don't care about import order
]
"gradio/__init__.py" = [
"F401", # "Imported but unused" (TODO: it would be better to be explicit and use __all__)
]
"gradio/routes.py" = [
"UP006", # Pydantic on Python 3.7 requires old-style type annotations (TODO: drop when Python 3.7 is dropped)
]