PYTHON-5519 Clean up uv handling (#2510)
This commit is contained in:
parent
8c361be219
commit
0d4c84e86f
@ -26,12 +26,9 @@ else
|
||||
fi
|
||||
|
||||
# List the packages.
|
||||
uv sync ${UV_ARGS} --reinstall
|
||||
uv sync ${UV_ARGS} --reinstall --quiet
|
||||
uv pip list
|
||||
|
||||
# Ensure we go back to base environment after the test.
|
||||
trap "uv sync" EXIT HUP
|
||||
|
||||
# Start the test runner.
|
||||
uv run ${UV_ARGS} .evergreen/scripts/run_tests.py "$@"
|
||||
|
||||
|
||||
26
justfile
26
justfile
@ -2,7 +2,7 @@
|
||||
set shell := ["bash", "-c"]
|
||||
|
||||
# Commonly used command segments.
|
||||
uv_run := "uv run --isolated --frozen "
|
||||
uv_run := "uv run --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"
|
||||
@ -13,51 +13,55 @@ mypy_args := "--install-types --non-interactive"
|
||||
default:
|
||||
@just --list
|
||||
|
||||
[private]
|
||||
resync:
|
||||
@uv sync --quiet --frozen
|
||||
|
||||
install:
|
||||
bash .evergreen/scripts/setup-dev-env.sh
|
||||
|
||||
[group('docs')]
|
||||
docs:
|
||||
docs: && resync
|
||||
{{docs_run}} sphinx-build -W -b html doc {{doc_build}}/html
|
||||
|
||||
[group('docs')]
|
||||
docs-serve:
|
||||
docs-serve: && resync
|
||||
{{docs_run}} sphinx-autobuild -W -b html doc --watch ./pymongo --watch ./bson --watch ./gridfs {{doc_build}}/serve
|
||||
|
||||
[group('docs')]
|
||||
docs-linkcheck:
|
||||
docs-linkcheck: && resync
|
||||
{{docs_run}} sphinx-build -E -b linkcheck doc {{doc_build}}/linkcheck
|
||||
|
||||
[group('typing')]
|
||||
typing:
|
||||
typing: && resync
|
||||
just typing-mypy
|
||||
just typing-pyright
|
||||
|
||||
[group('typing')]
|
||||
typing-mypy:
|
||||
typing-mypy: && resync
|
||||
{{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-pyright: && resync
|
||||
{{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:
|
||||
lint: && resync
|
||||
{{uv_run}} pre-commit run --all-files
|
||||
|
||||
[group('lint')]
|
||||
lint-manual:
|
||||
lint-manual: && resync
|
||||
{{uv_run}} pre-commit run --all-files --hook-stage manual
|
||||
|
||||
[group('test')]
|
||||
test *args="-v --durations=5 --maxfail=10":
|
||||
test *args="-v --durations=5 --maxfail=10": && resync
|
||||
{{uv_run}} --extra test pytest {{args}}
|
||||
|
||||
[group('test')]
|
||||
run-tests *args:
|
||||
run-tests *args: && resync
|
||||
bash ./.evergreen/run-tests.sh {{args}}
|
||||
|
||||
[group('test')]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user