mirror of
https://github.com/bentoml/OpenLLM.git
synced 2026-01-19 04:51:18 -05:00
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com> Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com> Signed-off-by: GutZuFusss <leon.ikinger@googlemail.com> Co-authored-by: GutZuFusss <leon.ikinger@googlemail.com>
105 lines
3.4 KiB
TOML
105 lines
3.4 KiB
TOML
[envs.default]
|
|
dependencies = [
|
|
"openllm-core @ {root:uri}/openllm-core",
|
|
"openllm-client @ {root:uri}/openllm-client",
|
|
"openllm[opt,chatglm,fine-tune] @ {root:uri}/openllm-python",
|
|
# NOTE: To run all hooks
|
|
"pre-commit",
|
|
# NOTE: towncrier for changelog
|
|
"towncrier",
|
|
# NOTE: Using under ./tools/update-optional-dependencies.py
|
|
"tomlkit",
|
|
# 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",
|
|
"update-dummy",
|
|
]
|
|
inplace-changelog = "towncrier build --version main --keep"
|
|
quality = [
|
|
"./tools/dependencies.py",
|
|
"- ./tools/update-brew-tap.py",
|
|
"check-stubs",
|
|
"bash ./tools/mirror.sh",
|
|
"- pre-commit run --all-files",
|
|
"- pnpm format",
|
|
]
|
|
setup = [
|
|
"pre-commit install",
|
|
"- ln -s .python-version-default .python-version",
|
|
"curl -fsSL https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/script/install-clj-kondo | bash -",
|
|
]
|
|
tool = ["quality", "bash ./clean.sh", "bash ./compile.sh {args}"]
|
|
typing = [
|
|
"- pre-commit run mypy {args:-a}",
|
|
"- pre-commit run pyright {args:-a}",
|
|
]
|
|
update-dummy = ["- ./tools/update-dummy.py", "./tools/update-dummy.py"]
|
|
[envs.tests]
|
|
dependencies = [
|
|
"openllm-core @ {root:uri}/openllm-core",
|
|
"openllm-client @ {root:uri}/openllm-client",
|
|
"openllm[opt,chatglm,fine-tune] @ {root:uri}/openllm-python",
|
|
# 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",
|
|
]
|
|
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 openllm-python/tests/models -n 3 -r aR {args:openllm-python/tests}"
|
|
models = "_run_script -s {args:openllm-python/tests/models}"
|
|
python = "_run_script --reruns 5 --reruns-delay 3 --ignore openllm-python/tests/models -r aR {args:openllm-python/tests}"
|
|
snapshot-models = "_run_script -s --snapshot-update {args:openllm-python/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 {args}"
|
|
report-xml = "coverage xml {args}"
|
|
write-summary-report = "python tools/write-coverage-report.py"
|
|
[envs.ui]
|
|
detached = true
|
|
[envs.ui.scripts]
|
|
server = "openllm start {args:flan-t5} --working-dir {root:uri} --cors --debug"
|
|
docs = "cd docs && pnpm dev"
|
|
clojure = ["bash openllm-contrib/clojure/run-clojure-ui.sh"]
|
|
[envs.ci]
|
|
detached = true
|
|
[envs.ci.scripts]
|
|
compile = "bash ./compile.sh {args}"
|
|
recompile = ["bash ./clean.sh", "compile"]
|
|
edi = "bash local.sh"
|
|
lock = [
|
|
"bash tools/lock-actions.sh",
|
|
"pushd openllm-contrib/clojure && pnpm i --frozen-lockfile",
|
|
]
|