Skip to content

Commit e8fa280

Browse files
authored
276 validate reference documentation and tutorials (#302)
* add notebook description * minor fixes * update basic tutorials * update notebooks * minor fixes * update notebooks * remove unnecessary datasets * final tutorial notebook * remove progressbars and add pytest nbmake tags * minor fixes visualisation * add tutorial testing * fix no GPU problem * update reference for utils * auto docstring API improvements * update degree statistics * improve docs clustering * fix * minor fixes * docstrings for node similarities * update DBGNN docstrings * fixes docstrings netzschleuder * fix pandas warnings * fixes core * improve core docstrings * fix type annotation dbgnn * add external packages to autoref for docstrings * add external references * fix multi-order model docstrings * improve algorithm docs * add karate plot * fix numpy problems with indexmap * add docstring testing * fix linting and static type checking * fix circular import * speed up notebook tests
1 parent 326c1cc commit e8fa280

103 files changed

Lines changed: 27534 additions & 107428 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Docstring Testing
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
11+
pytest:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v5
17+
18+
# Only run workflow if certain files have been changed.
19+
- name: Get changed files
20+
id: changed-files
21+
uses: tj-actions/changed-files@v42
22+
with:
23+
files: |
24+
.github/workflows/notebook_testing.yml
25+
src/**
26+
tests/**
27+
pyproject.toml
28+
29+
- name: Setup packages
30+
if: steps.changed-files.outputs.any_changed == 'true'
31+
uses: ./.github/actions/setup
32+
33+
- name: Run tests
34+
if: steps.changed-files.outputs.any_changed == 'true'
35+
run: | # ignore centrality.py because __getattr__ gets overwritten which causes issues with pytest
36+
pytest --doctest-modules src/pathpyG/ --ignore="src/pathpyG/algorithms/centrality.py" --no-cov

.github/workflows/linting.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626
run: pip install ruff
2727

2828
- name: Run linting
29-
continue-on-error: true
3029
run: ruff check .
3130

3231
mypy:
@@ -42,6 +41,5 @@ jobs:
4241
full_install: false
4342

4443
- name: Check type hints
45-
continue-on-error: true
4644
run: |
4745
mypy src/pathpyG
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Tutorial Notebook Testing
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
11+
pytest:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v5
17+
18+
# Only run workflow if certain files have been changed.
19+
- name: Get changed files
20+
id: changed-files
21+
uses: tj-actions/changed-files@v42
22+
with:
23+
files: |
24+
.github/workflows/notebook_testing.yml
25+
src/**
26+
tests/**
27+
pyproject.toml
28+
29+
- name: Setup packages
30+
if: steps.changed-files.outputs.any_changed == 'true'
31+
uses: ./.github/actions/setup
32+
33+
- name: Run tests
34+
if: steps.changed-files.outputs.any_changed == 'true'
35+
run: |
36+
pytest --nbmake docs/tutorial/*ipynb --no-cov

0 commit comments

Comments
 (0)