Skip to content

Commit bf1ac77

Browse files
committed
Use uv in the Justfile, refs #674
1 parent d328f7e commit bf1ac77

File tree

3 files changed

+19
-21
lines changed

3 files changed

+19
-21
lines changed

Justfile

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
11
# Run tests and linters
22
@default: test lint
33

4-
# Setup project
5-
@init:
6-
pipenv run pip install -e '.[test,docs,mypy,flake8]'
7-
84
# Run pytest with supplied options
95
@test *options:
10-
pipenv run pytest {{options}}
6+
just run pytest {{options}}
7+
8+
@run *options:
9+
uv run --isolated --with-editable '.[test,mypy,flake8,docs]' -- {{options}}
1110

1211
# Run linters: black, flake8, mypy, cog
1312
@lint:
14-
pipenv run black . --check
15-
pipenv run flake8
16-
pipenv run mypy sqlite_utils tests
17-
pipenv run cog --check README.md docs/*.rst
18-
pipenv run codespell docs/*.rst --ignore-words docs/codespell-ignore-words.txt
13+
just run black . --check
14+
just run flake8
15+
just run mypy sqlite_utils tests
16+
just run cog --check README.md docs/*.rst
17+
just run codespell docs/*.rst --ignore-words docs/codespell-ignore-words.txt
1918

2019
# Rebuild docs with cog
2120
@cog:
22-
pipenv run cog -r README.md docs/*.rst
21+
just run cog -r README.md docs/*.rst
2322

2423
# Serve live docs on localhost:8000
2524
@docs: cog
26-
cd docs && pipenv run make livehtml
25+
#!/usr/bin/env bash
26+
cd docs
27+
uv run --isolated --with-editable '../.[test,docs]' make livehtml
28+
2729

2830
# Apply Black
2931
@black:
30-
pipenv run black .
32+
just run black .

docs/contributing.rst

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,10 @@ All three of these tools are run by our CI mechanism against every commit and pu
8181

8282
.. _contributing_just:
8383

84-
Using Just and pipenv
85-
=====================
86-
87-
If you install `Just <https://github.com/casey/just>`__ and `pipenv <https://pipenv.pypa.io/>`__ you can use them to manage your local development environment.
88-
89-
To create a virtual environment and install all development dependencies, run::
84+
Using Just and uv
85+
=================
9086

91-
cd sqlite-utils
92-
just init
87+
If you install `Just <https://github.com/casey/just>`__ and `uv <https://github.com/astral-sh/uv>`__ you can use them to manage your local development environment.
9388

9489
To run all of the tests and linters::
9590

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ build-backend = "setuptools.build_meta"
7676
max-line-length = 160
7777
# Black compatibility, E203 whitespace before ':':
7878
extend-ignore = ["E203"]
79+
extend-exclude = [".venv", "build", "dist", "docs", "sqlite_utils.egg-info"]
7980

8081
[tool.setuptools.package-data]
8182
sqlite_utils = ["py.typed"]

0 commit comments

Comments
 (0)