Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/run_examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Run Examples

on:
push:
branches:
- (test)run_examples

jobs:
Run-examples:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
# os: [ubuntu-latest, windows-latest, macOS-latest] # macOS and windows just too expensive
os: [ubuntu-latest]
python-version: ["3.11"] # torch-geometric dependencies config below not compatible with 3.12
pytorch-version: ["2.3.0"]

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

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
check-latest: true
cache: pip
cache-dependency-path: |
requirements/requirements.txt
requirements/requirements_dev.txt

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

- name: Install other dependencies
run: |
pip install -r requirements/requirements.txt

- name: Test building package
# we need to know if the package can be built successfully without optional dependencies
run: |
pip install build wheel
python -m build

- name: Continue to install torch-geometric dependencies
run: |
pip install torch-geometric torch-scatter torch-sparse -f "https://data.pyg.org/whl/torch-${{ matrix.pytorch-version }}+cpu.html"
pip install pypots[dev]
pip install numpy==1.26.4 # many libs not compatible with numpy 2.0. Note 3.12 requests for numpy>=2.0
pip install pandas==1.5 # fix pandas version to avoid installing pandas 2.0, the same reason with numpy
python_site_path=`python -c "import site; print(site.getsitepackages()[0])"`
echo "python site-packages path: $python_site_path"
rm -rf $python_site_path/pypots
python -c "import shutil;import site;shutil.copytree('pypots',site.getsitepackages()[0]+'/pypots')"

- name: Fetch the test environment details
run: |
which python
pip list

- name: Run examples
run: |
python scripts/run_all_examples.py
125 changes: 60 additions & 65 deletions README.md

Large diffs are not rendered by default.

126 changes: 61 additions & 65 deletions README_zh.md

Large diffs are not rendered by default.

Loading
Loading