-
Notifications
You must be signed in to change notification settings - Fork 144
/
hatch.toml
90 lines (80 loc) · 2.8 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
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
80
81
82
83
84
85
86
87
88
89
90
[envs.all]
[[envs.all.matrix]]
python = ["3.9", "3.10", "3.11", "3.12"]
[envs.changelog]
dependencies = ["scriv"]
detached = true
installer = "uv"
scripts = {add = "scriv create --add", collect = ["scriv collect --add", "- pre-commit run --files=CHANGELOG.md > /dev/null"]}
[envs.default]
dependencies = [
"devtools[pygments]",
"coverage[toml]>=6.5",
"pytest",
"pytest-mock",
"pytest-rerunfailures",
"toml",
"nbformat>=4.2.0",
"pyhamcrest",
"jupyter",
"dash[testing]",
"chromedriver-autoinstaller>=0.6.4",
# "urllib3<2.0.0", # helps to resolve bug with urllib3 timeout from vizro-ai integration tests: https://bugs.launchpad.net/python-jenkins/+bug/2018567
# Below dependencies useful to test different models
"langchain-community",
"langchain_mistralai",
"langchain-anthropic",
"pre-commit"
]
installer = "uv"
[envs.default.env-vars]
VIZRO_AI_LOG_LEVEL = "DEBUG"
[envs.default.scripts]
example = "cd examples; python example.py"
example-create-dashboard = "cd examples; python example_dashboard.py"
example-ui = "cd examples/dashboard_ui; python app.py"
lint = "pre-commit run {args} --all-files"
pip = '"{env:HATCH_UV}" pip {args}'
prep-release = [
"hatch version release",
"hatch run changelog:collect",
"hatch run changelog:add",
'echo "Now raise a PR to merge into main with title: [Release] Release of vizro-ai $(hatch version)"'
]
pypath = "hatch run python -c 'import sys; print(sys.executable)'"
test = "pytest tests {args}"
test-integration = "pytest -vs --reruns 1 tests/integration --headless {args}"
test-score = "pytest -vs --reruns 1 tests/score --headless {args}"
test-unit = "pytest tests/unit {args}"
test-unit-coverage = [
"coverage run -m pytest tests/unit {args}",
"- coverage combine",
"coverage report"
]
[envs.docs]
dependencies = [
"mkdocs>=1.6",
"mkdocs-material",
"mkdocs-git-revision-date-localized-plugin>=1.2.5",
"mkdocstrings[python]",
"linkchecker"
]
detached = true
installer = "uv"
[envs.docs.scripts]
build = "mkdocs build --strict"
# Disable warnings on the linkcheck so that HTTP redirects are accepted. We could ignore only that warning and specify
# more advanced settings using a linkcheckerrc config file. openai.com doesn't seem to work well with linkchecking,
# throwing 403 errors, but these are not real errors.
link-check = "linkchecker site --check-extern --no-warnings --ignore=404.html --ignore-url=127.0.0.1 --ignore-url=https://vizro.readthedocs.io/ --ignore-url=https://platform.openai.com/docs/models --ignore-url=openai.com --ignore-url=https://openai.com/"
pip = '"{env:HATCH_UV}" pip {args}'
serve = "mkdocs serve --open"
[envs.hatch-uv]
dependencies = [
"uv<0.5.10" # https://github.com/astral-sh/uv/issues/10039
]
[envs.lower-bounds]
extra-dependencies = ["pydantic==1.10.16"]
python = "3.9"
[version]
path = "src/vizro_ai/__init__.py"