From 37fc28949225add86457c4297ab098b7036c6895 Mon Sep 17 00:00:00 2001 From: Wenjie Du Date: Tue, 7 Nov 2023 00:42:16 +0800 Subject: [PATCH 1/2] feat: add version limitations on dependencies pygrinder and tsdb; --- environment-dev.yml | 4 ++-- requirements.txt | 4 ++-- setup.cfg | 4 ++-- setup.py | 4 ++-- tests/environment_for_conda_test.yml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/environment-dev.yml b/environment-dev.yml index 876f2dc8..be9a43c5 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -16,8 +16,8 @@ dependencies: #- conda-forge::pandas <2.0.0 #- conda-forge::h5py #- conda-forge::tensorboard - #- conda-forge::pygrinder - #- conda-forge::tsdb + #- conda-forge::pygrinder >=0.2 + #- conda-forge::tsdb >=0.2 #- pytorch::pytorch >=1.10.0 ## Below we install the latest pypots because we need pypots-cli in it for development. ## PyPOTS itself already includes all basic dependencies. diff --git a/requirements.txt b/requirements.txt index 2b476345..0cbb7491 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,6 +7,6 @@ scipy torch>=1.10.0 tensorboard pandas<2.0.0 -pygrinder -tsdb +pygrinder>=0.2 +tsdb>=0.2 h5py diff --git a/setup.cfg b/setup.cfg index 0552134a..cce7fe81 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,8 +32,8 @@ basic = tensorboard scipy h5py - tsdb - pygrinder + tsdb>=0.2 + pygrinder>=0.2 # dependencies that are optional, torch-geometric are only needed for model Raindrop # but its installation takes too much time diff --git a/setup.py b/setup.py index 24cc95f3..75b95445 100644 --- a/setup.py +++ b/setup.py @@ -50,8 +50,8 @@ "torch>=1.10.0", "tensorboard", "pandas<2.0.0", - "pygrinder", - "tsdb", + "pygrinder>=0.2", + "tsdb>=0.2", "h5py", ], python_requires=">=3.7.0", diff --git a/tests/environment_for_conda_test.yml b/tests/environment_for_conda_test.yml index ca6d595b..2630fd28 100644 --- a/tests/environment_for_conda_test.yml +++ b/tests/environment_for_conda_test.yml @@ -16,8 +16,8 @@ dependencies: - conda-forge::pandas <2.0.0 - conda-forge::h5py - conda-forge::tensorboard - - conda-forge::pygrinder - - conda-forge::tsdb + - conda-forge::pygrinder >=0.2 + - conda-forge::tsdb >=0.2 - conda-forge::protobuf <=4.21.12 - pytorch::pytorch >=1.10.0 From 6f1c99868c83f2a07461eb7a08eac968448a724a Mon Sep 17 00:00:00 2001 From: Wenjie Du Date: Tue, 7 Nov 2023 00:56:58 +0800 Subject: [PATCH 2/2] fix: make PyPI publishing workflow install necessary dependencies to avoid error; --- .github/workflows/publish_to_PyPI.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish_to_PyPI.yml b/.github/workflows/publish_to_PyPI.yml index 92513fca..ed05f120 100644 --- a/.github/workflows/publish_to_PyPI.yml +++ b/.github/workflows/publish_to_PyPI.yml @@ -38,7 +38,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install build + pip install build wheel + pip install -r requirements.txt - name: Fetch the test environment details run: | @@ -47,7 +48,7 @@ jobs: - name: Build package run: | - python -m build + python -m build --no-isolation - name: Publish the new package to PyPI uses: pypa/gh-action-pypi-publish@v1.8.6