22set shell := [" bash" , " -c" ]
33
44# Commonly used command segments.
5- uv_run := " uv run --isolated -- frozen "
5+ uv_run := " uv run --frozen "
66typing_run := uv_run + " --group typing --extra aws --extra encryption --extra ocsp --extra snappy --extra test --extra zstd"
77docs_run := uv_run + " --extra docs"
88doc_build := " ./doc/_build"
@@ -13,51 +13,55 @@ mypy_args := "--install-types --non-interactive"
1313default :
1414 @ just --list
1515
16+ [private ]
17+ resync :
18+ @ uv sync --quiet --frozen
19+
1620install :
1721 bash .evergreen/ scripts/ setup-dev-env .sh
1822
1923[group (' docs' )]
20- docs :
24+ docs : && resync
2125 {{ docs_run}} sphinx-build -W -b html doc {{ doc_build}} / html
2226
2327[group (' docs' )]
24- docs-serve :
28+ docs-serve : && resync
2529 {{ docs_run}} sphinx-autobuild -W -b html doc --watch ./ pymongo --watch ./ bson --watch ./ gridfs {{ doc_build}} / serve
2630
2731[group (' docs' )]
28- docs-linkcheck :
32+ docs-linkcheck : && resync
2933 {{ docs_run}} sphinx-build -E -b linkcheck doc {{ doc_build}} / linkcheck
3034
3135[group (' typing' )]
32- typing :
36+ typing : && resync
3337 just typing-mypy
3438 just typing-pyright
3539
3640[group (' typing' )]
37- typing-mypy :
41+ typing-mypy : && resync
3842 {{ typing_run}} mypy {{ mypy_args}} bson gridfs tools pymongo
3943 {{ typing_run}} mypy {{ mypy_args}} --config-file mypy_test.ini test
4044 {{ typing_run}} mypy {{ mypy_args}} test/ test_typing.py test/ test_typing_strict.py
4145
4246[group (' typing' )]
43- typing-pyright :
47+ typing-pyright : && resync
4448 {{ typing_run}} pyright test/ test_typing.py test/ test_typing_strict.py
4549 {{ typing_run}} pyright -p strict_pyrightconfig.json test/ test_typing_strict.py
4650
4751[group (' lint' )]
48- lint :
52+ lint : && resync
4953 {{ uv_run}} pre-commit run --all-files
5054
5155[group (' lint' )]
52- lint-manual :
56+ lint-manual : && resync
5357 {{ uv_run}} pre-commit run --all-files --hook-stage manual
5458
5559[group (' test' )]
56- test * args = " -v --durations=5 --maxfail=10":
60+ test * args = " -v --durations=5 --maxfail=10": && resync
5761 {{ uv_run}} --extra test pytest {{ args}}
5862
5963[group (' test' )]
60- run-tests * args :
64+ run-tests * args : && resync
6165 bash ./ .evergreen/ run-tests.sh {{ args}}
6266
6367[group (' test' )]
0 commit comments