Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
a950843
refactor visualisations and fix/speed up matplotlib backend
M-Lampert Oct 7, 2025
99a1a3e
update matplotlib and tikz
M-Lampert Oct 8, 2025
94bf4f9
finalise static d3js
M-Lampert Oct 9, 2025
a0968c5
update configs
M-Lampert Oct 9, 2025
a560626
add automatic d3js layouting and margin config param
M-Lampert Oct 9, 2025
8ccb706
optimise temporal_edges
M-Lampert Oct 9, 2025
8cc156c
update d3js temporal graphs
M-Lampert Oct 9, 2025
8d672db
update curved edges
M-Lampert Oct 9, 2025
21553d5
efficiency improvements
M-Lampert Oct 9, 2025
17baaa3
fix issues with higher order and curved edges
M-Lampert Oct 10, 2025
bfb507f
update manim
M-Lampert Oct 10, 2025
3d3fae1
fix indexing
M-Lampert Oct 13, 2025
8ada504
update layout
M-Lampert Oct 13, 2025
a4a185c
add temporal network layouting
M-Lampert Oct 13, 2025
4ca903d
add networkx as dependency
M-Lampert Oct 14, 2025
66cfbdb
update manim backend
M-Lampert Oct 14, 2025
5b327ab
fix window and batch functions for temporal graphs
M-Lampert Oct 14, 2025
e7a9b3d
minor fixes
M-Lampert Oct 14, 2025
112e106
start documentation update
M-Lampert Oct 14, 2025
a447edd
update docs and minor fixes
M-Lampert Oct 15, 2025
8f019c2
fix documentation with underscore
M-Lampert Oct 15, 2025
7ac8873
update visualisation notebooks
M-Lampert Oct 15, 2025
f501e3b
documentation improvements
M-Lampert Oct 15, 2025
4162503
finish visualisation code reference
M-Lampert Oct 15, 2025
3e6835a
update plot dev tutorial
M-Lampert Oct 16, 2025
ca22411
fix existing tests
M-Lampert Oct 16, 2025
3ef7c81
update setup yaml
M-Lampert Oct 16, 2025
81a4401
fix tex setup
M-Lampert Oct 16, 2025
633bf1b
update tex action
M-Lampert Oct 16, 2025
7464f3a
fix
M-Lampert Oct 16, 2025
f824a2c
fix tex live setup
M-Lampert Oct 16, 2025
aba0434
set up optimized ffmpeg download
M-Lampert Oct 16, 2025
0ed67d7
improve apt installation
M-Lampert Oct 16, 2025
4cd31c6
add optional python deps
M-Lampert Oct 16, 2025
67c1eda
add tests and minor fixes
M-Lampert Oct 16, 2025
86c9896
update latex installation
M-Lampert Oct 20, 2025
fe1de79
fix ffmpeg installation
M-Lampert Oct 20, 2025
32feb37
-
M-Lampert Oct 20, 2025
be37d9c
fix ffmpeg
M-Lampert Oct 20, 2025
947b9c1
backend tests
M-Lampert Oct 20, 2025
a69dfb7
Merge branch 'main' into 115-use-indexmapping-as-node-labels-by-default
M-Lampert Oct 22, 2025
d8fec8f
fix temporal graph RGB assignment
M-Lampert Oct 27, 2025
173a577
fix higher-order RGB assignment
M-Lampert Oct 27, 2025
4ccfe2b
fix tikz node border opacity
M-Lampert Oct 27, 2025
9d2c182
fix unit-test fail
M-Lampert Oct 27, 2025
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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"ghcr.io/prulloac/devcontainer-features/latex:1": {
"scheme": "minimal",
"mirror": "https://mirror.ctan.org/systems/texlive/tlnet/",
"packages": "tikz-network,standalone,xcolor,xifthen,tools,ifmtarg,pgf,datatool,etoolbox,tracklang,amsmath,trimspaces,epstopdf-pkg,dvisvgm"
"packages": "tikz-network,standalone,xcolor,xifthen,tools,ifmtarg,pgf,datatool,etoolbox,tracklang,amsmath,trimspaces,epstopdf-pkg,dvisvgm,preview,babel-english"
}
}
}
51 changes: 48 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Setup # Inspired by https://github.com/pyg-team/pytorch_geometric/blob/737707c37fc2bd712a2289b683ec14549926ff49/.github/actions/setup/action.yml

description: Set up Python, PyTorch and PyTorch Geometric.
description: Set up environment with dependencies

inputs: # defaults are set to the version used in the dev container
python-version:
Expand All @@ -26,6 +26,12 @@ runs:
python-version: ${{ inputs.python-version }}
activate-environment: true

- name: Cache uv virtual environment
uses: actions/cache@v4
with:
path: .venv
key: uv-venv-${{ runner.os }}-py-${{ inputs.python-version }}-cuda-${{ inputs.cuda-version }}

- name: Install pathpyG
run: |
uv sync --frozen --extra ${{ inputs.cuda-version }}
Expand All @@ -38,9 +44,48 @@ runs:
uv run python -c "import torch; print('CUDA:', torch.version.cuda)"
shell: bash

- name: Set up TeX Live
if: ${{ inputs.full_install == 'true' }}
uses: TeX-Live/setup-texlive-action@v3
with:
cache: true
packages: |
scheme-basic
latexmk
tikz-network
standalone
xcolor
xifthen
tools
ifmtarg
pgf
datatool
etoolbox
tracklang
amsmath
trimspaces
epstopdf-pkg
dvisvgm
preview
babel-english

- name: Install extension packages
if: ${{ inputs.full_install == 'true' }}
run: | # ToDo: Add LaTeX installation
sudo apt-get update && sudo apt-get install -y build-essential python3-dev libcairo2-dev libpango1.0-dev ffmpeg
uses: awalsh128/cache-apt-pkgs-action@v1
with:
execute_install_scripts: true
packages: |
build-essential
python3-dev
libcairo2-dev
libpango1.0-dev

- name: Install ffmpeg
if: ${{ inputs.full_install == 'true' }}
uses: FedericoCarboni/setup-ffmpeg@v3

- name: Install optional Python dependencies
if: ${{ inputs.full_install == 'true' }}
run: |
uv sync --frozen --extra vis --extra ${{ inputs.cuda-version }}
shell: bash
11 changes: 9 additions & 2 deletions docs/gen_ref_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
ignored_modules = yaml.safe_load(ignored_modules_path.read_text("utf-8"))

for path in sorted(Path("src").rglob("*.py")):
if str(path.relative_to(".")) in ignored_modules:
if ignored_modules and str(path.relative_to(".")) in ignored_modules:
print(f"Skipping {path} as it is in the ignored modules list.")
continue
module_path = path.relative_to("src").with_suffix("")
Expand All @@ -28,7 +28,14 @@
elif parts[-1] == "__main__":
continue

nav[(part.split("_")[-1] for part in parts)] = doc_path.as_posix()
parts_list = []
for part in parts:
if part.startswith("_"):
parts_list.append(part.split("_")[-1])
else:
parts_list.append(part)

nav[tuple(parts_list)] = doc_path.as_posix()

print(f"Checking {full_doc_path}")
if not (Path("docs") / full_doc_path).exists():
Expand Down
24 changes: 18 additions & 6 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,22 @@ pip install git+https://github.com/pathpy/pathpyG.git

### Optional Visualisation Backends

We provide multiple visualisation backends for PathpyG. The default backend [D3.js](https://d3js.org/) does not require any additional dependencies. We further provide a [Matplotlib](https://matplotlib.org/) backend that is installed by default. Additionally, we implemented a [Manim](https://www.manim.community/) backend that is not installed by default due to its dependencies that are required for installation. Please refer to the [Manim installation instructions](https://docs.manim.community/en/stable/installation/uv.html) for more information. Once installed, you can use the Manim backend for visualisation by setting the `backend` in the `PathpyG.plot` function to `manim`:
```python
import pathpyg as pp
We provide multiple visualisation backends for PathpyG. The default backend [D3.js](https://d3js.org/) does not require any additional dependencies. We further provide a [Matplotlib](https://matplotlib.org/) backend that is installed by default. Additionally, we implemented a [tikz](https://tikz.dev/) and a [Manim](https://www.manim.community/) backend that are not installed by default due to their dependencies that are required for installation. You can use the tikz backend if you have a LaTeX distribution installed on your system.

t_graph = TemporalGraph.from_edge_list([('a', 'b', 1),('b', 'a', 3), ('b', 'c', 3)])
pp.plot(t_graph, backend='manim')
```
To use the Manim backend, please refer to the [Manim installation instructions](https://docs.manim.community/en/stable/installation/uv.html) for more information. Once installed, you can use the backends for visualisation by setting the `backend` in the `PathpyG.plot` function to `tikz` or `manim`:

??? example "Using the TikZ Backend"
```python
import pathpyg as pp

g = pp.Graph.from_edge_list([('a', 'b'),('b', 'c'),('c', 'a')])
pp.plot(g, backend='tikz')
```

??? example "Using the Manim Backend"
```python
import pathpyg as pp

t_graph = TemporalGraph.from_edge_list([('a', 'b', 1),('b', 'a', 3), ('b', 'c', 3)])
pp.plot(t_graph, backend='manim')
```
Loading
Loading