From 1b766d85a24627c7448bb4ecc9760d858baf4dbb Mon Sep 17 00:00:00 2001 From: starfall <1186454801@qq.com> Date: Mon, 25 Nov 2024 15:40:17 +0800 Subject: [PATCH] update --- .github/workflows/mypy.yaml | 4 +--- .github/workflows/tests.yaml | 1 - excore/_constants.py | 1 - excore/cli/_cache.py | 2 +- tests/init.py | 4 ++-- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml index d668490..aec37d6 100644 --- a/.github/workflows/mypy.yaml +++ b/.github/workflows/mypy.yaml @@ -32,6 +32,4 @@ jobs: run: poetry install --with dev - name: Mypy Check - run: | - poetry run mypy --install-types - poetry run mypy excore/ + run: poetry run mypy excore/ --install-types diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8d8abd2..be0d02a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -35,7 +35,6 @@ jobs: run: | cd ./tests export EXCORE_DEBUG=1 - poetry run excore clear-all-cache poetry run python init.py - name: Test with pytest diff --git a/excore/_constants.py b/excore/_constants.py index b8c19ad..3e44f02 100644 --- a/excore/_constants.py +++ b/excore/_constants.py @@ -75,7 +75,6 @@ def dump(self, path: str) -> None: workspace = _WorkspaceConfig() - LOGO = r""" ▓█████ ▒██ ██▒ ▄████▄ ▒█████ ██▀███ ▓█████ ▓█ ▀ ▒▒ █ █ ▒░▒██▀ ▀█ ▒██▒ ██▒▓██ ▒ ██▒▓█ ▀ diff --git a/excore/cli/_cache.py b/excore/cli/_cache.py index 8bc72f6..743a95b 100644 --- a/excore/cli/_cache.py +++ b/excore/cli/_cache.py @@ -40,7 +40,7 @@ def clear_all_cache() -> None: Remove the whole cache folder. """ if not os.path.exists(workspace.cache_base_dir): - logger.warning("Cache dir {} does not exist", cache_dir) + logger.warning("Cache dir {} does not exist", workspace.cache_base_dir) return print(_create_table("Cache Names", os.listdir(workspace.cache_base_dir))) if not typer.confirm("Are you sure you want to clear all cache?"): diff --git a/tests/init.py b/tests/init.py index eaca054..f21a21c 100644 --- a/tests/init.py +++ b/tests/init.py @@ -3,8 +3,6 @@ import toml -import excore - predefined_inputs = { "name": "tests", "src": "source_code", @@ -44,6 +42,8 @@ def init(): toml.dump(cfg, f) excute("excore update") excute("excore auto-register") + import excore + assert os.path.exists(os.path.join(excore.workspace.cache_base_dir, "tests"))