53 lines
1.8 KiB
TOML
53 lines
1.8 KiB
TOML
# See https://hatch.pypa.io/dev/config/environment/overview/
|
|
|
|
[envs.doc]
|
|
features = ["docs"]
|
|
[envs.doc.scripts]
|
|
build = "sphinx-build -W -b html doc ./doc/_build/html"
|
|
serve = "sphinx-autobuild -W -b html doc --watch ./pymongo --watch ./bson --watch ./gridfs ./doc/_build/serve"
|
|
linkcheck = "sphinx-build -E -b linkcheck doc ./doc/_build/linkcheck"
|
|
|
|
[envs.doctest]
|
|
features = ["docs","test"]
|
|
[envs.doctest.scripts]
|
|
test = "sphinx-build -E -b doctest doc ./doc/_build/doctest"
|
|
|
|
[envs.typing]
|
|
pre-install-commands = [
|
|
"pip install -q -r requirements/typing.txt",
|
|
]
|
|
[envs.typing.scripts]
|
|
check-mypy = [
|
|
"mypy --install-types --non-interactive bson gridfs tools pymongo",
|
|
"mypy --install-types --non-interactive --config-file mypy_test.ini test",
|
|
"mypy --install-types --non-interactive test/test_typing.py test/test_typing_strict.py"
|
|
]
|
|
check-pyright = ["rm -f pyrightconfig.json", "pyright test/test_typing.py test/test_typing_strict.py"]
|
|
check-strict-pyright = [
|
|
"echo '{{\"strict\": [\"tests/test_typing_strict.py\"]}}' > pyrightconfig.json",
|
|
"pyright test/test_typing_strict.py",
|
|
"rm -f pyrightconfig.json"
|
|
]
|
|
check = ["check-mypy", "check-pyright", "check-strict-pyright"]
|
|
|
|
[envs.lint]
|
|
skip-install = true
|
|
dependencies = ["pre-commit"]
|
|
[envs.lint.scripts]
|
|
run = "pre-commit run --all-files"
|
|
run-manual = "pre-commit run --all-files --hook-stage manual"
|
|
|
|
[envs.test]
|
|
features = ["test"]
|
|
[envs.test.scripts]
|
|
test = "pytest -v --durations=5 --maxfail=10 {args}"
|
|
test-eg = "bash ./.evergreen/run-tests.sh {args}"
|
|
test-async = "pytest -v --durations=5 --maxfail=10 -m default_async {args}"
|
|
test-mockupdb = ["pip install -U git+https://github.com/ajdavis/mongo-mockup-db@master", "test -m mockupdb"]
|
|
|
|
[envs.encryption]
|
|
skip-install = true
|
|
[envs.encryption.scripts]
|
|
setup = "bash .evergreen/setup-encryption.sh"
|
|
teardown = "bash .evergreen/teardown-encryption.sh"
|