pyproject.toml 2.65 KB
Newer Older
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
# Package ######################################################################

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "transformers"
description = "State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow"
readme = "README.md"
requires-python = ">= 3.7"
authors = [
    { name = "The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/transformers/graphs/contributors)", email = "transformers@huggingface.co" },
]
license = { text = "Apache 2.0 License" }
keywords = [
    "NLP",
    "vision",
    "speech",
    "deep learning",
    "transformer",
    "pytorch",
    "tensorflow",
    "jax",
    "BERT",
    "GPT-2",
    "Wav2Vec2",
    "ViT",
]
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Developers",
    "Intended Audience :: Education",
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: Apache Software License",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.7",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dynamic = ["dependencies", "optional-dependencies", "version"]

[project.scripts]
transformers-cli = "transformers.commands.transformers_cli:main"

[project.urls]
Homepage = "https://huggingface.co"
Repository = "https://github.com/huggingface/transformers"
Documentation = "https://huggingface.co/docs/transformers"
"Bug Report" = "https://github.com/huggingface/transformers/issues"

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
transformers = ["*.cu", "*.cpp", "*.cuh", "*.h", "*.pyx"]

# Linter tools #################################################################

66
67
[tool.black]
line-length = 119
68
69
70
71
target-version = ['py37']

[tool.ruff]
# Never enforce `E501` (line length violations).
Sylvain Gugger's avatar
Sylvain Gugger committed
72
ignore = ["C901", "E501", "E741", "W605"]
73
select = ["C", "E", "F", "I", "W"]
74
75
line-length = 119

Sylvain Gugger's avatar
Sylvain Gugger committed
76
77
78
79
80
81
# Ignore import violations in all `__init__.py` files.
[tool.ruff.per-file-ignores]
"__init__.py" = ["E402", "F401", "F403", "F811"]
"src/transformers/file_utils.py" = ["F401"]
"src/transformers/utils/dummy_*.py" = ["F401"]

82
83
84
[tool.ruff.isort]
lines-after-imports = 2
known-first-party = ["transformers"]
85

86
87
88
# This is ignored, maybe because of the header? If someone finds a fix, we can uncomment and remove setup.cfg
# [tool.pytest]
# doctest_optionflags="NUMBER NORMALIZE_WHITESPACE ELLIPSIS"