-
Notifications
You must be signed in to change notification settings - Fork 24
/
Pipfile
276 lines (272 loc) · 8.89 KB
/
Pipfile
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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]
mypy-protobuf = "*"
"autopep8" = "*"
mock = "*"
pytest = "*"
# TODO(#23317): pytest-xdist changed its parallelization method after this result
# This resulted in our ModuleCollectorMixin encountering a condition where some modules were collected twice
pytest-xdist = "< 3.0"
pytest-cov = "*"
mypy = "*"
bandit = "*"
coveralls = "*"
# This should always be pinned to the latest version officially supported by Dataflow: https://cloud.google.com/dataflow/docs/support/sdk-version-support-status#python
# If this version is bumped then the beam version in recidiviz/pipelines/Dockerfile.pipelines must be as well.
apache-beam = { extras = ["gcp", "test"], version = "==2.58.1" }
debugpy = "*"
fakeredis = "*"
freezegun = "*"
ipdb = "*"
jupyter = "*"
orjson = "*"
pytest-alembic = "*"
pipenv = "*"
parameterized = "*"
google-api-python-client = "*"
google-auth-httplib2 = "*"
google-auth-oauthlib = "*"
gspread = "*"
# Note: Update the `black` version in `.pre-commit-config.yaml` whenever this is updated.
# If we remove the restriction, then add `pre-commit autoupdate` to the Pipenv Github action to keep them in sync.
black = { extras = ["jupyter"], version = "==22.3.0" }
pre-commit = "*"
proto-plus = "*"
pygtrie = "*"
rope = "*"
"ruamel.yaml" = "*"
tabula-py = "*"
types-beautifulsoup4 = "*"
types-cachetools = "*"
types-dateparser = "*"
types-freezegun = "*"
types-html5lib = "*"
types-httplib2 = "*"
types-itsdangerous = "*"
types-jsonschema = "*"
types-mock = "*"
types-paramiko = "*"
types-protobuf = "*"
types-psycopg2 = "*"
types-python-dateutil = "*"
types-pytz = "*"
types-redis = "*"
types-requests = "*"
types-PyYAML = "*"
msal = "*"
types-pysftp = "*"
Faker = "*"
# TODO(https://github.com/getsentry/responses/issues/556): Unpin this version once the
# responses package ships a version that doesn't break mypy.
responses = "==0.20.0"
shellcheck-py = "*"
# We do not rely on appnope directly, but we have to include it here because
# otherwise it will be dropped from the lock file since we do our locking on a Linux
# machine and appnope is Mac specific.
# TODO(#24261): Remove pin after pipenv sync issue with appnope=* is fixed
appnope = { version = "0.1.3", markers = "sys_platform == 'darwin'" }
# the following packages are ported over from the recidiviz-research pipfile and
# imported in at least one file in that repo and do *not* exist elsewhere here
censusdata = "*"
censusgeocode = "*"
Cycler = "*"
fuzzywuzzy = "*"
geopandas = "*"
geopy = "*"
h2o = "*"
jupyter-client = "*"
jupyter-console = "*"
jupyter-contrib-nbextensions = "*"
jupyter-core = "*"
jupyterlab = "*"
jupyter-nbextensions-configurator = "*"
ipython = "*"
lifelines = "*"
linearmodels = "*"
looker-sdk = "*"
nbautoexport = "*"
# TODO(#23543): unpin notebook version when child packages (e.g.
# jupyter-contrib-nbextensions) become compatible with Notebook 7
notebook = "==6.4.12"
pandasql = "*"
pgeocode = "*"
plotly = "*"
plotnine = "*"
scikit-learn = "*"
sentry-cli = "*"
shapely = "<2.0.0"
SyntheticControlMethods = "*"
tabulate = "*"
ydata-profiling = "*"
# end recidiviz-research dependencies
# TODO(#21447) Unpin urllib3 when worker signal 11 failure is fixed.
urllib3 = "==1.26.15"
sqlglot = "==23.11.2"
docker = "*"
docker-stubs = "*"
types-tabulate = "*"
[packages]
annotated-types="*"
callee = "*"
"html5lib" = "*"
# TODO(#30733): Remove the <2.0.0 pin
numpy = "<2.0.0"
us = "*"
dateparser = "*"
# TODO(#19995): Remove the <2.0.0 pin
pandas = "<2.0.0"
more-itertools = "*"
lxml = "*"
# TODO(open-telemetry/opentelemetry-python#3959): Unpin opentelemetry when cost increase is fixed.
opentelemetry-api = "==1.22.0"
opentelemetry-sdk = "*"
opentelemetry-exporter-gcp-monitoring = "*"
opentelemetry-exporter-gcp-trace = "*"
opentelemetry-resourcedetector-gcp = "*"
opentelemetry-instrumentation-flask = "*"
opentelemetry-instrumentation-grpc = "*"
opentelemetry-instrumentation-redis = "*"
opentelemetry-instrumentation-requests = "*"
opentelemetry-instrumentation-sqlalchemy = ">=0.43b0"
opentelemetry-semantic-conventions = ">=0.43b0"
opentelemetry-propagator-gcp = "*"
# TODO(#9157): Unpin alembic -- blocked by sqlalchemy/alembic#900 and sqlalchemy/alembic#903
alembic = "==1.6.5"
# TODO(#18145): Remove the <2.0.0 pin
# if this version is bumped or changed, the sqlalchmey version in
# recidiviz/pipelines/dataflow_flex_setup.py must be changed as well.
sqlalchemy = ">=1.4.25, <2.0.0"
flask = ">=2.0.0"
Flask-Limiter = "*"
Flask-SQLAlchemy-Session = "*"
Flask-WTF = "*"
flask-smorest = "*"
iteration-utilities = "*"
"pypdf2" = "*"
pyyaml = "*"
pyjwt = "*"
cssselect = "*"
grpcio = "*"
gunicorn = "*"
gevent = ">=20.5.1"
google-api-core = "*"
google-cloud-core = "*"
google-cloud-bigquery = "*"
google-cloud-bigquery-datatransfer = "*"
google-cloud-bigquery-storage = "*"
google-cloud-build = "*"
google-cloud-dataflow-client = "*"
google-cloud-datastore = "*"
google-cloud-discoveryengine = "*"
google-cloud-firestore = "*"
google-cloud-logging = "*"
google-cloud-monitoring = "*"
google-cloud-orchestration-airflow = "*"
google-cloud-tasks = "*"
google-cloud-pubsub = "*"
google-cloud-secret-manager = "*"
# Version must be at least 2.18.2 to mitigate https://github.com/apache/beam/issues/32169 for apache-beam versions
# 2.53.0 - 2.58.*
google-cloud-storage = ">=2.18.2"
google-cloud-trace = "*"
wrapt = "*"
attrs = "*"
# TODO(docker/docker-py#3256): Unpin when docker-py fixes issue
requests = "==2.31.0"
pytz = "*"
# TODO(#9732): Upgrade to 4.0 introduces dateparsing errors to ingest controller tests
tzlocal = "<4.0"
python-dateutil = "*"
# If the protobuf version changes be sure to update the pinned version in dataflow_setup.py
protobuf = "*"
"psycopg2" = "*"
cryptography = "*"
google-api-python-client = "*"
google-auth = "*"
deepdiff = "*"
"mmh3" = "*"
yq = "*"
oauth2client = "*" #TODO(#2922): Remove deprecated oauth2client dependency
progress = "*"
pandas-gbq = "*"
guppy3 = "*"
sendgrid = "*"
zope = { event = "*" }
psutil = "*"
psycogreen = "*"
marshmallow = "*"
marshmallow_enum = "*"
cattrs = "*"
# If the dill version changes be sure to update the pinned version in dataflow_setup.py
dill = "==0.3.1.1"
matplotlib = "*"
scipy = "*"
seaborn = "*"
statsmodels = "*"
openpyxl = "*"
analytics-python = "*"
astroid = "*"
redis = "*"
pyarrow = "*"
auth0-python = "*"
sentry-sdk = { extras = ["flask"], version = "*" }
blinker = "*"
beautifulsoup4 = "*"
paramiko = "*"
tqdm = "*"
types-tqdm = "*"
linearmodels = "*"
jsonschema = "*"
proto-plus = "*"
nltk = "*"
thefuzz = "*"
# Needed for thefuzz to avoid "Using slow pure-python SequenceMatcher" warning
python-Levenshtein = "*"
ratelimit = "*"
ratelimit-stubs = "*"
pysftp = "*"
nbconvert = ">=6.5.1"
PyGithub = "*"
xlsxwriter = "*"
pytablewriter = "*"
# TODO(#25939): Unpin once Jupyter installation issue has been fixed
traitlets = "5.9.0"
twilio = "*"
twilio-stubs = "*"
# TODO(#21447) Unpin urllib3 when worker signal 11 failure is fixed.
urllib3 = "==1.26.15"
xlrd = "*"
google-cloud-run = "*"
snapshottest = "*"
cachetools = "*"
functions-framework = "*"
cloudevents = "*"
quart = "*"
hypercorn = "*"
vertexai = "*"
asyncpg ="*"
pygit2 = "*"
matplotx = "*"
[requires]
# If you change this, please update https://github.com/Recidiviz/recidiviz-research at the same time!
python_version = "3.11"
[scripts]
# Run via `pipenv run <name>`
pylint = "./recidiviz/tools/lint/run_pylint.sh"
docker-build = "docker build . -f Dockerfile --target recidiviz-app -t us-docker.pkg.dev/recidiviz-staging/appengine/default:latest --platform=linux/amd64"
docker-build-dev = "docker build . -f Dockerfile --target recidiviz-dev -t us-docker.pkg.dev/recidiviz-staging/appengine/default:latest --platform=linux/amd64"
docker-build-base = "docker build . -f Dockerfile.recidiviz-base -t us-docker.pkg.dev/recidiviz-staging/recidiviz-base/default:latest --platform=linux/amd64"
cloudsql = "./recidiviz/tools/postgres/access_cloudsql_instance.sh"
docker-admin = "docker compose -f docker-compose.yaml -f docker-compose.admin-panel.yaml up"
# Specific to Justice Counts team
# For `docker-build-jc` commands, append the build arg FRONTEND_URL at the end
# e.g. `docker-build-jc --build-arg FRONTEND_URL=https://github.com/Recidiviz/justice-counts/archive/main.tar.gz`
docker-build-jc = "docker build . -f Dockerfile.justice-counts -t us-central1-docker.pkg.dev/justice-counts-staging/publisher-and-dashboard-images/main:latest --platform=linux/amd64"
docker-jc = "docker compose -f docker-compose.yaml -f docker-compose.justice-counts.yaml up"
fixtures-jc = "docker exec pulse-data-control_panel_backend-1 pipenv run python -m recidiviz.tools.justice_counts.control_panel.load_fixtures"
migrate-jc = "python -m recidiviz.tools.migrations.autogenerate_migration --database JUSTICE_COUNTS --message "
docker-build-prototypes = "docker build . -f Dockerfile.prototypes -t us-central1-docker.pkg.dev/recidiviz-staging/prototypes/main:latest --platform=linux/amd64"
docker-prototypes = "docker compose -f docker-compose.yaml -f docker-compose.prototypes.yaml up"