Skip to content

Commit 2e71580

Browse files
committed
Fix pre-commit issues
1 parent e4c6cda commit 2e71580

8 files changed

Lines changed: 98 additions & 57 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ repos:
127127
args: ["--ignore-words-list=doas"]
128128

129129
- repo: https://github.com/rhysd/actionlint
130-
rev: "v1.7.10"
130+
rev: "v1.7.11"
131131
hooks:
132132
- id: actionlint
133133

docs/notebooks/kinetic_scheme_visualization.ipynb

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"id": "intro-title",
5+
"id": "0",
66
"metadata": {},
77
"source": [
88
"# Kinetic Scheme Visualization\n",
@@ -22,7 +22,7 @@
2222
},
2323
{
2424
"cell_type": "markdown",
25-
"id": "basics-heading",
25+
"id": "1",
2626
"metadata": {},
2727
"source": [
2828
"## Basics\n",
@@ -33,7 +33,7 @@
3333
{
3434
"cell_type": "code",
3535
"execution_count": null,
36-
"id": "import-basics",
36+
"id": "2",
3737
"metadata": {},
3838
"outputs": [],
3939
"source": [
@@ -47,7 +47,7 @@
4747
},
4848
{
4949
"cell_type": "markdown",
50-
"id": "basic-call-heading",
50+
"id": "3",
5151
"metadata": {},
5252
"source": [
5353
"### Minimal call\n",
@@ -59,7 +59,7 @@
5959
{
6060
"cell_type": "code",
6161
"execution_count": null,
62-
"id": "basic-sequential",
62+
"id": "4",
6363
"metadata": {},
6464
"outputs": [],
6565
"source": [
@@ -73,7 +73,7 @@
7373
},
7474
{
7575
"cell_type": "markdown",
76-
"id": "parallel-heading",
76+
"id": "5",
7777
"metadata": {},
7878
"source": [
7979
"A parallel decay model has independent decay channels. All compartments appear side by side,\n",
@@ -83,7 +83,7 @@
8383
{
8484
"cell_type": "code",
8585
"execution_count": null,
86-
"id": "basic-parallel",
86+
"id": "6",
8787
"metadata": {},
8888
"outputs": [],
8989
"source": [
@@ -97,7 +97,7 @@
9797
},
9898
{
9999
"cell_type": "markdown",
100-
"id": "dataset-heading",
100+
"id": "7",
101101
"metadata": {},
102102
"source": [
103103
"### Dataset-level entry point\n",
@@ -110,7 +110,7 @@
110110
{
111111
"cell_type": "code",
112112
"execution_count": null,
113-
"id": "basic-dataset",
113+
"id": "8",
114114
"metadata": {},
115115
"outputs": [],
116116
"source": [
@@ -124,7 +124,7 @@
124124
},
125125
{
126126
"cell_type": "markdown",
127-
"id": "gs-heading",
127+
"id": "9",
128128
"metadata": {},
129129
"source": [
130130
"### Ground state bar\n",
@@ -136,7 +136,7 @@
136136
{
137137
"cell_type": "code",
138138
"execution_count": null,
139-
"id": "gs-shared",
139+
"id": "10",
140140
"metadata": {},
141141
"outputs": [],
142142
"source": [
@@ -153,7 +153,7 @@
153153
},
154154
{
155155
"cell_type": "markdown",
156-
"id": "rate-labels-heading",
156+
"id": "11",
157157
"metadata": {},
158158
"source": [
159159
"### Rate labels\n",
@@ -165,7 +165,7 @@
165165
{
166166
"cell_type": "code",
167167
"execution_count": null,
168-
"id": "rate-labels",
168+
"id": "12",
169169
"metadata": {},
170170
"outputs": [],
171171
"source": [
@@ -182,7 +182,7 @@
182182
},
183183
{
184184
"cell_type": "markdown",
185-
"id": "export-heading",
185+
"id": "13",
186186
"metadata": {},
187187
"source": [
188188
"### Exporting figures\n",
@@ -194,7 +194,7 @@
194194
{
195195
"cell_type": "code",
196196
"execution_count": null,
197-
"id": "export-demo",
197+
"id": "14",
198198
"metadata": {},
199199
"outputs": [],
200200
"source": [
@@ -216,7 +216,7 @@
216216
},
217217
{
218218
"cell_type": "markdown",
219-
"id": "real-world-heading",
219+
"id": "15",
220220
"metadata": {},
221221
"source": [
222222
"## Real-world example: target analysis of carotenoid triads\n",
@@ -235,7 +235,7 @@
235235
{
236236
"cell_type": "code",
237237
"execution_count": null,
238-
"id": "load-target",
238+
"id": "16",
239239
"metadata": {},
240240
"outputs": [],
241241
"source": [
@@ -253,7 +253,7 @@
253253
},
254254
{
255255
"cell_type": "markdown",
256-
"id": "single-mc-heading",
256+
"id": "17",
257257
"metadata": {},
258258
"source": [
259259
"### Single megacomplex: RCG triad\n",
@@ -266,7 +266,7 @@
266266
{
267267
"cell_type": "code",
268268
"execution_count": null,
269-
"id": "single-mc",
269+
"id": "18",
270270
"metadata": {},
271271
"outputs": [],
272272
"source": [
@@ -281,7 +281,7 @@
281281
},
282282
{
283283
"cell_type": "markdown",
284-
"id": "dataset-real-heading",
284+
"id": "19",
285285
"metadata": {},
286286
"source": [
287287
"### Dataset-level: automatically skip non-decay megacomplexes\n",
@@ -294,7 +294,7 @@
294294
{
295295
"cell_type": "code",
296296
"execution_count": null,
297-
"id": "dataset-real",
297+
"id": "20",
298298
"metadata": {},
299299
"outputs": [],
300300
"source": [
@@ -309,7 +309,7 @@
309309
},
310310
{
311311
"cell_type": "markdown",
312-
"id": "all-mc-heading",
312+
"id": "21",
313313
"metadata": {},
314314
"source": [
315315
"### Multiple megacomplexes: all three triads together\n",
@@ -321,7 +321,7 @@
321321
{
322322
"cell_type": "code",
323323
"execution_count": null,
324-
"id": "all-mc",
324+
"id": "22",
325325
"metadata": {},
326326
"outputs": [],
327327
"source": [
@@ -337,7 +337,7 @@
337337
},
338338
{
339339
"cell_type": "markdown",
340-
"id": "config-heading",
340+
"id": "23",
341341
"metadata": {},
342342
"source": [
343343
"## Customization with `KineticSchemeConfig`\n",
@@ -348,7 +348,7 @@
348348
},
349349
{
350350
"cell_type": "markdown",
351-
"id": "color-mapping-heading",
351+
"id": "24",
352352
"metadata": {},
353353
"source": [
354354
"### Color mapping\n",
@@ -361,7 +361,7 @@
361361
{
362362
"cell_type": "code",
363363
"execution_count": null,
364-
"id": "color-mapping",
364+
"id": "25",
365365
"metadata": {},
366366
"outputs": [],
367367
"source": [
@@ -387,7 +387,7 @@
387387
},
388388
{
389389
"cell_type": "markdown",
390-
"id": "node-styles-heading",
390+
"id": "26",
391391
"metadata": {},
392392
"source": [
393393
"### Per-node styling and display labels\n",
@@ -400,7 +400,7 @@
400400
{
401401
"cell_type": "code",
402402
"execution_count": null,
403-
"id": "node-styles",
403+
"id": "27",
404404
"metadata": {},
405405
"outputs": [],
406406
"source": [
@@ -428,7 +428,7 @@
428428
},
429429
{
430430
"cell_type": "markdown",
431-
"id": "layout-heading",
431+
"id": "28",
432432
"metadata": {},
433433
"source": [
434434
"### Layout hints\n",
@@ -442,7 +442,7 @@
442442
{
443443
"cell_type": "code",
444444
"execution_count": null,
445-
"id": "layout-hint",
445+
"id": "29",
446446
"metadata": {},
447447
"outputs": [],
448448
"source": [
@@ -462,7 +462,7 @@
462462
},
463463
{
464464
"cell_type": "markdown",
465-
"id": "spring-heading",
465+
"id": "30",
466466
"metadata": {},
467467
"source": [
468468
"### Spring layout for complex graphs\n",
@@ -474,7 +474,7 @@
474474
{
475475
"cell_type": "code",
476476
"execution_count": null,
477-
"id": "spring-layout",
477+
"id": "31",
478478
"metadata": {},
479479
"outputs": [],
480480
"source": [
@@ -503,7 +503,7 @@
503503
},
504504
{
505505
"cell_type": "markdown",
506-
"id": "gs-real-heading",
506+
"id": "32",
507507
"metadata": {},
508508
"source": [
509509
"### Ground state bar on a real model\n",
@@ -515,7 +515,7 @@
515515
{
516516
"cell_type": "code",
517517
"execution_count": null,
518-
"id": "gs-real",
518+
"id": "33",
519519
"metadata": {},
520520
"outputs": [],
521521
"source": [
@@ -543,7 +543,7 @@
543543
},
544544
{
545545
"cell_type": "markdown",
546-
"id": "omit-heading",
546+
"id": "34",
547547
"metadata": {},
548548
"source": [
549549
"### Omitting specific rate parameters\n",
@@ -555,7 +555,7 @@
555555
{
556556
"cell_type": "code",
557557
"execution_count": null,
558-
"id": "omit-params",
558+
"id": "35",
559559
"metadata": {},
560560
"outputs": [],
561561
"source": [
@@ -582,7 +582,7 @@
582582
},
583583
{
584584
"cell_type": "markdown",
585-
"id": "subplot-heading",
585+
"id": "36",
586586
"metadata": {},
587587
"source": [
588588
"### Side-by-side comparison with subplots\n",
@@ -594,7 +594,7 @@
594594
{
595595
"cell_type": "code",
596596
"execution_count": null,
597-
"id": "subplot-comparison",
597+
"id": "37",
598598
"metadata": {},
599599
"outputs": [],
600600
"source": [
@@ -625,7 +625,7 @@
625625
},
626626
{
627627
"cell_type": "markdown",
628-
"id": "config-reference-heading",
628+
"id": "38",
629629
"metadata": {},
630630
"source": [
631631
"## Configuration reference\n",

pyglotaran_extras/inspect/kinetic_scheme/_kinetic_graph.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,18 @@ def is_dag(self) -> bool:
260260
gray: set[str] = set()
261261

262262
def _has_cycle(node: str) -> bool:
263-
"""Check if a cycle is reachable from ``node`` via DFS."""
263+
"""Check if a cycle is reachable from ``node`` via DFS.
264+
265+
Parameters
266+
----------
267+
node : str
268+
The starting node for cycle detection.
269+
270+
Returns
271+
-------
272+
bool
273+
True if a cycle is reachable from the node.
274+
"""
264275
white.discard(node)
265276
gray.add(node)
266277
for neighbor in self._adjacency.get(node, []):

0 commit comments

Comments
 (0)