Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing with Python 3.11 and support it #246

Merged
merged 11 commits into from
Nov 25, 2023
22 changes: 10 additions & 12 deletions .github/workflows/testing_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,45 +20,43 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: ["3.7", "3.10"]
torch-version: ["1.13.1"]
python-version: ["3.7", "3.10", "3.11"]

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

- name: Determine the Python version
- name: Determine the PyTorch version
uses: haya14busa/action-cond@v1
id: condval
id: determine_pytorch_ver
with:
cond: ${{ matrix.python-version == 3.7 && matrix.os == 'macOS-latest' }}
# Note: the latest 3.7 subversion 3.7.17 for MacOS has "ModuleNotFoundError: No module named '_bz2'"
if_true: "3.7.16"
if_false: ${{ matrix.python-version }}
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:
python-version: ${{ steps.condval.outputs.value }}
python-version: ${{ matrix.python-version }}
check-latest: true
cache: pip
cache-dependency-path: |
setup.cfg

- name: Install PyTorch ${{ matrix.torch-version }}+cpu
- name: Install PyTorch ${{ steps.determine_pytorch_ver.outputs.value }}+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 --upgrade pip
pip install torch==${{ matrix.torch-version }} -f https://download.pytorch.org/whl/cpu
pip install torch==${{ steps.determine_pytorch_ver.outputs.value }} -f https://download.pytorch.org/whl/cpu
python -c "import torch; print('PyTorch:', torch.__version__)"

- name: Install other dependencies
run: |
pip install -r requirements.txt
pip install torch-geometric==2.3.1 torch-scatter==2.1.1 torch-sparse==0.6.17 -f "https://data.pyg.org/whl/torch-${{ matrix.torch-version }}+cpu.html"
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 pypots[dev]

- name: Fetch the test environment details
Expand Down
2 changes: 1 addition & 1 deletion 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--3.10-E97040?logo=python&logoColor=white">
<img alt="Python version" src="https://img.shields.io/badge/Python-v3.7--3.11-E97040?logo=python&logoColor=white">
</a>
<a href="https://github.com/WenjieDu/PyPOTS">
<img alt="powered by Pytorch" src="https://img.shields.io/badge/PyTorch-❤️-F8C6B5?logo=pytorch&logoColor=white">
Expand Down
17 changes: 5 additions & 12 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Note this exception only applies if you commit to the maintenance of your model

Join PyPOTS
^^^^^^^^^^^
.. _becoming-a-maintainer:
.. _becoming-a-volunteer:

Becoming a Maintainer
"""""""""""""""""""""
To join the team and become a maintainer of PyPOTS, you should
Becoming a Volunteer Developer
""""""""""""""""""""""""""""""
To become a member of PyPOTS volunteer development team, you should

1. love open-source science and be active on GitHub;
2. be familiar with the PyPOTS codebase and have made at least one pull request merged into branch ``main`` of PyPOTS,
Expand All @@ -28,21 +28,14 @@ To join the team and become a maintainer of PyPOTS, you should
and become a member of the channel ``#dev-team``. ``#dev-team`` currently is a public channel, and you don't need an invitation to join it;
5. commit to constantly maintain PyPOTS project and obey our development principles;

After meeting up with the above conditions,
you can propose to get a maintainer role by dropping an email to `[email protected] <mailto:[email protected]>`_.
We will review your request and reply to you as soon as possible.
Once you obtain the role, you'll be listed as a member on the ``About Us`` pages of
`PyPOTS main site <https://pypots.com/about/>`_
and
`PyPOTS docs site <https://docs.pypots.com/en/latest/about_us.html>`_.

**NOTE**: The maintainer role is not permanent. The role is called "maintainer" because it actively maintains the project.
You can take a leave of absence from the role with notice at any time.
But if you're inactive for a long time (more than three months. With reasons, a longer period is allowed for sure), your role may be deactivated.

Becoming a Lead
"""""""""""""""
To become a lead at PyPOTS, surely you have to already obtain a maintainer role first, i.e. you've met all requirements in the section :ref:`becoming-a-maintainer`.
To become a lead at PyPOTS, surely you have to already be a volunteer developer first, i.e. you've met all requirements in the section :ref:`becoming-a-volunteer`.
Your research should be highly related to data mining/machine learning on POTS data, and
you need to prove that you're capable of proposing a research plan solely and conducting it.
You're willing to take developing PyPOTS as your responsibility and commit to constantly and regularly
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Welcome to PyPOTS docs!

**A Python Toolbox for Data Mining on Partially-Observed Time Series**

.. image:: https://img.shields.io/badge/Python-v3.7--3.10-E97040?logo=python&logoColor=white
.. image:: https://img.shields.io/badge/Python-v3.7--3.11-E97040?logo=python&logoColor=white
:alt: Python version
:target: https://docs.pypots.com/en/latest/install.html#reasons-of-version-limitations-on-dependencies

Expand Down
9 changes: 7 additions & 2 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Alternatively, you can install from the latest source code which may be not offi

Required Dependencies
"""""""""""""""""""""
* Python >=3.7, <=3.10
* Python >=3.7, <=3.11
* numpy
* scipy
* scikit-learn
Expand All @@ -49,9 +49,14 @@ Reasons of Version Limitations on Dependencies
* **Why we need python >=3.7?**

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 starting from Python v3.7, please refer to https://pytorch-geometric.readthedocs.io/en/latest/install/installation.html#installation-via-anaconda.
Besides, PyG (torch-geometric) is available for Python v3.7 to v3.11 (refer to https://pytorch-geometric.readthedocs.io/en/latest/install/installation.html#installation-via-anaconda ),
and this is also why we need Python version to be lower than 3.12 so far.
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.

* **Why we need pandas <2.0.0?**

Because v2 may cause ``ModuleNotFoundError: No module named 'pandas.core.indexes.numeric'``,
Expand Down