-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathjustfile
79 lines (62 loc) · 2.16 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# See https://just.systems/man/en/ for instructions
set shell := ["bash", "-c"]
set dotenv-load
set dotenv-filename := "./.evergreen/scripts/env.sh"
# Commonly used command segments.
uv_run := "uv run --isolated --frozen "
typing_run := uv_run + "--group typing --extra aws --extra encryption --extra ocsp --extra snappy --extra test --extra zstd"
docs_run := uv_run + "--extra docs"
doc_build := "./doc/_build"
mypy_args := "--install-types --non-interactive"
# Make the default recipe private so it doesn't show up in the list.
[private]
default:
@just --list
install:
bash .evergreen/scripts/setup-dev-env.sh
[group('docs')]
docs:
{{docs_run}} sphinx-build -W -b html doc {{doc_build}}/html
[group('docs')]
docs-serve:
{{docs_run}} sphinx-autobuild -W -b html doc --watch ./pymongo --watch ./bson --watch ./gridfs {{doc_build}}/serve
[group('docs')]
docs-linkcheck:
{{docs_run}} sphinx-build -E -b linkcheck doc {{doc_build}}/linkcheck
[group('docs')]
docs-test:
{{docs_run}} --extra test sphinx-build -E -b doctest doc {{doc_build}}/doctest
[group('typing')]
typing:
just typing-mypy
just typing-pyright
[group('typing')]
typing-mypy:
{{typing_run}} mypy {{mypy_args}} bson gridfs tools pymongo
{{typing_run}} mypy {{mypy_args}} --config-file mypy_test.ini test
{{typing_run}} mypy {{mypy_args}} test/test_typing.py test/test_typing_strict.py
[group('typing')]
typing-pyright:
{{typing_run}} pyright test/test_typing.py test/test_typing_strict.py
{{typing_run}} pyright -p strict_pyrightconfig.json test/test_typing_strict.py
[group('lint')]
lint:
{{uv_run}} pre-commit run --all-files
[group('lint')]
lint-manual:
{{uv_run}} pre-commit run --all-files --hook-stage manual
[group('test')]
test *args="-v --durations=5 --maxfail=10":
{{uv_run}} --extra test pytest {{args}}
[group('test')]
test-mockupdb *args:
{{uv_run}} -v --extra test --group mockupdb pytest -m mockupdb {{args}}
[group('test')]
test-eg *args:
bash ./.evergreen/run-tests.sh {{args}}
[group('encryption')]
setup-encryption:
bash .evergreen/setup-encryption.sh
[group('encryption')]
teardown-encryption:
bash .evergreen/teardown-encryption.sh