mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-12-27 09:10:35 +08:00
[breaking] migrate from setuptools to uv (#9673)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: hiyouga <16256802+hiyouga@users.noreply.github.com>
This commit is contained in:
20
Makefile
20
Makefile
@@ -1,24 +1,24 @@
|
||||
.PHONY: build commit license quality style test
|
||||
|
||||
check_dirs := scripts src tests tests_v1 setup.py
|
||||
check_dirs := scripts src tests tests_v1
|
||||
|
||||
build:
|
||||
pip3 install build && python3 -m build
|
||||
uv build
|
||||
|
||||
commit:
|
||||
pre-commit install
|
||||
pre-commit run --all-files
|
||||
uv run pre-commit install
|
||||
uv run pre-commit run --all-files
|
||||
|
||||
license:
|
||||
python3 tests/check_license.py $(check_dirs)
|
||||
uv run python tests/check_license.py $(check_dirs)
|
||||
|
||||
quality:
|
||||
ruff check $(check_dirs)
|
||||
ruff format --check $(check_dirs)
|
||||
uv run ruff check $(check_dirs)
|
||||
uv run ruff format --check $(check_dirs)
|
||||
|
||||
style:
|
||||
ruff check $(check_dirs) --fix
|
||||
ruff format $(check_dirs)
|
||||
uv run ruff check $(check_dirs) --fix
|
||||
uv run ruff format $(check_dirs)
|
||||
|
||||
test:
|
||||
WANDB_DISABLED=true pytest -vv --import-mode=importlib tests/ tests_v1/
|
||||
WANDB_DISABLED=true uv run pytest -vv --import-mode=importlib tests/ tests_v1/
|
||||
|
||||
Reference in New Issue
Block a user