Skip to content

Commit

Permalink
Merge branch 'master' into link_test
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Sep 25, 2023
2 parents d7b05d8 + cee1b98 commit 1b91001
Show file tree
Hide file tree
Showing 126 changed files with 1,040 additions and 502 deletions.
21 changes: 10 additions & 11 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# Copyright (c) 2017-2019 The University of Manchester
# Copyright (c) 2017 The University of Manchester
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# https://www.apache.org/licenses/LICENSE-2.0
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[run]
branch = True
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2021 The University of Manchester
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
assignees:
- "dkfellows"
reviewers:
- "rowleya"
22 changes: 13 additions & 9 deletions .github/workflows/c_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -17,11 +17,12 @@ on: [push]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout SupportScripts
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: SpiNNakerManchester/SupportScripts
path: support
Expand All @@ -34,14 +35,17 @@ jobs:
with:
python-version: 3.8
- name: Checkout SpiNNaker Dependencies
uses: ./support/actions/checkout-spinn-deps
uses: ./support/actions/install-spinn-deps
with:
# Note: SpiNNUtils needed for spinn_utilities.make_tools
repositories: spinnaker_tools spinn_common SpiNNFrontEndCommon SpiNNUtils
- name: Install SpiNNUtils
# Must be separate install; don't want to install FEC
run: python setup.py install
working-directory: SpiNNUtils
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

# Note: run these before building to avoid linting modified_src directories
- name: Lint C code using Vera++
Expand Down
68 changes: 55 additions & 13 deletions .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -20,15 +20,18 @@ on: [push]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11"]

env:
BASE_PKG: spinnaker_graph_front_end
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout SupportScripts
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: SpiNNakerManchester/SupportScripts
path: support
Expand All @@ -40,16 +43,16 @@ jobs:
- name: Install pip, etc
uses: ./support/actions/python-tools
- name: Install Spinnaker Dependencies
uses: ./support/actions/checkout-spinn-deps
uses: ./support/actions/install-spinn-deps
with:
repositories: >
SpiNNUtils SpiNNMachine SpiNNMan PACMAN DataSpecification spalloc
SpiNNUtils SpiNNMachine SpiNNMan PACMAN spalloc
SpiNNFrontEndCommon TestBase
install: true
- name: Install matplotlib
uses: ./support/actions/install-matplotlib
- name: Setup
uses: ./support/actions/run-setup
uses: ./support/actions/run-install

- name: Create a configuration file
uses: ./support/actions/configure-spynnaker
Expand All @@ -61,25 +64,64 @@ jobs:
with:
tests: unittests
coverage: ${{ matrix.python-version == 3.8 }}
cover-packages: spinnaker_graph_front_end
cover-packages: ${{ env.BASE_PKG }}
coveralls-token: ${{ secrets.GITHUB_TOKEN }}

- name: Lint with flake8
run: flake8 spinnaker_graph_front_end unittests gfe_examples
run: flake8 ${{ env.BASE_PKG }} unittests gfe_examples
- name: Lint with pylint
uses: ./support/actions/pylint
with:
package: spinnaker_graph_front_end gfe_examples
exitcheck: 39
package: ${{ env.BASE_PKG }} gfe_examples
language: en_GB

validate:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout SupportScripts
uses: actions/checkout@v4
with:
repository: SpiNNakerManchester/SupportScripts
path: support

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install pip, etc
uses: ./support/actions/python-tools
- name: Install Spinnaker Dependencies
uses: ./support/actions/install-spinn-deps
with:
repositories: >
SpiNNUtils SpiNNMachine SpiNNMan PACMAN spalloc
SpiNNFrontEndCommon TestBase
install: true
- name: Install matplotlib
uses: ./support/actions/install-matplotlib
- name: Setup
uses: ./support/actions/run-install

- 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: Run rat copyright enforcement
if: matrix.python-version == 3.8
uses: ./support/actions/check-copyrights
with:
config_file: rat_asl20.xml

- name: Build documentation with sphinx
if: matrix.python-version == 3.8
uses: ./support/actions/sphinx
with:
directory: doc/source

- name: Validate CITATION.cff
uses: dieghernan/cff-validator@main
24 changes: 16 additions & 8 deletions requirements.txt → .pylint_dict.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
# Copyright (c) 2017 The University of Manchester
# Copyright (c) 2023 The University of Manchester
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

SpiNNUtilities == 1!6.0.1
SpiNNMachine == 1!6.0.1
SpiNNMan == 1!6.0.1
SpiNNaker_PACMAN == 1!6.0.1
SpiNNaker_DataSpecification == 1!6.0.1
SpiNNFrontEndCommon == 1!6.0.1
# Our abbreviations
GFE
gfe
aplx

# Python packages
pacman
spalloc

# Python types
ApplicationVertex
MachineVertex
ApplicationEdge
MachineEdge
ModuleType
9 changes: 5 additions & 4 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand Down Expand Up @@ -140,13 +140,14 @@ disable=print-statement,
global-statement,
fixme,
protected-access,
attribute-defined-outside-init
attribute-defined-outside-init,
missing-module-docstring

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=c-extension-no-member
enable=c-extension-no-member,C0402,C0403


[REPORTS]
Expand Down Expand Up @@ -538,4 +539,4 @@ known-third-party=enchant

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
overgeneral-exceptions=builtin.Exception
1 change: 0 additions & 1 deletion .ratexcludes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
**/SpiNNMachine/**
**/SpiNNMan/**
**/PACMAN/**
**/DataSpecification/**
**/spalloc/**
**/SpiNNFrontEndCommon/**
**/modified_src/**
Expand Down
27 changes: 15 additions & 12 deletions requirements-test.txt → .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,25 @@
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

-r requirements.txt
SpiNNakerTestBase == 1!6.0.1
flake8
coverage >= 4.4, < 5.0
# pytest will be brought in by pytest-cov
pytest-cov
pytest-timeout
pytest-forked
pytest-progress
sphinx >= 4
testfixtures
version: 2
build:
os: ubuntu-20.04
tools:
python: "3.8"
sphinx:
configuration: doc/source/conf.py
builder: dirhtml
fail_on_warning: false
python:
install:
- requirements: doc/doc_requirements.txt
- method: pip
path: .
Loading

0 comments on commit 1b91001

Please sign in to comment.