Skip to content

Commit 4c0f87a

Browse files
committed
Merge branch 'issues/CSD-339-joss-first-draft' into develop
2 parents 10f287f + b6d9701 commit 4c0f87a

File tree

16 files changed

+1176
-248
lines changed

16 files changed

+1176
-248
lines changed

.github/workflows/draft-pdf.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Draft PDF
2+
on: [push]
3+
4+
jobs:
5+
paper:
6+
runs-on: ubuntu-latest
7+
name: Paper Draft
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
- name: Build draft PDF
12+
uses: openjournals/openjournals-draft-action@master
13+
with:
14+
journal: joss
15+
paper-path: publication/paper.md
16+
- name: Upload
17+
uses: actions/upload-artifact@v4
18+
with:
19+
name: paper
20+
path: publication/paper.pdf

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,12 @@ docs/source/tutorials/tutorial_outputs/
5050
outputs/
5151

5252
doc/source/tutorials/.ipynb_checkpoints/
53+
5354
/docs/source/tutorials/ACD_RD.ipynb
5455
/docs/source/tutorials/.ipynb_checkpoints/
56+
57+
publication/template/--env
58+
59+
publication/template/--user
60+
61+
publication/template/--volume

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"myst_nb", # add Jupyter notebooks
4949
"sphinx.ext.napoleon", # 'sphinxcontrib.napoleon' is deprecated # Google style docs
5050
"sphinxcontrib.bibtex",
51-
"sphinx_copybutton", # adds a copy button to code blocks
51+
"sphinx_copybutton" # adds a copy button to code blocks
5252
]
5353
autodoc_default_options = {
5454
"members": True, # when set to True, Sphinx will automatically document all members
@@ -74,7 +74,7 @@
7474
nb_execution_timeout = 1000 # This is the timeout for executing a notebook cell
7575

7676
# -- Options for sphinxcontrib extension ---------------------------------------
77-
bibtex_bibfiles = ["references.bib"]
77+
bibtex_bibfiles = ['references.bib']
7878

7979
# -- Options for HTML evaluation -------------------------------------------------
8080

docs/source/tutorials/JointCRep.ipynb

Lines changed: 255 additions & 242 deletions
Large diffs are not rendered by default.

probinet/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
import numpy as np
1212

13+
import numpy as np
14+
1315
from .models.acd import AnomalyDetection
1416
from .models.base import ModelBaseParameters
1517
from .models.crep import CRep

probinet/visualization/plot.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def plot_hard_membership(
1919
node_size: np.ndarray,
2020
colors: Dict,
2121
edge_color: str,
22+
edgewidth: float = 0.5,
2223
) -> plt.Figure:
2324
"""
2425
Plot a graph with nodes colored by their hard memberships.
@@ -53,7 +54,7 @@ def plot_hard_membership(
5354
node_size=node_size,
5455
node_color=[colors[node] for node in communities[k]],
5556
with_labels=False,
56-
width=0.5,
57+
width=edgewidth,
5758
edge_color=edge_color,
5859
arrows=True,
5960
arrowsize=5,
@@ -103,6 +104,7 @@ def plot_soft_membership(
103104
node_size: np.ndarray,
104105
colors: Dict,
105106
edge_color: str,
107+
edgewidth: float = 0.5,
106108
) -> plt.Figure:
107109
"""
108110
Plot a graph with nodes colored by their mixed (soft) memberships.
@@ -128,14 +130,14 @@ def plot_soft_membership(
128130
The matplotlib figure object.
129131
"""
130132

131-
fig = plt.figure(figsize=(9, 4))
133+
fig = plt.figure(figsize=(8, 3))
132134
for j, k in enumerate(thetas):
133135
plt.subplot(1, 2, j + 1)
134136
ax = plt.gca()
135137
nx.draw_networkx_edges(
136138
graph,
137139
pos,
138-
width=0.5,
140+
width=edgewidth,
139141
edge_color=edge_color,
140142
arrows=True,
141143
arrowsize=5,

publication/figures/example.png

336 KB
Loading

publication/jats/example.png

336 KB
Loading
488 KB
Loading

0 commit comments

Comments
 (0)