|
[build-system]
|
|
requires = [
|
|
"hatchling",
|
|
"hatch-requirements-txt",
|
|
"hatch-fancy-pypi-readme>=22.5.0",
|
|
]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "gradio"
|
|
dynamic = ["version", "dependencies", "optional-dependencies", "readme"]
|
|
description = "Python library for easily interacting with trained machine learning models"
|
|
license = "Apache-2.0"
|
|
requires-python = ">=3.8"
|
|
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]" },
|
|
{ name = "Freddy A Boulton", email = "[email protected]" },
|
|
{ name = "Hannah Blair", email = "[email protected]" },
|
|
]
|
|
keywords = ["machine learning", "reproducibility", "visualization"]
|
|
|
|
classifiers = [
|
|
'Development Status :: 5 - Production/Stable',
|
|
'License :: OSI Approved :: Apache Software License',
|
|
'Operating System :: OS Independent',
|
|
'Programming Language :: Python :: 3',
|
|
'Programming Language :: Python :: 3 :: Only',
|
|
'Programming Language :: Python :: 3.8',
|
|
'Programming Language :: Python :: 3.9',
|
|
'Programming Language :: Python :: 3.10',
|
|
'Programming Language :: Python :: 3.11',
|
|
'Topic :: Scientific/Engineering',
|
|
'Topic :: Scientific/Engineering :: Artificial Intelligence',
|
|
'Topic :: Scientific/Engineering :: Visualization',
|
|
]
|
|
|
|
[project.scripts]
|
|
gradio = "gradio.cli:cli"
|
|
upload_theme = "gradio.themes.upload_theme:main"
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/gradio-app/gradio"
|
|
|
|
[tool.hatch.version]
|
|
path = "gradio/package.json"
|
|
pattern = ".*\"version\":\\s*\"(?P<version>[^\"]+)\""
|
|
|
|
[tool.hatch.metadata.hooks.requirements_txt]
|
|
filename = "requirements.txt"
|
|
|
|
[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies]
|
|
oauth = ["requirements-oauth.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",
|
|
"/gradio/_frontend_code",
|
|
"*.pyi",
|
|
"/gradio/node",
|
|
"py.typed",
|
|
]
|
|
|
|
[tool.hatch.build.targets.lite]
|
|
artifacts = ["!gradio/templates", "!*.pyi", "!/gradio/test_data", "!/gradio/_frontend_code", "!/gradio/node"]
|
|
directory = "dist-lite"
|
|
dependencies = ["lite-builder @ {root:uri}/../.config/lite-builder"]
|
|
|
|
[tool.hatch.build.targets.wheel.hooks.custom]
|
|
path = ".config/copy_frontend.py"
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
include = [
|
|
"/gradio",
|
|
"/test",
|
|
"/README.md",
|
|
"/requirements.txt",
|
|
"/requirements-oauth.txt",
|
|
"/.config/copy_frontend.py",
|
|
"/js",
|
|
"/client/js",
|
|
]
|
|
|
|
[tool.pyright]
|
|
include = [
|
|
"gradio/**/*.py",
|
|
"demo/**/*.py",
|
|
"test/**/*.py",
|
|
]
|
|
exclude = [
|
|
"gradio/themes/",
|
|
"gradio/_frontend_code/",
|
|
"gradio/components/*_plot.py",
|
|
"gradio/node/*.py",
|
|
"gradio/_frontend_code/*.py",
|
|
]
|
|
stubPath = "gradio/stubs"
|
|
extraPaths = ["gradio/stubs"]
|
|
reportMissingImports = false
|
|
|
|
[tool.ruff]
|
|
exclude = ["gradio/node/*.py", ".venv/*", "gradio/_frontend_code/*.py"]
|
|
|
|
[tool.ruff.lint]
|
|
extend-select = [
|
|
"ARG",
|
|
"B",
|
|
"C",
|
|
"E",
|
|
"F",
|
|
"I",
|
|
"N",
|
|
"PL",
|
|
"S101",
|
|
"SIM",
|
|
"UP",
|
|
"W",
|
|
]
|
|
ignore = [
|
|
"B008",
|
|
"B017",
|
|
"B023",
|
|
"B028",
|
|
"C901",
|
|
"E501",
|
|
"PLR091",
|
|
"PLR2004",
|
|
"PLW2901",
|
|
"SIM105",
|
|
"SIM117",
|
|
"UP006",
|
|
"UP007",
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"demo/*" = [
|
|
"ARG",
|
|
"E402",
|
|
"E741",
|
|
"F405",
|
|
"I",
|
|
]
|
|
"gradio/__init__.py" = [
|
|
"F401",
|
|
]
|
|
"gradio/routes.py" = [
|
|
"UP006",
|
|
]
|
|
"gradio/cli/commands/files/NoTemplateComponent.py" = ["ALL"]
|
|
"client/python/gradio_client/serializing.py" = [
|
|
"ARG",
|
|
]
|
|
"client/python/test/*" = [
|
|
"ARG",
|
|
"S101",
|
|
]
|
|
"test/*" = [
|
|
"ARG",
|
|
"S101",
|
|
]
|
|
"client/python/test/test_client.py" = [
|
|
"PLW0603"
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
GRADIO_ANALYTICS_ENABLED = "False"
|
|
filterwarnings = ["ignore::UserWarning:gradio.*:", "ignore::DeprecationWarning:gradio.*:"]
|
|
|