From 6612c58b43b83bb7500e7cca578e45bd07202842 Mon Sep 17 00:00:00 2001 From: Moritz Lampert Date: Thu, 9 Jul 2026 15:34:29 +0000 Subject: [PATCH 1/4] fix ffmpeg and update versions --- .github/actions/setup/action.yml | 11 ++++------- .github/workflows/docstring_testing.yml | 2 +- .github/workflows/notebook_testing.yml | 2 +- .github/workflows/testing.yml | 3 ++- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index a5a723a1..00a92a23 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -21,13 +21,13 @@ runs: steps: - name: Install uv - uses: astral-sh/setup-uv@v6 + uses: astral-sh/setup-uv@v8.3.2 with: python-version: ${{ inputs.python-version }} activate-environment: true - name: Cache uv virtual environment - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: .venv key: uv-venv-${{ runner.os }}-py-${{ inputs.python-version }}-cuda-${{ inputs.cuda-version }} @@ -46,7 +46,7 @@ runs: - name: Set up TeX Live if: ${{ inputs.full_install == 'true' }} - uses: TeX-Live/setup-texlive-action@v3 + uses: TeX-Live/setup-texlive-action@v4 with: cache: true packages: | @@ -79,11 +79,8 @@ runs: python3-dev libcairo2-dev libpango1.0-dev + ffmpeg - - name: Install ffmpeg - if: ${{ inputs.full_install == 'true' }} - uses: FedericoCarboni/setup-ffmpeg@v3 - - name: Install optional Python dependencies if: ${{ inputs.full_install == 'true' }} run: | diff --git a/.github/workflows/docstring_testing.yml b/.github/workflows/docstring_testing.yml index 96f71d74..86528976 100644 --- a/.github/workflows/docstring_testing.yml +++ b/.github/workflows/docstring_testing.yml @@ -18,7 +18,7 @@ jobs: # Only run workflow if certain files have been changed. - name: Get changed files id: changed-files - uses: tj-actions/changed-files@v42 + uses: tj-actions/changed-files@v47 with: files: | .github/workflows/notebook_testing.yml diff --git a/.github/workflows/notebook_testing.yml b/.github/workflows/notebook_testing.yml index b31b53ec..8f29ac57 100644 --- a/.github/workflows/notebook_testing.yml +++ b/.github/workflows/notebook_testing.yml @@ -18,7 +18,7 @@ jobs: # Only run workflow if certain files have been changed. - name: Get changed files id: changed-files - uses: tj-actions/changed-files@v42 + uses: tj-actions/changed-files@v47 with: files: | .github/workflows/notebook_testing.yml diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index b5b40032..dba130c3 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -5,6 +5,7 @@ on: push: branches: - main + - 317-ci-tests-are-failing-because-ffmpeg-installation-does-not-work pull_request: jobs: @@ -19,7 +20,7 @@ jobs: # Only run workflow if certain files have been changed. - name: Get changed files id: changed-files - uses: tj-actions/changed-files@v42 + uses: tj-actions/changed-files@v47 with: files: | .github/workflows/testing.yml From 0dcc54101f6bb47619d18ae8241bfd24c084fa07 Mon Sep 17 00:00:00 2001 From: Moritz Lampert Date: Thu, 9 Jul 2026 15:41:29 +0000 Subject: [PATCH 2/4] remove debug config --- .github/workflows/testing.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index dba130c3..5fb0e8b5 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -5,7 +5,6 @@ on: push: branches: - main - - 317-ci-tests-are-failing-because-ffmpeg-installation-does-not-work pull_request: jobs: From 8fc28ffa75258dcb3613af8ab9e67a405a249740 Mon Sep 17 00:00:00 2001 From: Moritz Lampert Date: Thu, 9 Jul 2026 17:48:48 +0200 Subject: [PATCH 3/4] Fix doc_string change detection Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/docstring_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docstring_testing.yml b/.github/workflows/docstring_testing.yml index 86528976..378a2488 100644 --- a/.github/workflows/docstring_testing.yml +++ b/.github/workflows/docstring_testing.yml @@ -21,7 +21,7 @@ jobs: uses: tj-actions/changed-files@v47 with: files: | - .github/workflows/notebook_testing.yml + .github/workflows/docstring_testing.yml src/** tests/** pyproject.toml From 91c2584693c0ffb5c5ce7df22c23d209e1671a51 Mon Sep 17 00:00:00 2001 From: Moritz Lampert Date: Thu, 9 Jul 2026 16:04:13 +0000 Subject: [PATCH 4/4] add network pytest marker to make netzschleuder tests CI compatible --- .github/workflows/full_testing.yml | 10 +++++++++- .github/workflows/testing.yml | 10 +++++++++- pyproject.toml | 3 ++- tests/io/test_netzschleuder.py | 7 +++++++ 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/full_testing.yml b/.github/workflows/full_testing.yml index d354035e..17f064a8 100644 --- a/.github/workflows/full_testing.yml +++ b/.github/workflows/full_testing.yml @@ -28,5 +28,13 @@ jobs: - name: Run tests run: | - pytest + pytest -m "not network and not benchmark and not gpu" + shell: bash + + # Tests that depend on reaching external network services (e.g. networks.skewed.de) + # are flaky in CI, so they run separately and don't fail the build. + - name: Run network-dependent tests + continue-on-error: true + run: | + pytest -m network --no-cov shell: bash diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 5fb0e8b5..43c40b01 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -34,4 +34,12 @@ jobs: - name: Run tests if: steps.changed-files.outputs.any_changed == 'true' run: | - pytest + pytest -m "not network and not benchmark and not gpu" + + # Tests that depend on reaching external network services (e.g. networks.skewed.de) + # are flaky in CI, so they run separately and don't fail the build. + - name: Run network-dependent tests + if: steps.changed-files.outputs.any_changed == 'true' + continue-on-error: true + run: | + pytest -m network --no-cov diff --git a/pyproject.toml b/pyproject.toml index f9b42646..cb4fa23a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -172,7 +172,8 @@ pythonpath = ["src"] testpaths = "tests" markers = [ "benchmark: marks tests as benchmarking tests (deselect with '-m \"not benchmark\"')", - "gpu: marks tests that require GPU support (deselect with '-m \"not gpu\"')" + "gpu: marks tests that require GPU support (deselect with '-m \"not gpu\"')", + "network: marks tests that depend on reaching an external network service (deselect with '-m \"not network\"')" ] addopts = "--cov=src -m \"not benchmark and not gpu\" --doctest-modules" doctest_optionflags = "ELLIPSIS NORMALIZE_WHITESPACE" diff --git a/tests/io/test_netzschleuder.py b/tests/io/test_netzschleuder.py index 8eb2d64a..02463e16 100644 --- a/tests/io/test_netzschleuder.py +++ b/tests/io/test_netzschleuder.py @@ -7,6 +7,7 @@ from pathpyG.io import list_netzschleuder_records, read_netzschleuder_graph, read_netzschleuder_record +@pytest.mark.network def test_list_netzschleuder_records(): """Test the list_netzschleuder_records() function.""" # Test the function with a valid URL. @@ -20,6 +21,7 @@ def test_list_netzschleuder_records(): records = list_netzschleuder_records(url) +@pytest.mark.network def test_node_attrs(): """Test the extraction of node attributes.""" g = read_netzschleuder_graph("karate", "77") @@ -28,6 +30,7 @@ def test_node_attrs(): assert "node_groups" in g.node_attrs() +@pytest.mark.network def test_edge_attrs(): """Test the extraction of edge attributes.""" # Original edge list: @@ -65,6 +68,7 @@ def test_edge_attrs(): assert (g.data.edge_weight[mask] == weight).all() +@pytest.mark.network def test_graph_attrs(): """Test the extraction of graph attributes.""" g = read_netzschleuder_graph("karate", "77") @@ -72,6 +76,7 @@ def test_graph_attrs(): assert g.data.analyses_diameter == 5 +@pytest.mark.network def test_read_netzschleuder_record(): """Test the read_netzschleuder_record() function.""" # Test the function with a valid URL. @@ -86,6 +91,7 @@ def test_read_netzschleuder_record(): record = read_netzschleuder_record(record_name, url) +@pytest.mark.network def test_read_netzschleuder_graph(): """Test the read_netzschleuder_graph() function for timestamped data.""" g = read_netzschleuder_graph(name="email_company") @@ -94,6 +100,7 @@ def test_read_netzschleuder_graph(): assert g.m == 5784 +@pytest.mark.network def test_read_netzschleuder_graph_temporal(): """Test the read_netzschleuder_graph() function for timestamped data.""" g = read_netzschleuder_graph(name="email_company", time_attr="time", multiedges=True)