[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"] 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}", ] [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 external/clojure/run-clojure-ui.sh"] [envs.ci] detached = true [envs.ci.scripts] client-stubs = "bash openllm-client/generate-grpc-stubs" compile = "bash ./compile.sh {args}" recompile = ["bash ./clean.sh", "compile"] edi = "bash local.sh" lock = [ "bash tools/lock-actions.sh", "pushd external/clojure && pnpm i --frozen-lockfile", ]