Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore : Use uv to resolve dependencies #226

Merged
merged 4 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions api/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,12 @@ tox
# 1. add/remove packages from the requirements in setup.py

# 2. compile dependencies
pip-compile --output-file=requirements/requirements.txt && \
pip-compile --extra=dev --output-file=requirements/dev-requirements.txt && \
pip-compile --extra=test --output-file=requirements/test-requirements.txt

make
```

### 2. Upgrading packages

```bash
# 1. compile dependencies with the upgrade flag set
pip-compile --upgrade --output-file=requirements/requirements.txt && \
pip-compile --upgrade --extra=dev --output-file=requirements/dev-requirements.txt && \
pip-compile --upgrade --extra=test --output-file=requirements/test-requirements.txt
make upgrade all
```
23 changes: 23 additions & 0 deletions api/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
UV_VERSION := 0.1.33

PIP_COMPILE := pipx run uv pip compile setup.py --quiet

ifeq ($(filter upgrade,$(MAKECMDGOALS)),upgrade)
PIP_COMPILE += --upgrade
endif

.PHONY: all dev base test uv upgrade

all: base dev test

uv:
pip install uv==$(UV_VERSION)

base: uv
$(PIP_COMPILE) --output-file=requirements/requirements.txt

dev: uv
$(PIP_COMPILE) --extra=dev --output-file=requirements/dev-requirements.txt

test: uv
$(PIP_COMPILE) --extra=test --output-file=requirements/test-requirements.txt
122 changes: 40 additions & 82 deletions api/requirements/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --extra=dev --output-file=requirements/dev-requirements.txt
#
# This file was autogenerated by uv via the following command:
# uv pip compile setup.py --extra=dev --output-file=requirements/dev-requirements.txt
alembic==1.13.1
# via data-inclusion-api (setup.py)
annotated-types==0.6.0
# via pydantic
anyio==4.3.0
Expand All @@ -26,7 +21,6 @@ cachetools==5.3.3
# via tox
certifi==2024.2.2
# via
# data-inclusion-api (setup.py)
# fiona
# httpcore
# httpx
Expand All @@ -48,7 +42,6 @@ click==8.1.7
# via
# click-plugins
# cligj
# data-inclusion-api (setup.py)
# fiona
# uvicorn
click-plugins==1.1.1
Expand All @@ -58,60 +51,48 @@ cligj==0.7.2
colorama==0.4.6
# via tox
cryptography==42.0.5
# via
# data-inclusion-api (setup.py)
# python-jose
# via python-jose
data-inclusion-schema==0.14.0
# via data-inclusion-api (setup.py)
distlib==0.3.8
# via virtualenv
dnspython==2.6.1
# via email-validator
ecdsa==0.18.0
ecdsa==0.19.0
# via python-jose
email-validator==2.1.1
# via pydantic
faker==23.3.0
# via data-inclusion-api (setup.py)
fastapi==0.110.0
faker==24.11.0
fastapi==0.110.2
# via
# data-inclusion-api (setup.py)
# fastapi-debug-toolbar
# fastapi-pagination
# sentry-sdk
fastapi-debug-toolbar==0.6.2
# via data-inclusion-api (setup.py)
fastapi-pagination==0.12.17
# via data-inclusion-api (setup.py)
filelock==3.13.1
fastapi-pagination==0.12.23
filelock==3.13.4
# via
# tox
# virtualenv
fiona==1.9.6
# via geopandas
furl==2.1.3
# via data-inclusion-api (setup.py)
geoalchemy2==0.14.6
# via data-inclusion-api (setup.py)
geoalchemy2==0.14.7
geopandas==0.14.3
# via data-inclusion-api (setup.py)
greenlet==3.0.3
# via sqlalchemy
gunicorn==21.2.0
# via data-inclusion-api (setup.py)
gunicorn==22.0.0
h11==0.14.0
# via
# httpcore
# uvicorn
httpcore==1.0.4
httpcore==1.0.5
# via httpx
httptools==0.6.1
# via uvicorn
httpx==0.27.0
# via data-inclusion-api (setup.py)
identify==2.5.35
identify==2.5.36
# via pre-commit
idna==3.6
idna==3.7
# via
# anyio
# email-validator
Expand All @@ -121,83 +102,71 @@ inflate64==1.0.0
# via py7zr
jinja2==3.1.3
# via fastapi-debug-toolbar
mako==1.3.2
mako==1.3.3
# via alembic
markupsafe==2.1.5
# via
# jinja2
# mako
minio==7.2.5
# via data-inclusion-api (setup.py)
multivolumefile==0.2.3
# via py7zr
nodeenv==1.8.0
# via pre-commit
numpy==1.26.4
# via
# data-inclusion-api (setup.py)
# pandas
# pyarrow
# shapely
orderedmultidict==1.0.1
# via furl
packaging==23.2
packaging==24.0
# via
# geoalchemy2
# geopandas
# gunicorn
# pyproject-api
# tox
pandas==2.2.1
# via
# data-inclusion-api (setup.py)
# geopandas
pandas==2.2.2
# via geopandas
platformdirs==4.2.0
# via
# tox
# virtualenv
pluggy==1.4.0
pluggy==1.5.0
# via tox
pre-commit==3.6.2
# via data-inclusion-api (setup.py)
pre-commit==3.7.0
psutil==5.9.8
# via py7zr
psycopg2==2.9.9
# via data-inclusion-api (setup.py)
py7zr==0.21.0
# via data-inclusion-api (setup.py)
pyarrow==15.0.0
# via data-inclusion-api (setup.py)
pyasn1==0.5.1
pyarrow==16.0.0
pyasn1==0.6.0
# via
# python-jose
# rsa
pybcj==1.0.2
# via py7zr
pycparser==2.21
pycparser==2.22
# via cffi
pycryptodome==3.20.0
# via minio
pycryptodomex==3.20.0
# via py7zr
pydantic[email]==2.6.3
pydantic==2.7.0
# via
# data-inclusion-api (setup.py)
# data-inclusion-schema
# fastapi
# fastapi-debug-toolbar
# fastapi-pagination
# pydantic
# pydantic-extra-types
# pydantic-settings
pydantic-core==2.16.3
pydantic-core==2.18.1
# via pydantic
pydantic-extra-types==2.6.0
# via fastapi-debug-toolbar
pydantic-settings==2.2.1
# via
# data-inclusion-api (setup.py)
# fastapi-debug-toolbar
# via fastapi-debug-toolbar
pyinstrument==4.6.2
# via fastapi-debug-toolbar
pyppmd==1.1.0
Expand All @@ -212,30 +181,25 @@ python-dateutil==2.9.0.post0
# pandas
python-dotenv==1.0.1
# via
# data-inclusion-api (setup.py)
# pydantic-settings
# uvicorn
python-jose[cryptography]==3.3.0
# via data-inclusion-api (setup.py)
python-jose==3.3.0
pytz==2024.1
# via
# data-inclusion-api (setup.py)
# pandas
# via pandas
pyyaml==6.0.1
# via
# pre-commit
# uvicorn
pyzstd==0.15.10
# via py7zr
requests==2.31.0
# via data-inclusion-api (setup.py)
rsa==4.9
# via python-jose
ruff==0.3.0
# via data-inclusion-api (setup.py)
sentry-sdk[fastapi]==1.40.6
# via data-inclusion-api (setup.py)
shapely==2.0.3
ruff==0.4.1
sentry-sdk==1.45.0
setuptools==69.5.1
# via nodeenv
shapely==2.0.4
# via geopandas
six==1.16.0
# via
Expand All @@ -248,22 +212,19 @@ sniffio==1.3.1
# via
# anyio
# httpx
sqlalchemy==2.0.28
sqlalchemy==2.0.29
# via
# alembic
# data-inclusion-api (setup.py)
# geoalchemy2
sqlparse==0.4.4
sqlparse==0.5.0
# via fastapi-debug-toolbar
starlette==0.36.3
starlette==0.37.2
# via fastapi
texttable==1.7.0
# via py7zr
tox==4.13.0
# via data-inclusion-api (setup.py)
tox==4.14.2
tqdm==4.66.2
# via data-inclusion-api (setup.py)
typing-extensions==4.10.0
typing-extensions==4.11.0
# via
# alembic
# fastapi
Expand All @@ -279,18 +240,15 @@ urllib3==2.2.1
# minio
# requests
# sentry-sdk
uvicorn[standard]==0.27.1
# via data-inclusion-api (setup.py)
uv==0.1.35
uvicorn==0.29.0
uvloop==0.19.0
# via uvicorn
virtualenv==20.25.1
virtualenv==20.25.3
# via
# pre-commit
# tox
watchfiles==0.21.0
# via uvicorn
websockets==12.0
# via uvicorn

# The following packages are considered to be unsafe in a requirements file:
# setuptools
Loading