From 4c30e5827b74bcc45f14cf3ae0c1715459ed09ae Mon Sep 17 00:00:00 2001 From: Fivele-Li <128388363+Fivele-Li@users.noreply.github.com> Date: Thu, 24 Aug 2023 21:24:50 +0800 Subject: [PATCH] Troubleshooting pip version issues in CI (#1504) * CI failed to run on 23.1 and 23.1.1 * add pyproject.toml * upgrade pip in slow.yml * upgrade build-system requires * troubleshooting pytest problem * troubleshooting pytest problem * troubleshooting pytest problem * troubleshooting pytest problem * add qlib root path to python sys.path * add qlib root path to $PYTHONPATH * add qlib root path to $PYTHONPATH * add qlib root path to $PYTHONPATH * modify pytest root; * remove set env * change_pytest_command_CI * change_pytest_command_CI * fix_ci * fix_ci * fix_ci * fix_ci * fix_ci * fix_ci * fix_ci * remove_toml * recover_toml --------- Co-authored-by: lijinhui <362237642@qq.com> Co-authored-by: linlang --- .github/workflows/test_qlib_from_source.yml | 4 +--- .github/workflows/test_qlib_from_source_slow.yml | 4 +--- pyproject.toml | 2 ++ tests/test_pit.py | 4 +++- 4 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 pyproject.toml diff --git a/.github/workflows/test_qlib_from_source.yml b/.github/workflows/test_qlib_from_source.yml index 7271287dc..acf37208f 100644 --- a/.github/workflows/test_qlib_from_source.yml +++ b/.github/workflows/test_qlib_from_source.yml @@ -38,10 +38,8 @@ jobs: python-version: ${{ matrix.python-version }} - name: Update pip to the latest version - # pip release version 23.1 on Apr.15 2023, CI failed to run, Please refer to #1495 ofr detailed logs. - # The pip version has been temporarily fixed to 23.0 run: | - python -m pip install pip==23.0 + python -m pip install --upgrade pip - name: Installing pytorch for macos if: ${{ matrix.os == 'macos-11' || matrix.os == 'macos-latest' }} diff --git a/.github/workflows/test_qlib_from_source_slow.yml b/.github/workflows/test_qlib_from_source_slow.yml index 1dfcc0179..caab6f444 100644 --- a/.github/workflows/test_qlib_from_source_slow.yml +++ b/.github/workflows/test_qlib_from_source_slow.yml @@ -38,10 +38,8 @@ jobs: python-version: ${{ matrix.python-version }} - name: Set up Python tools - # pip release version 23.1 on Apr.15 2023, CI failed to run, Please refer to #1495 ofr detailed logs. - # The pip version has been temporarily fixed to 23.0 run: | - python -m pip install pip==23.0 + python -m pip install --upgrade pip pip install --upgrade cython numpy pip install -e .[dev] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..6350d092c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,2 @@ +[build-system] +requires = ["setuptools", "numpy", "Cython"] diff --git a/tests/test_pit.py b/tests/test_pit.py index 329413ead..8320e1d36 100644 --- a/tests/test_pit.py +++ b/tests/test_pit.py @@ -13,7 +13,9 @@ from pathlib import Path from qlib.data import D from qlib.tests.data import GetData -from scripts.dump_pit import DumpPitData + +sys.path.append(str(Path(__file__).resolve().parent.parent.joinpath("scripts"))) +from dump_pit import DumpPitData sys.path.append(str(Path(__file__).resolve().parent.parent.joinpath("scripts/data_collector/pit"))) from collector import Run