-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
57 lines (44 loc) · 1.74 KB
/
Copy pathjustfile
File metadata and controls
57 lines (44 loc) · 1.74 KB
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
# Dev scripts. Everything runs through uv, so there is no virtualenv to
# activate and no lockfile drift between machines.
default:
@just --list
# Create the environment and install everything, adapters included.
install:
uv sync --all-extras --group dev
# A local stand-in for the DeepTrust API on :8080, so the client, the adapters
# and the examples run with no key and no network. Not the analysis: it matches
# a handful of patterns, which is enough to see the shapes hold.
devserver:
uv run uvicorn dev.server:app --host 127.0.0.1 --port 8080 --reload
test:
uv run pytest -q
# Watch mode, for when you are actually writing something.
watch:
uv run pytest -q --looponfail
lint:
uv run ruff check src tests
uv run ruff format --check src tests
fmt:
uv run ruff check --fix src tests
uv run ruff format src tests
types:
uv run mypy
# What CI runs. Run this before pushing.
check: lint types test
# Clears dist first, so `smoke` cannot pick up a wheel from an older name or
# version and pass on the wrong artifact.
build:
rm -rf dist
uv build
# Installs the built wheel on its own and imports it, which is what catches a
# package missing from pyproject: the source tree would have imported fine.
smoke:
uv run --isolated --no-project --with dist/*.whl python -c "import deeptrust; from deeptrust.agents import DeepTrust; print(deeptrust.__version__)"
# Releases go through the release workflow on a tag, so that publishing uses
# PyPI trusted publishing and never a token on someone's laptop. This target is
# for a manual upload when that is unavailable.
publish: check build
uv publish
clean:
rm -rf dist .pytest_cache .mypy_cache .ruff_cache
find . -name __pycache__ -type d -prune -exec rm -rf {} +