forked from CouncilDataProject/cdp-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
234 lines (221 loc) · 6.38 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
# package build
# https://peps.python.org/pep-0517/
[build-system]
requires = ["setuptools>=65", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
# package basics
# https://peps.python.org/pep-0621/
[project]
name = "cdp-backend"
description = "Data storage utilities and processing pipelines used by CDP instances."
keywords = [
"civic technology",
"open government",
]
readme = "README.md"
requires-python = ">=3.8"
license = { text = "MIT License" }
authors = [
{ name = "Eva Maxfield Brown", email = "[email protected]" },
{ name = "To Huynh" },
{ name = "Isaac Na" },
{ name = "Council Data Project Contributors" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dynamic = ["version"]
dependencies = [
"aiohttp>=3.8.1",
"backoff>=2.2",
"dataclasses-json>=0.5",
"fireo~=1.5",
"fsspec", # Version pin set by gcsfs
"gcsfs>=2022.7.1",
"google-cloud-firestore", # Version pin set by fireo
"PyYAML>=5.4.1",
"requests>=2.26.0",
]
[project.urls]
Homepage = "https://github.com/CouncilDataProject/cdp-backend"
"Bug Tracker" = "https://github.com/CouncilDataProject/cdp-backend/issues"
Documentation = "https://CouncilDataProject.github.io/cdp-backend"
"User Support" = "https://github.com/CouncilDataProject/cdp-backend/issues"
# extra dependencies
# https://peps.python.org/pep-0621/#dependencies-optional-dependencies
[project.optional-dependencies]
pipeline = [
"dask[distributed]>=2021.7.0",
# We can't ship faster-whisper until they release a pypi package
# Install will have to make it a separate command
# "faster-whisper @ git+https://github.com/guillaumekln/faster-whisper.git",
"ffmpeg-python>=0.2.0",
"graphviz>=0.16",
"imageio>=2.18",
"imageio-ffmpeg>=0.4",
"m3u8-To-MP4==0.1.10",
"nltk>=3.6",
"numpy>=1.0",
"openai-whisper>=20230117",
"pandas>=1.2",
"prefect>=1.2,<2",
"pyarrow>=8.0",
"pydub>=0.25.1",
"rapidfuzz>=2.0",
"spacy>=3.4",
"spacy-transformers>=1.1",
"torch>=1.10",
"tqdm>=4.62",
"transformers>=4.16",
"vimeo_downloader>=0.4",
"yt-dlp>=2023.2.17",
]
functions = [
"flask==2.1.0",
"functions-framework==3.1.0",
"ffmpeg-python==0.2.0",
]
lint = [
"black>=22.3.0",
"check-manifest>=0.48",
"ruff>=0.0.216",
"mypy>=0.790",
"pre-commit>=2.20.0",
"types-requests>=2.28.5",
"types-pytz>=2022.1.2",
"types-PyYAML>=6.0.11",
]
test = [
# Pytest
"coverage>=5.1",
"pytest>=5.4.3",
"pytest-cov>=2.9.0",
"pytest-raises>=0.11",
# Extras
"networkx>=2.5",
"pydot>=1.4",
]
docs = [
# Sphinx + Doc Gen + Styling
"m2r2>=0.2.7",
"Sphinx>=4.0.0",
"furo>=2022.4.7",
# Extensions
"numpydoc",
"sphinx-copybutton",
# TODO: Pins
"docutils>=0.18,<0.19",
]
dev = [
"bokeh", # Used in dask / distributed for dashboard
"ipython>=8.4.0",
]
# entry points
# https://peps.python.org/pep-0621/#entry-points
[project.entry-points."console_scripts"]
clean_cdp_database = "cdp_backend.bin.clean_cdp_database:main"
clean_cdp_filestore = "cdp_backend.bin.clean_cdp_filestore:main"
create_cdp_database_uml = "cdp_backend.bin.create_cdp_database_uml:main"
create_cdp_ingestion_models_doc = "cdp_backend.bin.create_cdp_ingestion_models_doc:main"
create_cdp_transcript_model_doc = "cdp_backend.bin.create_cdp_transcript_model_doc:main"
run_cdp_event_gather = "cdp_backend.bin.run_cdp_event_gather:main"
run_cdp_event_index_generation = "cdp_backend.bin.run_cdp_event_index_generation:main"
process_cdp_event_index_chunk = "cdp_backend.bin.process_cdp_event_index_chunk:main"
search_cdp_events = "cdp_backend.bin.search_cdp_events:main"
process_special_event = "cdp_backend.bin.process_special_event:main"
add_content_hash_to_sessions = "cdp_backend.bin.add_content_hash_to_sessions:main"
store_cdp_metadata_document = "cdp_backend.bin.store_cdp_metadata_document:main"
get_cdp_infrastructure_stack = "cdp_backend.bin.get_cdp_infrastructure_stack:main"
# build settings
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
[tool.setuptools]
zip-safe = false
include-package-data = true
[tool.setuptools.packages.find]
exclude = ["*docs/*", "*tests/*"]
[tool.setuptools.package-data]
"*" = [
"*.yaml",
"py.typed",
"*.csv",
"*infrastructure/*.rules",
"*infrastructure/Justfile",
"*infrastructure/*.json",
"*infrastructure/**/.gcloudignore",
"*infrastructure/**/requirements.txt",
"*infrastructure/**/README.md",
]
# tools
[tool.black]
line-length = 88
# https://github.com/charliermarsh/ruff
[tool.ruff]
line-length = 88
target-version = "py38"
extend-select = [
"E", # style errors
"F", # flakes
"D", # pydocstyle
"I001", # isort
"UP", # pyupgrade
"N", # pep8-naming
# "S", # bandit
"C", # flake8-comprehensions
"B", # flake8-bugbear
"A001", # flake8-builtins
"RUF", # ruff-specific rules
"RUF100", # Unused noqa directive
]
extend-ignore = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D103", # Missing docstring in public function
"D107", # Missing docstring in __init__
"D203", # 1 blank line required before class docstring
"D205", # 1 blank line required between summary line and description
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
"D413", # Missing blank line after last section
"D416", # Section name should end with a colon
]
[tool.ruff.per-file-ignores]
"tests/*.py" = ["D"]
# https://github.com/mgedmin/check-manifest#configuration
[tool.check-manifest]
ignore = [
".editorconfig",
".pre-commit-config.yaml",
"CODE_OF_CONDUCT.md",
"CONTRIBUTING.md",
"Justfile",
".cookiecutter.yaml",
"*docs/*",
"codecov.yml",
"dev-infrastructure/**",
"example-configs/*",
"*_captions.vtt",
"*_transcript.json",
"*-transcript.json",
"*.vtt",
"*example_*.mp4",
"*example_*.mkv",
"*.parquet",
"*fake_*",
"*generated_*",
"*.wav",
"Dockerfile",
]
[tool.mypy]
files = "cdp_backend/*.py"
ignore_missing_imports = true
disallow_untyped_defs = true
check_untyped_defs = true
show_error_codes = true