Skip to content

Commit ba87440

Browse files
Merge pull request #3284 from jessica-mitchell/add-files-examples
Configure Sphinx gallery to copy files from `pynest/examples`
2 parents ed62f57 + c98c79c commit ba87440

14 files changed

+24
-21
lines changed

doc/htmldoc/conf.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
"gallery_dirs": "auto_examples",
8181
"plot_gallery": "False",
8282
"download_all_examples": False,
83+
"copyfile_regex": r".*\.rst|.*\.png|.*\.svg|Snakefile|.*\.txt",
8384
}
8485

8586
# General information about the project.
@@ -260,14 +261,6 @@
260261
]
261262

262263

263-
def copy_example_file(src):
264-
copyfile(os.path.join(pynest_dir, src), Path("examples") / Path(src).parts[-1])
265-
266-
267-
# -- Copy documentation for Microcircuit Model ----------------------------
268-
copy_example_file("examples/hpc_benchmark_connectivity.svg")
269-
270-
271264
def patch_documentation(patch_url):
272265
"""Apply a hot-fix patch to the documentation before building it.
273266

doc/htmldoc/examples/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ PyNEST examples
7676

7777

7878
.. grid-item-card:: Cortical microcircuit (Potjans)
79-
:img-top: ../static/img/potjans_2014_raster_plot.png
79+
:img-top: ../auto_examples/Potjans_2014/potjans_2014_raster_plot.png
8080

8181
* :doc:`../auto_examples/Potjans_2014/index`
8282

8383

8484

8585
.. grid-item-card:: EI clustered network (Rostami et al)
86-
:img-top: ../static/img/pynest/EI_clustered_network_schematic.png
86+
:img-top: ../auto_examples/EI_clustered_network/EI_clustered_network_schematic.png
8787

8888
:doc:`../auto_examples/EI_clustered_network/index`
8989

@@ -256,7 +256,7 @@ PyNEST examples
256256
* :doc:`../auto_examples/sonata_example/sonata_network`
257257

258258
.. grid-item-card:: HPC benchmark
259-
:img-top: ../static/img/nest_logo-faded.png
259+
:img-top: ../auto_examples/hpc_benchmark_connectivity.svg
260260

261261
* :doc:`../auto_examples/hpc_benchmark`
262262

pynest/examples/EI_clustered_network/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ EI-clustered circuit model
33

44
This is PyNEST implementation of the EI-clustered circuit model described by Rostami et al. [1]_.
55

6-
.. figure:: /static/img/pynest/EI_clustered_network_schematic.png
6+
.. figure:: EI_clustered_network_schematic.png
77
:alt: EI-clustered circuit model.
88

99
Schematic of the EI-clustered circuit model. The network consists of `n_clusters` with one excitatory and one inhibitory population each.

pynest/examples/Potjans_2014/README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ The network model represents four layers of cortex, L2/3, L4, L5, and L6, each c
99

1010
.. grid-item::
1111

12-
.. image:: ../../static/img/potjans_2014_microcircuit.png
12+
.. image:: potjans_2014_microcircuit.png
1313

1414
.. grid-item::
1515

16-
.. image:: ../../static/img/potjans_2014_raster_plot.png
16+
.. image:: potjans_2014_raster_plot.png
1717

1818
.. grid-item::
1919

20-
.. image:: ../../static/img/potjans_2014_box_plot.png
20+
.. image:: potjans_2014_box_plot.png
2121

2222

2323

pynest/examples/eprop_plasticity/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ E-prop plasticity examples
22
==========================
33

44

5-
.. image:: ../../../../pynest/examples/eprop_plasticity/eprop_supervised_regression_schematic_sine-waves.png
5+
.. image:: eprop_supervised_regression_schematic_sine-waves.png
66

77
Eligibility propagation (e-prop) [1]_ is a three-factor learning rule for spiking neural networks
88
that approximates backpropagation through time. The original TensorFlow implementation of e-prop

pynest/examples/eprop_plasticity/eprop_supervised_classification_evidence-accumulation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
infer the underlying rationale of the task. Here, the solution is to turn to the side in which more cues were
4141
presented.
4242
43-
.. image:: ../../../../pynest/examples/eprop_plasticity/eprop_supervised_classification_schematic_evidence-accumulation.png
43+
.. image:: eprop_supervised_classification_schematic_evidence-accumulation.png
4444
:width: 70 %
4545
:alt: See Figure 1 below.
4646
:align: center

0 commit comments

Comments
 (0)