-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
57 lines (48 loc) · 1.66 KB
/
justfile
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
python := shell("cat .python-version")
# Print this help documentation
help:
just --list
# Sync dev environment dependencies
sync:
uv sync --all-extras
# Run linting
lint:
black --check reprexlite tests
ruff check reprexlite tests
# Run static typechecking
typecheck:
mypy reprexlite --install-types --non-interactive
# Run tests
test:
uv run --python {{python}} --no-editable --all-extras --no-dev --group test --isolated \
python -I -m pytest
# Run all tests with Python version matrix
test-all:
for python in 3.8 3.9 3.10 3.11 3.12 3.13; do \
just python=$python test; \
done
# Generate test assets
generate-test-assets:
uv run --python {{python}} --all-extras --no-dev --group test --isolated \
python -I tests/expected_formatted.py
# Generate docs website
docs:
@echo "# CLI Help Documentation\n" > docs/docs/cli.md
@echo '```bash' >> docs/docs/cli.md
@echo "reprex --help" >> docs/docs/cli.md
@echo '```' >> docs/docs/cli.md
@echo "" >> docs/docs/cli.md
@echo '```' >> docs/docs/cli.md
@uv run reprex --help >> docs/docs/cli.md
@echo '```' >> docs/docs/cli.md
sed 's|https://raw.githubusercontent.com/jayqi/reprexlite/main/docs/docs/images/demo.gif|images/demo.gif|g' README.md \
| sed 's|https://jayqi.github.io/reprexlite/stable/||g' \
> docs/docs/index.md
sed 's|https://jayqi.github.io/reprexlite/stable/||g' CHANGELOG.md \
> docs/docs/changelog.md
uv run --python {{python}} --no-dev --group docs --isolated \
--directory docs/ \
python -I -m mkdocs build
# Serve built docs
docs-serve:
uv tool --verbose run quickhttp docs/site/