Skip to content

Commit

Permalink
Raise the minimum support python version to v3.8 (#436)
Browse files Browse the repository at this point in the history
* depen: raise the minimum support python version to v3.8;
  • Loading branch information
WenjieDu committed Jun 18, 2024
1 parent b073c9e commit d1d4e6d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 28 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/testing_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,14 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-13]
python-version: ["3.7", "3.11"]
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: ["3.8", "3.11"]
pytorch-version: ["2.3.0"]

steps:
- name: Check out the repo code
uses: actions/checkout@v3

- name: Determine the PyTorch version
uses: haya14busa/action-cond@v1
id: determine_pytorch_ver
with:
cond: ${{ matrix.python-version == 3.7 }}
if_true: "1.13.1"
if_false: "2.1.0"

- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -43,13 +36,14 @@ jobs:
cache-dependency-path: |
setup.cfg
- name: Install PyTorch ${{ steps.determine_pytorch_ver.outputs.value }}+cpu
- name: Install PyTorch ${{ matrix.pytorch-version }}+cpu
# we have to install torch in advance because torch_sparse needs it for compilation,
# refer to https://github.com/rusty1s/pytorch_sparse/issues/156#issuecomment-1304869772 for details
run: |
which python
which pip
pip install torch==${{ steps.determine_pytorch_ver.outputs.value }} -f https://download.pytorch.org/whl/cpu
pip install --upgrade
pip install numpy==1.24 torch==${{ matrix.pytorch-version }} -f https://download.pytorch.org/whl/cpu
python -c "import torch; print('PyTorch:', torch.__version__)"
- name: Install other dependencies
Expand All @@ -64,7 +58,7 @@ jobs:
- name: Continue to install torch-geometric dependencies
run: |
pip install torch-geometric torch-scatter torch-sparse -f "https://data.pyg.org/whl/torch-${{ steps.determine_pytorch_ver.outputs.value }}+cpu.html"
pip install torch-geometric torch-scatter torch-sparse -f "https://data.pyg.org/whl/torch-${{ matrix.pytorch-version }}+cpu.html"
pip install pypots[dev]
python_site_path=`python -c "import site; print(site.getsitepackages()[0])"`
echo "python site-packages path: $python_site_path"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<p align="center">
<a href="https://docs.pypots.com/en/latest/install.html#reasons-of-version-limitations-on-dependencies">
<img alt="Python version" src="https://img.shields.io/badge/Python-v3.7+-E97040?logo=python&logoColor=white">
<img alt="Python version" src="https://img.shields.io/badge/Python-v3.8+-E97040?logo=python&logoColor=white">
</a>
<a href="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/WenjieDu/PyPOTS">
<img alt="powered by Pytorch" src="https://img.shields.io/badge/PyTorch-%E2%9D%A4%EF%B8%8F-F8C6B5?logo=pytorch&logoColor=white">
Expand Down Expand Up @@ -177,8 +177,8 @@ With PyGrinder, you can introduce synthetic missing values into your datasets wi
<img src="https://pypots.com/figs/pypots_logos/BenchPOTS/logo_FFBG.svg" align="left" width="140" alt="BenchPOTS logo"/>
</a>

👈 To fairly evaluate the performance of PyPOTS algorithms, the benchmarking suite [BenchPOTS](https://github.com/WenjieDu/BenchPOTS) is created,
which provides standard and unified data-preprocessing pipelines to prepare datasets for measuring the performance of different
👈 To fairly evaluate the performance of PyPOTS algorithms, the benchmarking suite [BenchPOTS](https://github.com/WenjieDu/BenchPOTS) is created,
which provides standard and unified data-preprocessing pipelines to prepare datasets for measuring the performance of different
POTS algorithms on various tasks.

<a href="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/WenjieDu/BrewPOTS">
Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<p align="center">
<a href="https://docs.pypots.com/en/latest/install.html#reasons-of-version-limitations-on-dependencies">
<img alt="Python version" src="https://img.shields.io/badge/Python-v3.7+-E97040?logo=python&logoColor=white">
<img alt="Python version" src="https://img.shields.io/badge/Python-v3.8+-E97040?logo=python&logoColor=white">
</a>
<a href="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/WenjieDu/PyPOTS">
<img alt="powered by Pytorch" src="https://img.shields.io/badge/PyTorch-%E2%9D%A4%EF%B8%8F-F8C6B5?logo=pytorch&logoColor=white">
Expand Down
13 changes: 3 additions & 10 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ It is recommended to use **pip** or **conda** for PyPOTS installation as shown b
Required Dependencies
"""""""""""""""""""""
* Python >=3.7
* Python >=3.8
* h5py
* numpy
* scipy
Expand All @@ -44,25 +44,18 @@ Optional Dependencies

Reasons of Version Limitations on Dependencies
**********************************************
* **Why we need python >=3.7?**
* **Why we need python >=3.8?**

Python v3.6 and before versions have no longer been supported officially (check out `status of Python versions here <https://devguide.python.org/versions/>`_).
Besides, PyG (torch-geometric) is available for Python >= v3.7 (refer to https://pytorch-geometric.readthedocs.io/en/latest/install/installation.html#installation-via-anaconda ).
Although torch-geometric is an optional dependency, we hope things go smoothly when our users opt to install it.

In addition, note that Python v.3.7 has also been in the end-of-life status since 2023-06-27.
Hence, we will raise the minimum support Python version to v3.8 in the future.
Please use Python v3.8 or above if possible also for the security of your development environment.
Hence, we raise the minimum support Python version to v3.8.

* **Why we need PyTorch >=1.10?**

Because of pytorch_sparse, please refer to https://github.com/rusty1s/pytorch_sparse/issues/207#issuecomment-1065549338.

* **Why we need TSDB >=0.2 and PyGrinder >=0.4?**
Since v0.2, all libraries in PyPOTS Ecosystem switch their licenses from GPL-v3-only to BSD-3-Clause, which has less constraints for users.
Please refer to the discussion in issue `PyPOTS#227 <https://github.com/WenjieDu/PyPOTS/issues/227>`_ for details.


Acceleration
""""""""""""
GPU Acceleration
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"pygrinder>=0.6",
"benchpots>=0.1",
],
python_requires=">=3.7.0",
python_requires=">=3.8.0",
setup_requires=["setuptools>=38.6.0"],
entry_points={"console_scripts": ["pypots-cli=pypots.cli.pypots_cli:main"]},
classifiers=[
Expand Down

0 comments on commit d1d4e6d

Please sign in to comment.