From 60a84f664be2e9b84a870ee09ae404a8626295aa Mon Sep 17 00:00:00 2001 From: hoshi-hiyouga Date: Fri, 11 Apr 2025 18:02:24 +0800 Subject: [PATCH] [deps] fix uv conflicts (#7686) * fix #7678 * Update setup.py * Update tests.yml * Update publish.yml * Update Makefile --- .github/workflows/publish.yml | 7 +------ .github/workflows/tests.yml | 4 ++++ Makefile | 2 +- pyproject.toml | 8 ++++++-- setup.py | 2 +- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b3c8a799..c3f729a0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,14 +28,9 @@ jobs: with: python-version: "3.9" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install build - - name: Build package run: | - python -m build + make build - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 158fddf3..1adefbef 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,6 +73,10 @@ jobs: run: | make license + - name: Check build + run: | + make build + - name: Test with pytest run: | make test diff --git a/Makefile b/Makefile index 7eb00286..2dcb7caf 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ check_dirs := scripts src tests setup.py build: - pip install build && python -m build + pip3 install build && python3 -m build commit: pre-commit install diff --git a/pyproject.toml b/pyproject.toml index 7a348c36..2585539b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ known-third-party = [ "peft", "torch", "transformers", - "trl" + "trl", ] [tool.ruff.lint.pydocstyle] @@ -87,5 +87,9 @@ conflicts = [ [ { extra = "torch-npu" }, { extra = "vllm" }, - ] + ], + [ + { extra = "sglang" }, + { extra = "minicpm_v" }, + ], ] diff --git a/setup.py b/setup.py index 4f715b3a..697e3341 100644 --- a/setup.py +++ b/setup.py @@ -74,7 +74,7 @@ extra_require = { "modelscope": ["modelscope"], "openmind": ["openmind"], "swanlab": ["swanlab"], - "dev": ["pre-commit", "ruff", "pytest"], + "dev": ["pre-commit", "ruff", "pytest", "build"], }