Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
142 lines (128 loc) · 4.56 KB
/
Copy pathpyproject.toml
File metadata and controls
142 lines (128 loc) · 4.56 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
[project]
name = "TensorFlowASR"
version = "3.1.1"
description = "Almost State-of-the-art Automatic Speech Recognition using Tensorflow 2"
readme = "README.md"
license = { text = "Apache-2.0" }
requires-python = ">=3.12,<3.13"
authors = [{ name = "Huy Le Nguyen", email = "nlhuy.cs.16@gmail.com" }]
classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Intended Audience :: Science/Research",
"Operating System :: POSIX :: Linux",
"License :: OSI Approved :: Apache Software License",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"SoundFile~=0.12.1",
"nltk>=3.9.0",
"sentencepiece~=0.2.0",
"tqdm>=4.67.1",
"librosa~=0.10.1",
"PyYAML~=6.0.1",
"sounddevice~=0.4.6",
"jinja2~=3.1.3",
"fire>=0.7.0",
"jiwer~=3.0.3",
# https://github.com/keras-team/keras/issues/20568#issuecomment-2510432421
"keras>=3.15.0",
"cached_property~=2.0.1",
"ipywidgets~=8.1.5",
"ipython<9.0.0",
"kagglehub~=0.3.6",
"datasets~=3.5.1",
"tabulate~=0.9.0",
"tensorflow~=2.19.0",
"tensorflow-text~=2.19.0",
"num2words>=0.5.14",
]
[project.optional-dependencies]
# `tensorflow-metal` only publishes macosx_12_0_arm64 wheels, so it needs an environment marker:
# uv resolves a universal lock covering every platform in the marker space, and an unmarked
# requirement has to be satisfiable on Windows too.
#
# There is deliberately no `tpu` extra. `tensorflow-tpu` ships its own `tensorflow` distribution
# and `tensorflow` is a base dependency above, so an extra adding it installs *both* -- resolving
# `.[tpu]` for linux yields `tensorflow==2.19.1` and `tensorflow-tpu==2.19.1`, and whichever lands
# last wins. Uninstall-then-install is the only way to get it right, which is what
# `scripts/install_tpu.sh` does (and what `setup.sh tpu` did before the move to uv).
apple = [
"tensorflow-metal~=1.2.0; sys_platform == 'darwin' and platform_machine == 'arm64'",
]
cuda = ["tensorflow[and-cuda]~=2.19.0"]
dev = [
"pytest>=7.4.1",
"ruff>=0.14.0",
"matplotlib>=3.7.2",
"pydot-ng>=2.0.0",
"graphviz>=0.20.1",
"pre-commit>=3.7.0",
"tf2onnx>=1.16.1",
"netron>=8.0.3",
"kaggle>=2.2.4",
]
[project.urls]
Homepage = "https://github.com/TensorSpeech/TensorFlowASR"
Repository = "https://github.com/TensorSpeech/TensorFlowASR"
[project.scripts]
tensorflow_asr = "tensorflow_asr.scripts:main"
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["tensorflow_asr", "tensorflow_asr.*"]
[tool.uv]
# librosa pulls numba in transitively with a very loose numpy constraint. Left
# alone, uv maximises numpy (2.5.x) and backtracks numba to 0.53.1, whose
# llvmlite 0.36 sdist hard-fails to build on Python >= 3.10. Holding numba
# modern caps numpy to a range they actually agree on.
constraint-dependencies = ["numba>=0.62"]
[tool.semantic_release]
# Keeps [project].version in step with the git tag
version_toml = ["pyproject.toml:project.version"]
tag_format = "v{version}"
commit_parser = "conventional"
build_command = "uv build"
commit_message = "chore(release): v{version} [skip ci]"
# 3.0.0 is already released; never fall back to 0.x versioning
allow_zero_version = false
[tool.semantic_release.branches.main]
match = "main"
prerelease = false
[tool.semantic_release.changelog]
mode = "update"
[tool.semantic_release.changelog.default_templates]
changelog_file = "CHANGELOG.md"
output_format = "md"
[tool.ruff]
line-length = 150
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "W", "I"]
ignore = [
"E402", # module level import not at top of file
"E501", # line too long, handled by the formatter
"E701", # multiple statements on one line (colon)
"E702", # multiple statements on one line (semicolon)
"E731", # lambda assignment
"E741", # ambiguous variable name
# Previously suppressed via .pylintrc (broad-except, unused-variable).
# Drop these two entries to surface the existing findings.
"E722", # bare except
"F841", # unused local variable
]
[tool.ruff.lint.isort]
known-first-party = ["tensorflow_asr"]
[tool.pytest.ini_options]
minversion = "6.0"
log_cli = true
log_cli_level = "WARNING"
log_format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
testpaths = "tests"
python_files = "test_*.py"
addopts = "-s --durations=0"
filterwarnings = ["error", "ignore::UserWarning", "ignore::DeprecationWarning"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"