Skip to content

Commit

Permalink
switch to uv (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
falkben authored Mar 3, 2024
1 parent ab7c422 commit 8bd8ed2
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 159 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
if: github.ref == 'refs/heads/main'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
Expand All @@ -40,7 +40,7 @@ jobs:
DROPBOX_ACCESS_TOKEN: ${{ secrets.DROPBOX_ACCESS_TOKEN }}
shell: bash

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: database.db
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
Expand All @@ -30,6 +30,6 @@ jobs:
APPIDS_FILE: test_data/app_list_limited.json

- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,29 @@ To install the project locally:

## Manage dependencies

1. install/upgrade pip-tools: `pip install pip-tools -U` or globally with [pipx](https://github.com/pypa/pipx): `pipx install pip-tools`
1. install/upgrade uv: `pipx install uv`
2. Create lock files with:

```sh
pip-compile -o requirements.txt pyproject.toml --quiet && \
pip-compile --extra dev -c requirements.txt -o dev-requirements.txt pyproject.toml --quiet
uv pip compile -o requirements.txt pyproject.toml --quiet && \
uv pip compile --extra dev -c requirements.txt -o dev-requirements.txt pyproject.toml --quiet
```

3. Upgrade a package:

```sh
pip-compile -o requirements.txt pyproject.toml --quiet --upgrade-package PACKAGE && \
pip-compile --extra dev -c requirements.txt -o dev-requirements.txt pyproject.toml --quiet
uv pip compile -o requirements.txt pyproject.toml --quiet --upgrade-package PACKAGE && \
uv pip compile --extra dev -c requirements.txt -o dev-requirements.txt pyproject.toml --quiet
```

4. Upgrade all packages with:

```sh
pip-compile -o requirements.txt pyproject.toml --quiet --upgrade && \
pip-compile --extra dev -c requirements.txt -o dev-requirements.txt pyproject.toml --quiet --upgrade
uv pip compile -o requirements.txt pyproject.toml --quiet --upgrade && \
uv pip compile --extra dev -c requirements.txt -o dev-requirements.txt pyproject.toml --quiet --upgrade
```

More here: <https://github.com/jazzband/pip-tools/>
More here: <https://github.com/astral-sh/uv>

## Run

Expand Down
152 changes: 30 additions & 122 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,74 +1,44 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --constraint=requirements.txt --extra=dev --output-file=dev-requirements.txt pyproject.toml
#
# This file was autogenerated by uv via the following command:
# uv pip compile --extra dev -c requirements.txt -o dev-requirements.txt pyproject.toml
aiofiles==23.2.1
# via
# -c requirements.txt
# datasette
# via datasette
alembic==1.13.1
# via
# -c requirements.txt
# steam2sqlite (pyproject.toml)
aniso8601==9.0.1
# via graphene
anyio==4.3.0
# via
# -c requirements.txt
# httpx
# via httpx
asgi-csrf==0.9
# via
# -c requirements.txt
# datasette
# via datasette
asgiref==3.7.2
# via
# -c requirements.txt
# datasette
# via datasette
certifi==2024.2.2
# via
# -c requirements.txt
# httpcore
# httpx
# requests
charset-normalizer==3.3.2
# via
# -c requirements.txt
# requests
# via requests
click==8.1.7
# via
# -c requirements.txt
# click-default-group
# datasette
# sqlite-utils
# uvicorn
click-default-group==1.2.4
# via
# -c requirements.txt
# datasette
# sqlite-utils
coverage[toml]==7.4.3
coverage==7.4.3
# via pytest-cov
datasette==0.64.6
# via
# -c requirements.txt
# datasette-graphql
# datasette-publish-fly
# datasette-vega
# steam2sqlite (pyproject.toml)
datasette-graphql==2.2
# via steam2sqlite (pyproject.toml)
datasette-publish-fly==1.3.1
# via
# -c requirements.txt
# steam2sqlite (pyproject.toml)
datasette-vega==0.6.2
# via steam2sqlite (pyproject.toml)
dropbox==11.36.2
# via
# -c requirements.txt
# steam2sqlite (pyproject.toml)
graphene==3.3
# via datasette-graphql
graphql-core==3.2.3
Expand All @@ -79,169 +49,107 @@ graphql-core==3.2.3
graphql-relay==3.2.0
# via graphene
greenlet==3.0.3
# via
# -c requirements.txt
# sqlalchemy
# via sqlalchemy
h11==0.14.0
# via
# -c requirements.txt
# httpcore
# uvicorn
httpcore==1.0.4
# via
# -c requirements.txt
# httpx
# via httpx
httpx==0.27.0
# via
# -c requirements.txt
# datasette
# steam2sqlite (pyproject.toml)
# via datasette
hupper==1.12.1
# via
# -c requirements.txt
# datasette
# via datasette
idna==3.6
# via
# -c requirements.txt
# anyio
# httpx
# requests
iniconfig==2.0.0
# via pytest
itsdangerous==2.1.2
# via
# -c requirements.txt
# asgi-csrf
# datasette
janus==1.0.0
# via
# -c requirements.txt
# datasette
# via datasette
jinja2==3.1.3
# via
# -c requirements.txt
# datasette
# via datasette
loguru==0.7.2
# via
# -c requirements.txt
# steam2sqlite (pyproject.toml)
mako==1.3.2
# via
# -c requirements.txt
# alembic
# via alembic
markupsafe==2.1.5
# via
# -c requirements.txt
# jinja2
# mako
mergedeep==1.3.4
# via
# -c requirements.txt
# datasette
# via datasette
packaging==23.2
# via pytest
pint==0.23
# via
# -c requirements.txt
# datasette
# via datasette
pip==24.0
# via datasette
pluggy==1.4.0
# via
# -c requirements.txt
# datasette
# pytest
# sqlite-utils
ply==3.11
# via
# -c requirements.txt
# stone
# via stone
pydantic==1.10.14
# via
# -c requirements.txt
# sqlmodel
# via sqlmodel
pytest==8.0.2
# via
# pytest-asyncio
# pytest-cov
# steam2sqlite (pyproject.toml)
pytest-asyncio==0.23.5
# via steam2sqlite (pyproject.toml)
pytest-cov==4.1.0
# via steam2sqlite (pyproject.toml)
python-dateutil==2.8.2
# via sqlite-utils
python-dotenv==1.0.1
# via
# -c requirements.txt
# steam2sqlite (pyproject.toml)
python-multipart==0.0.9
# via
# -c requirements.txt
# asgi-csrf
# via asgi-csrf
pyyaml==6.0.1
# via
# -c requirements.txt
# datasette
# via datasette
requests==2.31.0
# via
# -c requirements.txt
# dropbox
# via dropbox
ruff==0.2.2
# via steam2sqlite (pyproject.toml)
setuptools==69.1.1
# via datasette
six==1.16.0
# via
# -c requirements.txt
# dropbox
# python-dateutil
# stone
sniffio==1.3.0
# via
# -c requirements.txt
# anyio
# httpx
sqlalchemy==1.4.51
# via
# -c requirements.txt
# alembic
# sqlmodel
sqlalchemy2-stubs==0.0.2a38
# via
# -c requirements.txt
# sqlmodel
# via sqlmodel
sqlite-fts4==1.0.3
# via sqlite-utils
sqlite-utils==3.36
# via datasette-graphql
sqlmodel==0.0.11
# via
# -c requirements.txt
# steam2sqlite (pyproject.toml)
stone==3.3.1
# via
# -c requirements.txt
# dropbox
# via dropbox
tabulate==0.9.0
# via sqlite-utils
typing-extensions==4.9.0
# via
# -c requirements.txt
# alembic
# janus
# pint
# pydantic
# sqlalchemy2-stubs
urllib3==2.2.1
# via
# -c requirements.txt
# requests
# via requests
uvicorn==0.27.1
# via
# -c requirements.txt
# datasette
# via datasette
uvloop==0.19.0
# via
# -c requirements.txt
# steam2sqlite (pyproject.toml)

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

0 comments on commit 8bd8ed2

Please sign in to comment.