Skip to content

Commit d904172

Browse files
committed
Hotfix from master
Merge branch 'master' into SharedDevelopment Incorporates documentation and action fixes.
2 parents b028b6f + 6a02426 commit d904172

File tree

6 files changed

+42
-6
lines changed

6 files changed

+42
-6
lines changed

.github/workflows/tests.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
name: Unit and Regression Tests
2-
2+
# Any changes made to documentation won't trigger tests.
33
on:
44
push:
55
branches: [ master,development ]
6+
paths-ignore:
7+
- '.github/**' # Ignore .github folder
8+
- '**/Doxyfile' # Ignore changes to Doxygen config
9+
- 'docs/**' # Ignore documentation folder
10+
- '*.md' # Ignore Markdown files
611
pull_request:
712
types: [opened, synchronize, reopened]
8-
13+
paths-ignore:
14+
- '.github/**' # Ignore .github folder
15+
- '**/Doxyfile' # Ignore changes to Doxygen config
16+
- 'docs/**' # Ignore documentation folder
17+
- '*.md' # Ignore Markdown files
918
defaults:
1019
run:
1120
working-directory: build

docs/Developer/GHActions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ This action is Triggered on a monthly schedule. At the first of every month the
1010

1111
The manual GitHub Pages action is a feature that came from wanting to quickly publish changes to documentation files in our docs folder. This action is activated by navigating to the actions tab, selecting the "Publish GitHub Pages Manually" workflow, then toggling the run workflow button on the desired branch. The branch to run this action on will typically be the master branch as that is the one with the most up to date documentation. Once toggled, it will take the docs files from the selected branch and publish them to the gh-pages branch as a forced orphan just like in the gh-pages.yml workflow. This action will also regenerate the Doxygen files in the same way the gh-pages.yml script does. This is done because other branches doesn't hold the Doxygen/html files and would lose this information if not regenerated during this script.
1212

13+
### Mermaid Diagrams _config.yml
14+
Since mermaid is set to `true` in _config.yml, anytime GitHub Pages action is triggered, _includes/head-custom.html uses Javascript to seek for any files that contains `mermaid` (once webpage finishes loading), then loads mermaid library.
15+
1316
## PlantUML Action plantUML.yml
1417

1518
The plantUML action occurs anytime a plantUML file is modified or added during a pull request or a push to the master branch. These .puml files are supposed to be located in the UML folder within the Developer folder. This action starts by checking out the repository using [actions/checkout](https://github.com/actions/checkout) with a fetch depth of 0. The next step is to grab all of the .puml files that need to be turned into images. This is done by using a basic bash command to grab all .puml files which is then piped into an awk script to parse out the unnecessary files and construct an output string with all the necessary files. The output string will look like so: "file1.puml file2.puml file3.puml file4.puml\n". This output string is then confirmed by an echo command which prints out the string to the actions terminal. Next, the .png and .svg files are generated from the .puml files in the output string using a fork of [holowinski/plantuml-github-action]. These files are placed within the diagrams folder located within the UML folder. Lastly, the local changes are committed then pushed to the remote repository using [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action).

docs/Developer/GHPages.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ You can find more on the automation of the publication by navigating to the [Git
2727

2828
All documents used for our pages reside in the docs folder within the Graphitti repo.
2929

30+
`_includes` folder contains `head-custom.html`, which is resposnible for generating Mermaid diagrams. (More info here: [GHActions.md](GHActions.md#mermaid-diagrams-_configyml))
31+
3032
The Developer folder is used for documentation that deals with documenting systems for developers of Graphitti.
3133

3234
The Doxygen folder is used for documentation that refers to the Doxygen system.

docs/_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ theme: jekyll-theme-slate
33
title: Graphitti
44
description: A project to facilitate construction of high-performance neural simulations
55

6-
7-
show_downloads: false
6+
mermaid: true
7+
show_downloads: false

docs/_includes/head-custom.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{% if site.mermaid %}
2+
<script type="module">
3+
4+
// Old and unoptimized.
5+
// Injects mermaid into each page regardless if a page uses it or not
6+
// Array.from(document.getElementsByClassName("language-mermaid")).forEach(element => {
7+
// element.classList.add("mermaid");
8+
// });
9+
// import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
10+
// mermaid.initialize({ startOnLoad: true });
11+
12+
// Latest version as of 1/7/26
13+
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
14+
15+
mermaid.initialize({ startOnLoad: false });
16+
17+
// Once page is loaded, render Mermaid diagrams
18+
document.addEventListener('DOMContentLoaded', () => {
19+
mermaid.run({ querySelector: '.language-mermaid' });
20+
});
21+
</script>
22+
{% endif %}

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
2. [Developer Documentation](Developer/index.md)
1616

17-
2.1 [GitFlow Documentation](Developer/GitFlowDiagram.md)
17+
2.1 [GitFlow Documentation](Developer/GitFlow.md)
1818

1919
2.2 [Code Formatting Etiquettes](Developer/codingConventions.md)
2020

@@ -52,4 +52,4 @@ Those who have helped make Graphitti what it is and shaping what it will be.
5252
[//]: # (Moving URL links to the bottom of the document for ease of updating - LS)
5353
[//]: # (Links to repo items which exist outside of the docs folder need a direct link.)
5454

55-
[Code of Conduct]: <https://github.com/UWB-Biocomputing/Graphitti/blob/master/CODE_OF_CONDUCT.md>
55+
[Code of Conduct]: <https://github.com/UWB-Biocomputing/Graphitti/blob/master/CODE_OF_CONDUCT.md>

0 commit comments

Comments
 (0)