Skip to content

Commit

Permalink
updated test_tutorials action
Browse files Browse the repository at this point in the history
  • Loading branch information
levtelyatnikov committed Apr 29, 2024
1 parent 76d3452 commit a9ee2c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 111 deletions.
114 changes: 3 additions & 111 deletions .github/workflows/test_tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,115 +23,7 @@ env:
PYDEVD_DISABLE_FILE_VALIDATION: 1

jobs:

simplicial-pytest:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11"]
torch-version: [2.0.1]
include:
- torch-version: 2.0.1
test-group: [1, 2, 3, 4]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install PyTorch ${{ matrix.torch-version }}+cpu
run: |
pip install --upgrade pip setuptools wheel
pip install torch==${{ matrix.torch-version}} --extra-index-url https://download.pytorch.org/whl/cpu
pip install torch-scatter -f https://data.pyg.org/whl/torch-${{ matrix.torch-version }}+cpu.html
pip install torch-sparse -f https://data.pyg.org/whl/torch-${{ matrix.torch-version }}+cpu.html
pip install torch-cluster -f https://data.pyg.org/whl/torch-${{ matrix.torch-version }}+cpu.html
- name: Install main package
run: |
pip install -e .[all]
- name: Run tests for tutorials on simplicial domain [pytest] [Group-${{ matrix.test-group}}]
run: |
pytest --splits 4 --group ${{ matrix.test-group}} test/tutorials/test_simplicial.py
hypergraph-pytest:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11"]
torch-version: [2.0.1]
include:
- torch-version: 2.0.1
test-group: [1, 2, 3]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install PyTorch ${{ matrix.torch-version }}+cpu
run: |
pip install --upgrade pip setuptools wheel
pip install torch==${{ matrix.torch-version}} --extra-index-url https://download.pytorch.org/whl/cpu
pip install torch-scatter -f https://data.pyg.org/whl/torch-${{ matrix.torch-version }}+cpu.html
pip install torch-sparse -f https://data.pyg.org/whl/torch-${{ matrix.torch-version }}+cpu.html
pip install torch-cluster -f https://data.pyg.org/whl/torch-${{ matrix.torch-version }}+cpu.html
- name: Install main package
run: |
pip install -e .[all]
- name: Run tests for tutorials on hypergraph domain [pytest] [Group-${{ matrix.test-group}}]
run: |
pytest --splits 3 --group ${{ matrix.test-group}} test/tutorials/test_hypergraph.py
cell-pytest:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11"]
torch-version: [2.0.1]
include:
- torch-version: 2.0.1

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install PyTorch ${{ matrix.torch-version }}+cpu
run: |
pip install --upgrade pip setuptools wheel
pip install torch==${{ matrix.torch-version}} --extra-index-url https://download.pytorch.org/whl/cpu
pip install torch-scatter -f https://data.pyg.org/whl/torch-${{ matrix.torch-version }}+cpu.html
pip install torch-sparse -f https://data.pyg.org/whl/torch-${{ matrix.torch-version }}+cpu.html
pip install torch-cluster -f https://data.pyg.org/whl/torch-${{ matrix.torch-version }}+cpu.html
- name: Install main package
run: |
pip install -e .[all]
- name: Run tests for tutorials on cell domains [pytest]
run: |
pytest test/tutorials/test_cell.py
combinatorial-pytest:
test-all-tutorials-pytest:
runs-on: ${{ matrix.os }}

strategy:
Expand Down Expand Up @@ -162,6 +54,6 @@ jobs:
- name: Install main package
run: |
pip install -e .[all]
- name: Run tests for tutorials on combinatorial domains [pytest]
- name: Run tests for tutorials on all domains [pytest]
run: |
pytest test/tutorials/test_tutorials.py
pytest test/tutorials/test_tutorials.py
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ test = [
]

[tool.ruff]
select = "challenge-icml-2024"
target-version = "py310"
extend-include = ["*.ipynb"]

Expand Down

0 comments on commit a9ee2c2

Please sign in to comment.