-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
hatch.toml
52 lines (46 loc) · 1.84 KB
/
hatch.toml
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
# 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/mongodb-labs/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"