-
Notifications
You must be signed in to change notification settings - Fork 108
/
pyproject.toml
242 lines (210 loc) · 5.13 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
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
[project]
name = "dolma"
version = "1.1.0"
description = "Data filters"
license = { text = "Apache-2.0" }
readme = "README.md"
requires-python = ">=3.9"
dependencies = [
"anyascii>=0.3.2",
"blingfire==0.1.8",
"boto3>=1.28",
"cached-path>=1.5.1",
# "fasttext==0.9.2", # broken with new version of setuptools; using fasttext-wheel instead
"fasttext-wheel==0.9.2",
"fsspec>=2023.6.0",
"jsonpath-ng",
"jq",
"msgspec>=0.14.2",
"nltk>=3.9.1",
"omegaconf>=2.3.0",
# "pycld2==0.41",
# "pycld3==0.22", # does not install correctly
"platformdirs>=4.2.0",
"pyyaml",
"python-dotenv>=0.19.0",
"requests",
"rich",
"s3fs>=2023.6.0",
"smart-open",
"tokenizers>=0.15.0,<=0.19.1",
"tqdm",
"uniseg",
"numpy<2",
"necessary>=0.4.3",
"charset-normalizer>=3.2.0",
"zstandard>=0.23.0",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Rust",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Text Processing",
"Typing :: Typed",
]
[[project.authors]]
name = "Allen Institute for Artificial Intelligence"
email = "[email protected]"
[[project.authors]]
name = "Luca Soldaini"
email = "[email protected]"
[[project.authors]]
name = "Kyle Lo"
email = "[email protected]"
[[project.authors]]
name = "Rodney Kinney"
email = "[email protected]"
[[project.authors]]
name = "Aakanksha Naik"
email = "[email protected]"
[[project.authors]]
name = "Abhilasha Ravichander"
email = "[email protected]"
[[project.authors]]
name = "Akshita Bhagia"
email = "[email protected]"
[[project.authors]]
name = "Dirk Groeneveld"
email = "[email protected]"
[[project.authors]]
name = "Dustin Schwenk"
email = "[email protected]"
[[project.authors]]
name = "Ian Magnusson"
email = "[email protected]"
[[project.authors]]
name = "Khyathi Chandu"
email = "[email protected]"
[[project.maintainers]]
name = "Allen Institute for Artificial Intelligence"
email = "[email protected]"
[project.urls]
Homepage = "https://github.com/allenai/dolma"
[project.scripts]
dolma = "dolma.cli.__main__:main"
[project.optional-dependencies]
dev = [
"black>=22.6.0",
"flake8>=5.0",
"flake8-pyi>=22.8.1",
"Flake8-pyproject>=1.1.0",
"ipdb>=0.13.0",
"ipython>=8.4.0",
"isort>=5.10.1",
"mypy>=0.971",
"pytest>=5.2",
]
# extension to process code
code = ["detect-secrets==1.4.0", "beautifulsoup4>=4", "pygments", "regex"]
# extension to detect PIIs using presidio
pii = ["presidio_analyzer==2.2.32", "regex"]
# language detection; by default, we use fastttext, everything else is optional
lang = [
"fasttext-wheel==0.9.2",
"LTpycld2==0.42", # fork of pycld2 that works on Apple Silicon
"lingua-language-detector>=2.0.0",
"langdetect>=1.0.9",
]
# extension to parse warc files
warc = ["fastwarc", "w3lib", "url-normalize"]
trafilatura = [
# must include warc dependencies
"dolma[warc]",
# core package
"trafilatura>=1.6.1",
# following are all for speeding up trafilatura
"brotli",
"cchardet >= 2.1.7; python_version < '3.11'", # build issue
"faust-cchardet >= 2.1.18; python_version >= '3.11'", # fix for build
"htmldate[speed] >= 1.4.3",
"py3langid >= 0.2.2",
]
resiliparse = ["dolma[warc]", "resiliparse"]
# all extensions
all = [
"dolma[dev]",
"dolma[code]",
"dolma[pii]",
"dolma[trafilatura]",
"dolma[resiliparse]",
"dolma[lang]",
]
[build-system]
requires = [
"setuptools >= 61.0.0",
"wheel",
"maturin[patchelf]>=1.1,<2.0 ; platform_system=='Linux'",
"maturin>=1.1,<2.0 ; platform_system!='Linux'",
]
build-backend = "maturin"
[tool.maturin]
python-source = "python"
features = ["pyo3/extension-module"]
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
dolma = ["py.typed", "data/*"]
[tool.black]
line-length = 115
include = '\.pyi?$'
exclude = '''
(
__pycache__
| \.git
| \.mypy_cache
| \.pytest_cache
| \.vscode
| \.venv
| \bdist\b
| \bdoc\b
| \.cargo
| configs
| docs
| scripts
| sources
| src
| target
| tests/config
| tests/data
| tests/work
)
'''
target-version = ["py39", "py310", "py311", "py312"]
[tool.isort]
profile = "black"
py_version = 39
known_first_party = ["dolma"]
known_local_folder = ["tests", "python"]
extend_skip_glob = [
"configs/*",
"docs/*",
"scripts/*",
"sources/*",
"src/*",
"tests/config/*",
"tests/data/*",
"tests/work/*",
]
[tool.autopep8]
max_line_length = 115
in-place = true
recursive = true
aggressive = 3
[tool.mypy]
python_version = "3.9"
ignore_missing_imports = true
no_site_packages = true
allow_redefinition = false
warn_unused_configs = true
warn_unused_ignores = true
warn_no_return = true
warn_return_any = false
warn_unreachable = true
show_error_codes = true
pretty = true
plugins = ["numpy.typing.mypy_plugin"]
[tool.mypy-tests]
strict_optional = false