mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-21 01:01:05 +08:00
afcc20801e
* Remove versions from 3.7 * CHANGELOG * from typing import Literal * Remaning places 3.7 * Last few spots * Use 3.8 in lint
114 lines
3.4 KiB
TOML
114 lines
3.4 KiB
TOML
[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.8"
|
|
authors = [
|
|
{ name = "Abubakar Abid", email = "team@gradio.app" },
|
|
{ name = "Ali Abid", email = "team@gradio.app" },
|
|
{ name = "Ali Abdalla", email = "team@gradio.app" },
|
|
{ name = "Dawood Khan", email = "team@gradio.app" },
|
|
{ name = "Ahsen Khaliq", email = "team@gradio.app" },
|
|
{ name = "Pete Allen", email = "team@gradio.app" },
|
|
{ name = "Ömer Faruk Özdemir", email = "team@gradio.app" },
|
|
]
|
|
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/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)
|
|
]
|