From 37fcec4806394573f3268d9cf0c2f9669aa7993a Mon Sep 17 00:00:00 2001 From: Bo Liu Date: Tue, 16 Apr 2024 14:21:46 +0800 Subject: [PATCH] fix: update github action --- .github/workflows/lint.yml | 18 +++--------------- Makefile | 4 +++- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1d888b8..66888af 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -39,7 +39,7 @@ jobs: run: | python -m pip install --upgrade pip setuptools wheel - - name: Install TorchOpt + - name: Install DeepSeek-VL env: USE_FP16: "OFF" TORCH_CUDA_ARCH_LIST: "Auto" @@ -47,21 +47,9 @@ jobs: python -m pip install torch numpy pybind11 python -m pip install -vvv --no-build-isolation --editable '.[lint]' - - name: pre-commit + - name: black run: | - make pre-commit - - - name: ruff - run: | - make ruff - - - name: flake8 - run: | - make flake8 - - - name: isort and black - run: | - make py-format + make black-format - name: addlicense run: | diff --git a/Makefile b/Makefile index b4b379b..2909968 100644 --- a/Makefile +++ b/Makefile @@ -66,6 +66,9 @@ py-format: py-format-install $(PYTHON) -m isort --project $(PROJECT_PATH) --check $(PYTHON_FILES) && \ $(PYTHON) -m black --check $(PYTHON_FILES) +black-format: py-format-install + $(PYTHON) -m black --check $(PYTHON_FILES) + ruff: ruff-install $(PYTHON) -m ruff check . @@ -85,7 +88,6 @@ lint: ruff flake8 py-format mypy pylint addlicense format: py-format-install ruff-install addlicense-install $(PYTHON) -m isort --project $(PROJECT_PATH) $(PYTHON_FILES) $(PYTHON) -m black $(PYTHON_FILES) - $(PYTHON) -m ruff check . --fix --exit-zero addlicense -c $(COPYRIGHT) -ignore tests/coverage.xml -l mit -y 2023-$(shell date +"%Y") $(SOURCE_FOLDERS) cli_chat.py inference.py clean-py: