-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjustfile
More file actions
102 lines (84 loc) · 2.44 KB
/
justfile
File metadata and controls
102 lines (84 loc) · 2.44 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/usr/bin/env just --justfile
# 'justfile'
# just-repo: https://github.com/casey/just
# just-docs: https://just.systems/man/en/
# list all targets (default)
@_default:
just --list --unsorted
# sync && test
dev: test
# sync deps
sync:
uv sync --all-extras --dev
# build packages
build:
rm -rfv dist
uv build -v --package aiopen
uv build -v --package asyncify
uv build -v --package fmts
uv build -v --package funkify
uv build -v --package h5
uv build -v --package jsonbourne
uv build -v --package lager
uv build -v --package listless
uv build -v --package requires
uv build -v --package shellfish
uv build -v --package xtyping
# test root + all libraries
test: sync
uv run pytest tests dgpydev
cd libs/aiopen && uv run pytest
cd libs/asyncify && uv run pytest
cd libs/dgpylibs && uv run pytest
cd libs/dgpytest && uv run pytest
cd libs/fmts && uv run pytest
cd libs/funkify && uv run pytest
cd libs/h5 && uv run pytest
cd libs/jsonbourne && uv run pytest
cd libs/lager && uv run pytest
cd libs/listless && uv run pytest
cd libs/requires && uv run pytest
cd libs/shellfish && uv run pytest
cd libs/xtyping && uv run pytest
# test a specific library `just test-lib h5`
test-lib dgpylib: dev
cd libs/{{dgpylib}} && uv run pytest
# test all libraries
test-all: (test-lib "aiopen") (test-lib "asyncify") (test-lib "dgpylibs") (test-lib "dgpytest") (test-lib "fmts") (test-lib "funkify") (test-lib "h5") (test-lib "jsonbourne") (test-lib "lager") (test-lib "listless") (test-lib "requires") (test-lib "shellfish") (test-lib "xtyping")
# fix imports
rsort:
uv run ruff check --select "I" --show-fixes --fix .
# sort imports
isort: rsort
# check spelling
codespell:
codespell .
# format python
fmt:
uv run ruff format
uv run ruff check --select "I,RUF022" --show-fixes --fix --unsafe-fixes .
pnpx prettier@latest -w --prose-wrap=always CHANGELOG.md
# fmt pyproject.toml files
pyproject-fmt:
find . -type f -name pyproject.toml | xargs -n1 pyproject-fmt --keep-full-version
# format-check
fmtc:
uv run ruff format --check
uv run ruff check --select "I" --show-fixes .
# ruff lint
ruff:
uv run ruff check .
# ruff lint & fix
ruffix:
uv run ruff check . --fix
# nox lint
noxlint:
nox -s lint
# mypy
mypy: fmt
uv run nox -s mypy
# lint
lint: fmt noxlint
# format the justfile(s) (w/ just)
fmt-justfile:
just --fmt --unstable