mirror of
https://github.com/bentoml/OpenLLM.git
synced 2026-01-22 22:39:47 -05:00
135 lines
4.3 KiB
TOML
135 lines
4.3 KiB
TOML
[metadata.hooks.fancy-pypi-readme]
|
|
content-type = "text/markdown"
|
|
# PyPI doesn't support the <picture> tag.
|
|
[[metadata.hooks.fancy-pypi-readme.fragments]]
|
|
text = """
|
|
<p align="center">
|
|
<a href="https://github.com/bentoml/openllm">
|
|
<img src="https://raw.githubusercontent.com/bentoml/openllm/main/assets/main-banner.png" alt="Banner for OpenLLM" />
|
|
</a>
|
|
</p>
|
|
|
|
"""
|
|
[[metadata.hooks.fancy-pypi-readme.fragments]]
|
|
end-before = "\n<!-- hatch-fancy-pypi-readme intro stop -->"
|
|
path = "README.md"
|
|
start-after = "<!-- hatch-fancy-pypi-readme intro start -->\n"
|
|
[[metadata.hooks.fancy-pypi-readme.fragments]]
|
|
text = """
|
|
|
|
<p align="center">
|
|
<img src="https://raw.githubusercontent.com/bentoml/openllm/main/assets/output.gif" alt="Gif showing OpenLLM Intro" />
|
|
</p>
|
|
"""
|
|
[[metadata.hooks.fancy-pypi-readme.fragments]]
|
|
end-before = "\n<!-- hatch-fancy-pypi-readme interim stop -->"
|
|
path = "README.md"
|
|
start-after = "<!-- hatch-fancy-pypi-readme interim start -->\n"
|
|
[[metadata.hooks.fancy-pypi-readme.fragments]]
|
|
text = """
|
|
|
|
<p align="center">
|
|
<img src="https://raw.githubusercontent.com/bentoml/openllm/main/assets/agent.gif" alt="Gif showing Agent integration" />
|
|
</p>
|
|
"""
|
|
[[metadata.hooks.fancy-pypi-readme.fragments]]
|
|
end-before = "\n<!-- hatch-fancy-pypi-readme meta stop -->"
|
|
path = "README.md"
|
|
start-after = "<!-- hatch-fancy-pypi-readme meta start -->\n"
|
|
[[metadata.hooks.fancy-pypi-readme.fragments]]
|
|
text = """
|
|
|
|
## Release Information
|
|
|
|
"""
|
|
[[metadata.hooks.fancy-pypi-readme.fragments]]
|
|
path = "CHANGELOG.md"
|
|
pattern = "\n(###.+?\n)## "
|
|
start-after = "<!-- towncrier release notes start -->"
|
|
[[metadata.hooks.fancy-pypi-readme.fragments]]
|
|
text = """
|
|
|
|
---
|
|
|
|
[Click me for full changelog](https://github.com/bentoml/openllm/blob/main/CHANGELOG.md)
|
|
"""
|
|
[envs.default]
|
|
dependencies = [
|
|
# NOTE: To run all hooks
|
|
"pre-commit",
|
|
# NOTE: towncrier for changelog
|
|
"towncrier",
|
|
# NOTE: Using under ./tools/update-optional-dependencies.py
|
|
"tomlkit",
|
|
# NOTE: Using under ./tools/update-readme.py
|
|
"markdown-it-py",
|
|
# NOTE: For fancy PyPI readme
|
|
"hatch-fancy-pypi-readme",
|
|
# NOTE: For working with shell pipe
|
|
"plumbum",
|
|
# The below sync with mypyc deps and pre-commit mypy
|
|
"types-psutil",
|
|
"types-tabulate",
|
|
"types-PyYAML",
|
|
"types-protobuf",
|
|
]
|
|
[envs.default.scripts]
|
|
changelog = "towncrier build --version main --draft"
|
|
check-stubs = [
|
|
"./tools/update-config-stubs.py",
|
|
"./tools/update-models-import.py",
|
|
"./tools/update-init-import.py",
|
|
"update-dummy",
|
|
]
|
|
compile = "bash ./compile.sh {args}"
|
|
update-dummy = ["- ./tools/update-dummy.py", "./tools/update-dummy.py"]
|
|
inplace-changelog = "towncrier build --version main --keep"
|
|
quality = [
|
|
"./tools/dependencies.py",
|
|
"./tools/update-readme.py",
|
|
"- ./tools/update-brew-tap.py",
|
|
"check-stubs",
|
|
"pre-commit run --all-files",
|
|
]
|
|
recompile = ["bash ./clean.sh", "compile"]
|
|
setup = "pre-commit install"
|
|
typing = ["- pre-commit run mypy {args:-a}", "- pre-commit run pyright {args:-a}"]
|
|
[envs.tests]
|
|
dependencies = [
|
|
# NOTE: interact with docker for container tests.
|
|
"docker",
|
|
# NOTE: Tests strategies with Hypothesis and pytest, and snapshot testing with syrupy
|
|
"coverage[toml]>=6.5",
|
|
"filelock>=3.7.1",
|
|
"pytest",
|
|
"pytest-cov",
|
|
"pytest-mock",
|
|
"pytest-randomly",
|
|
"pytest-rerunfailures",
|
|
"pytest-asyncio>=0.21.0",
|
|
"pytest-xdist[psutil]",
|
|
"trustme",
|
|
"hypothesis",
|
|
"syrupy",
|
|
]
|
|
features = ["flan-t5", "baichuan"]
|
|
skip-install = false
|
|
template = "tests"
|
|
[envs.tests.scripts]
|
|
_run_script = "pytest --cov --cov-report={env:COVERAGE_REPORT:term-missing} --cov-config=pyproject.toml -vv"
|
|
distributed = "_run_script --reruns 5 --reruns-delay 3 --ignore tests/models -n 3 -r aR {args:tests}"
|
|
models = "_run_script -s {args:tests/models}"
|
|
python = "_run_script --reruns 5 --reruns-delay 3 --ignore tests/models -r aR {args:tests}"
|
|
snapshot-models = "_run_script -s --snapshot-update {args:tests/models}"
|
|
[envs.tests.overrides]
|
|
env.GITHUB_ACTIONS.env-vars = "COVERAGE_REPORT="
|
|
[envs.coverage]
|
|
dependencies = ["coverage[toml]>=6.5", "lxml", "orjson"]
|
|
detached = true
|
|
[envs.coverage.scripts]
|
|
combine = "coverage combine {args}"
|
|
generate-summary = "python tools/generate-coverage.py"
|
|
report-uncovered-html = "coverage html --skip-covered --skip-empty"
|
|
report-xml = "coverage xml"
|
|
write-summary-report = "python tools/write-coverage-report.py"
|