From 2ed6e0b21e48a462e66e9c55f23facd1090b0998 Mon Sep 17 00:00:00 2001
From: "Christian Y. Brenninkmeijer"
 <christian.brenninkmeijer@manchester.ac.uk>
Date: Fri, 31 May 2024 14:55:46 +0100
Subject: [PATCH 1/8] use central actions and workflows from SupportScripts

---
 .github/workflows/c_actions.yml      | 41 ++++----------
 .github/workflows/python_actions.yml | 81 +++++-----------------------
 2 files changed, 24 insertions(+), 98 deletions(-)

diff --git a/.github/workflows/c_actions.yml b/.github/workflows/c_actions.yml
index e5a3196..8f9a882 100644
--- a/.github/workflows/c_actions.yml
+++ b/.github/workflows/c_actions.yml
@@ -20,42 +20,23 @@ name: C Actions
 on: [push]
 jobs:
   build:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-latest
+    timeout-minutes: 15
 
     steps:
-    - name: Install Ubuntu packages
-      run: sudo apt-get install doxygen gcc-arm-none-eabi --fix-missing
-    - name: Configure Python 3.12
-      # Note: Python is needed for spinn_utilities.make_tools when building
-      uses: actions/setup-python@v5
+    - name: Prepare
+      uses: SpiNNakerManchester/SupportScripts/actions/prepare@main
       with:
-        python-version: 3.12
-
-    - name: Checkout
-      uses: actions/checkout@v4
-    - name: Checkout SupportScripts
-      uses: actions/checkout@v4
-      with:
-        repository: SpiNNakerManchester/SupportScripts
-        path: support
-
-    - name: Checkout Spinnaker Dependencies
-      uses: ./support/actions/install-spinn-deps
-      with:
-        # Note: SpiNNUtils needed for spinn_utilities.make_tools
-        repositories: >
-          spinnaker_tools spinn_common SpiNNFrontEndCommon
-
-    - name: "Prepare: Install SpiNNUtils"
-      uses: ./support/actions/install-spinn-deps
-      with:
-        # Note: SpiNNUtils needed for spinn_utilities.make_tools
-        repositories: SpiNNUtils
-        install: true
+        python-version: "3.12"
+        checkout_dependencies: spinnaker_tools spinn_common SpiNNFrontEndCommon
+        install_dependencies: SpiNNUtils
+        install_module: false
+        install_check_tools: false
+        ubuntu_packages: doxygen gcc-arm-none-eabi
 
     - name: Lint C code using Vera++
       # Note: run this before building to avoid linting modified_src directories
-      uses: ./support/actions/vera
+      uses: SpiNNakerManchester/SupportScripts/actions/vera@main
       with:
         base-dir: c_models
 
diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml
index a36a00e..1547d19 100644
--- a/.github/workflows/python_actions.yml
+++ b/.github/workflows/python_actions.yml
@@ -20,73 +20,18 @@ name: Python Actions
 on: [push]
 
 jobs:
-  build:
-    runs-on: ubuntu-latest
-    strategy:
-      matrix:
-        python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
-    steps:
-    - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v5
-      with:
-        python-version: ${{ matrix.python-version }}
-    - name: Checkout
-      uses: actions/checkout@v4
-    - name: Checkout SupportScripts
-      uses: actions/checkout@v4
-      with:
-        repository: SpiNNakerManchester/SupportScripts
-        path: support
-    - name: Install pip, etc
-      uses: ./support/actions/python-tools
-    - name: Install mypy
-      run: pip install mypy
-
-    - name: Install Spinnaker Dependencies
-      uses: ./support/actions/install-spinn-deps
-      with:
-        repositories: >
+  call:
+    uses: SpiNNakerManchester/SupportScripts/.github/workflows/python_checks.yml@main
+    with:
+      base-package: mcmc
+      dependencies: >
           SpiNNUtils SpiNNMachine SpiNNMan PACMAN spalloc
           SpiNNFrontEndCommon SpiNNakerGraphFrontEnd TestBase
-        install: true
-
-    - name: Setup
-      uses: ./support/actions/run-install
-
-#    # Add this when tests are built
-    - name: Create a configuration file
-      uses: ./support/actions/configure-spynnaker
-      with:
-        board-address: spinn-4.cs.man.ac.uk
-    - run: mv ~/.spynnaker.cfg ~/.spiNNakerGraphFrontEnd.cfg
-
-    - name: Test with pytest
-      uses: ./support/actions/pytest
-      with:
-        tests: unittests
-        coverage: ${{ matrix.python-version == 3.12 }}
-        cover-packages: ${{ env.CODE_PATHS }}
-        coveralls-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
-
-    - name: Lint with flake8
-      run: flake8 mcmc mcmc_examples
-    - name: Lint with pylint
-      uses: ./support/actions/pylint
-      with: 
-        package: mcmc mcmc_examples
-        exitcheck: 39
-
-    - name: Run rat copyright enforcement
-      if: matrix.python-version == 3.12
-      uses: ./support/actions/check-copyrights
-
-    - name: Lint with mypy
-      run: mypy mcmc
-
-#    # Add the following as required in the future
-#    - name: Validate XML
-#      if: matrix.python-version == 3.8
-#      uses: ./support/actions/validate-xml
-#      with:
-#        base-path: mcmc mcmc_examples
-
+      ubuntu_packages: graphviz
+      test_directories: unittests
+      flake8-packages: mcmc mcmc_examples
+      check_prereleases: false
+      cfg_file: spiNNakerGraphFrontEnd
+
+    # pylint mcmc mcmc_examples
+    # mypy mypy mcmc
\ No newline at end of file

From 4b5dc7074fcb3a8b2e002800258bec9cdc407709 Mon Sep 17 00:00:00 2001
From: "Christian Y. Brenninkmeijer"
 <christian.brenninkmeijer@manchester.ac.uk>
Date: Fri, 31 May 2024 15:40:11 +0100
Subject: [PATCH 2/8] rat_config_file

---
 .github/workflows/python_actions.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml
index 1547d19..43be7d1 100644
--- a/.github/workflows/python_actions.yml
+++ b/.github/workflows/python_actions.yml
@@ -32,6 +32,7 @@ jobs:
       flake8-packages: mcmc mcmc_examples
       check_prereleases: false
       cfg_file: spiNNakerGraphFrontEnd
+      rat_config_file: rat_gpl3.xml
 
     # pylint mcmc mcmc_examples
     # mypy mypy mcmc
\ No newline at end of file

From 46bbd7f7ec9d74e8d3b428f8833e006fa61c8e3d Mon Sep 17 00:00:00 2001
From: "Christian Y. Brenninkmeijer"
 <christian.brenninkmeijer@manchester.ac.uk>
Date: Mon, 3 Jun 2024 11:12:20 +0100
Subject: [PATCH 3/8] relax pylint checks

---
 .github/workflows/python_actions.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml
index 43be7d1..e2129f7 100644
--- a/.github/workflows/python_actions.yml
+++ b/.github/workflows/python_actions.yml
@@ -33,6 +33,8 @@ jobs:
       check_prereleases: false
       cfg_file: spiNNakerGraphFrontEnd
       rat_config_file: rat_gpl3.xml
+      rcfile: global_relaxed
+      pylint_exitcheck: 6 # Action fails on ERROR or WARNING
 
     # pylint mcmc mcmc_examples
     # mypy mypy mcmc
\ No newline at end of file

From 601952434fc73913752fe6752b52135f7a0232ed Mon Sep 17 00:00:00 2001
From: "Christian Y. Brenninkmeijer"
 <christian.brenninkmeijer@manchester.ac.uk>
Date: Mon, 3 Jun 2024 11:27:34 +0100
Subject: [PATCH 4/8] mix copyrights allowed (for now)

---
 .github/workflows/python_actions.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml
index e2129f7..1800ff7 100644
--- a/.github/workflows/python_actions.yml
+++ b/.github/workflows/python_actions.yml
@@ -32,7 +32,7 @@ jobs:
       flake8-packages: mcmc mcmc_examples
       check_prereleases: false
       cfg_file: spiNNakerGraphFrontEnd
-      rat_config_file: rat_gpl3.xml
+      rat_config_file: rat.xml  # mix of licenses acceptable to rat
       rcfile: global_relaxed
       pylint_exitcheck: 6 # Action fails on ERROR or WARNING
 

From de216e167e8068eb10289ec1faad559a306a9f4d Mon Sep 17 00:00:00 2001
From: "Christian Y. Brenninkmeijer"
 <christian.brenninkmeijer@manchester.ac.uk>
Date: Mon, 3 Jun 2024 11:50:29 +0100
Subject: [PATCH 5/8] run_sphinx flag

---
 .github/workflows/python_actions.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml
index 1800ff7..7691f60 100644
--- a/.github/workflows/python_actions.yml
+++ b/.github/workflows/python_actions.yml
@@ -35,6 +35,7 @@ jobs:
       rat_config_file: rat.xml  # mix of licenses acceptable to rat
       rcfile: global_relaxed
       pylint_exitcheck: 6 # Action fails on ERROR or WARNING
+      run_sphinx: false
 
     # pylint mcmc mcmc_examples
     # mypy mypy mcmc
\ No newline at end of file

From bb0378b822befae4b03c25d081f7f39f3ff1c135 Mon Sep 17 00:00:00 2001
From: "Christian Y. Brenninkmeijer"
 <christian.brenninkmeijer@manchester.ac.uk>
Date: Mon, 3 Jun 2024 12:30:59 +0100
Subject: [PATCH 6/8] run_cff-validator

---
 .github/workflows/python_actions.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml
index 7691f60..172a272 100644
--- a/.github/workflows/python_actions.yml
+++ b/.github/workflows/python_actions.yml
@@ -36,6 +36,7 @@ jobs:
       rcfile: global_relaxed
       pylint_exitcheck: 6 # Action fails on ERROR or WARNING
       run_sphinx: false
+      run_cff-validator: false
 
     # pylint mcmc mcmc_examples
     # mypy mypy mcmc
\ No newline at end of file

From 9a2a3a478f8b443f9e359db4753bbf9aa43c50a7 Mon Sep 17 00:00:00 2001
From: "Christian Y. Brenninkmeijer"
 <christian.brenninkmeijer@manchester.ac.uk>
Date: Mon, 3 Jun 2024 15:48:46 +0100
Subject: [PATCH 7/8] coverage-package pylint-packages mypy-packages

---
 .github/workflows/python_actions.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml
index 172a272..9e4766a 100644
--- a/.github/workflows/python_actions.yml
+++ b/.github/workflows/python_actions.yml
@@ -23,13 +23,15 @@ jobs:
   call:
     uses: SpiNNakerManchester/SupportScripts/.github/workflows/python_checks.yml@main
     with:
-      base-package: mcmc
       dependencies: >
           SpiNNUtils SpiNNMachine SpiNNMan PACMAN spalloc
           SpiNNFrontEndCommon SpiNNakerGraphFrontEnd TestBase
       ubuntu_packages: graphviz
       test_directories: unittests
+      coverage-package: mcmc
       flake8-packages: mcmc mcmc_examples
+      pylint-packages: mcmc mcmc_examples
+      mypy-packages: mcmc mcmc_examples
       check_prereleases: false
       cfg_file: spiNNakerGraphFrontEnd
       rat_config_file: rat.xml  # mix of licenses acceptable to rat

From 854b6ab07027d0e562a14416bd9f72cff751f2a6 Mon Sep 17 00:00:00 2001
From: "Christian Y. Brenninkmeijer"
 <christian.brenninkmeijer@manchester.ac.uk>
Date: Mon, 3 Jun 2024 16:03:13 +0100
Subject: [PATCH 8/8] mypy-packages: mcmc

---
 .github/workflows/python_actions.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml
index 9e4766a..465e3a6 100644
--- a/.github/workflows/python_actions.yml
+++ b/.github/workflows/python_actions.yml
@@ -31,7 +31,7 @@ jobs:
       coverage-package: mcmc
       flake8-packages: mcmc mcmc_examples
       pylint-packages: mcmc mcmc_examples
-      mypy-packages: mcmc mcmc_examples
+      mypy-packages: mcmc
       check_prereleases: false
       cfg_file: spiNNakerGraphFrontEnd
       rat_config_file: rat.xml  # mix of licenses acceptable to rat