diff --git a/.coveragerc b/.coveragerc index c3d1e7b6..fb576410 100644 --- a/.coveragerc +++ b/.coveragerc @@ -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 . +# 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 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..77471a93 --- /dev/null +++ b/.github/dependabot.yml @@ -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" diff --git a/.github/workflows/c_actions.yml b/.github/workflows/c_actions.yml index 10d039fa..e372fdbd 100644 --- a/.github/workflows/c_actions.yml +++ b/.github/workflows/c_actions.yml @@ -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, @@ -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 @@ -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++ diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml index 8bbd2fdf..3e46f91d 100644 --- a/.github/workflows/python_actions.yml +++ b/.github/workflows/python_actions.yml @@ -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, @@ -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 @@ -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 @@ -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 diff --git a/requirements.txt b/.pylint_dict.txt similarity index 65% rename from requirements.txt rename to .pylint_dict.txt index 68b80b7e..355c68de 100644 --- a/requirements.txt +++ b/.pylint_dict.txt @@ -1,10 +1,10 @@ -# 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, @@ -12,10 +12,18 @@ # 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 diff --git a/.pylintrc b/.pylintrc index a0412926..e3560601 100644 --- a/.pylintrc +++ b/.pylintrc @@ -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, @@ -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] @@ -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 diff --git a/.ratexcludes b/.ratexcludes index 43c9bf55..4c20690a 100644 --- a/.ratexcludes +++ b/.ratexcludes @@ -4,7 +4,6 @@ **/SpiNNMachine/** **/SpiNNMan/** **/PACMAN/** -**/DataSpecification/** **/spalloc/** **/SpiNNFrontEndCommon/** **/modified_src/** diff --git a/requirements-test.txt b/.readthedocs.yml similarity index 64% rename from requirements-test.txt rename to .readthedocs.yml index 1eb35ca3..c5fd9511 100644 --- a/requirements-test.txt +++ b/.readthedocs.yml @@ -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, @@ -12,14 +12,17 @@ # 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: . diff --git a/CITATION.cff b/CITATION.cff index 2cfbf157..f936cbca 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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, @@ -12,61 +12,89 @@ # See the License for the specific language governing permissions and # limitations under the License. +cff-version: 1.2.0 +message: If you use this software, please cite it as below. +preferred-citation: + type: article + doi: 10.3389/fnins.2019.00231 + issn: 1662-453X + url: https://www.frontiersin.org/articles/10.3389/fnins.2019.00231 + title: "SpiNNTools: The Execution Engine for the SpiNNaker Platform" + journal: Frontiers in Neuroscience + volume: 13 + year: 2019 + month: 3 + abstract: SpiNNaker is a massively parallel distributed architecture primarily focused on real time simulation of spiking neural networks. The largest realization of the architecture consists of one million general purpose processors, making it the largest neuromorphic computing platform in the world at the present time. Utilizing these processors efficiently requires expert knowledge of the architecture to generate executable code and to harness the potential of the unique inter-processor communications infra-structure that lies at the heart of the SpiNNaker architecture. This work introduces a software suite called SpiNNTools that can map a computational problem described as a graph into the required set of executables, application data and routing information necessary for simulation on this novel machine. The SpiNNaker architecture is highly scalable, giving rise to unique challenges in mapping the problem to the machines resources, loading the generated files to the machine and subsequently retrieving the results of simulation. In this paper we describe these challenges in detail and the solutions implemented. + authors: + - given-names: Andrew + family-names: Rowley + affiliation: University Of Manchester + email: Andrew.Rowley@manchester.ac.uk + orcid: https://orcid.org/0000-0002-2646-8520 + website: https://www.researchgate.net/profile/Andrew_Rowley2 + - given-names: Christian Y. + family-names: Brenninkmeijer + affiliation: University Of Manchester + email: christian.brenninkmeijer@manchester.ac.uk + orcid: https://orcid.org/0000-0002-2937-7819 + website: https://www.researchgate.net/profile/Christian_Brenninkmeijer + - given-names: Simon + family-names: Davidson + affiliation: University Of Manchester + orcid: https://orcid.org/0000-0001-5385-442X + website: https://research.manchester.ac.uk/en/persons/simon.davidson + - given-names: Donal + family-names: Fellows + affiliation: University Of Manchester + orcid: https://orcid.org/0000-0002-9091-5938 + website: https://www.researchgate.net/profile/Donal-Fellows + - given-names: Andrew + family-names: Gait + affiliation: University Of Manchester + orcid: https://orcid.org/0000-0001-9349-1096 + website: https://personalpages.manchester.ac.uk/staff/andrew.gait/ + - given-names: David R. + family-names: Lester + affiliation: University Of Manchester + orcid: https://orcid.org/0000-0002-7267-291X + - given-names: Luis A. + family-names: Plana + affiliation: University Of Manchester + orcid: https://orcid.org/0000-0002-6113-3929 + website: https://research.manchester.ac.uk/en/persons/luis.plana + - given-names: Oliver + family-names: Rhodes + affiliation: University Of Manchester + orcid: https://orcid.org/0000-0003-1728-2828 + website: https://research.manchester.ac.uk/en/persons/oliver.rhodes + - given-names: Alan B. + family-names: Stokes + affiliation: University Of Manchester + orcid: https://orcid.org/0000-0002-6110-1484 + - given-names: Steve B. + family-names: Furber + affiliation: University Of Manchester + orcid: https://orcid.org/0000-0002-6524-3367 + website: https://research.manchester.ac.uk/en/persons/steve.furber + +title: The Front end interface for SpiNNaker machines which represnet the application + as a graph authors: -- affiliation: University Of Manchester - email: alan.stokes-2@manchester.ac.uk - family-names: Stokes - given-names: Alan - orcid: https://orcid.org/0000-0002-6110-1484 - website: http://www.cs.man.ac.uk/~stokesa6/ -- affiliation: University Of Manchester - email: Andrew.Rowley@manchester.ac.uk - family-names: Rowley - given-names: Andrew - orcid: https://orcid.org/0000-0002-2646-8520 - website: https://www.researchgate.net/profile/Andrew_Rowley2 -- affiliation: University Of Manchester - email: Andrew.Gait@manchester.ac.uk - family-names: Gait - given-names: Andrew - orcid: http://orcid.org/0000-0001-9349-1096 - website: https://personalpages.manchester.ac.uk/staff/Andrew.Gait/ -- affiliation: University Of Manchester - email: christian.brenninkmeijer@manchester.ac.uk - family-names: Brenninkmeijer - given-names: Christian Y. - orcid: https://orcid.org/0000-0002-2937-7819 - website: https://www.researchgate.net/profile/Christian_Brenninkmeijer -- affiliation: University Of Manchester - email: donal.k.fellows@manchester.ac.uk - family-names: Fellows - given-names: Donal - orcid: https://orcid.org/0000-0002-9091-5938 - website: http://www.cs.manchester.ac.uk/about-us/staff/profile/?ea=donal.k.fellows -- affiliation: University Of Manchester - email: arthur.ceccotti@student.manchester.ac.uk - family-names: Ceccotti - given-names: Arthur - website: https://www.linkedin.com/in/arthur-ceccotti-07359483 -- affiliation: University Of Manchester - email: sergio.davies@gmail.com - family-names: Davies - given-names: Sergio - orcid: https://orcid.org/0000-0001-5330-5527 - website: http://apt.cs.manchester.ac.uk/people/daviess/ -cff-version: 1.0.3 + - name: SpiNNaker Software Team + alias: For a list of contributors see https://github.com/SpiNNakerManchester/SpiNNakerGraphFrontEnd/graphs/contributors or for a combined list see https://spinnakermanchester.github.io/latest/LicenseAgreement.html#contributors + address: University of Manchester, Oxford Road + city: Manchester + country: GB + email: spinnakerusers@googlegroups.com + post-code: M13 9PL + website: https://apt.cs.manchester.ac.uk/projects/SpiNNaker/ +url: https://spinnakermanchester.github.io/ contact: - address: University of Manchester, Oxford Road city: Manchester country: GB + email: spinnakerusers@googlegroups.com name: SpiNNaker Software Team post-code: M13 9PL -date-released: -email: spinnakerusers@googlegroups.com -identifier: -message: If you use this software, please cite it as below. -repository: https://github.com/SpiNNakerManchester/SpiNNakerGraphFrontEnd -title: The Front end interface for SpiNNaker machines which represnet the application - as a graph -url: http://spinnakermanchester.github.io/ -version: +license: Apache-2.0 +repository: https://github.com/SpiNNakerManchester/SpiNNakerGraphFrontEnd \ No newline at end of file diff --git a/LICENSE b/LICENSE index d6456956..62589edd 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ Apache License Version 2.0, January 2004 - http://www.apache.org/licenses/ + https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -193,7 +193,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, diff --git a/LICENSE.md b/LICENSE_POLICY.md similarity index 53% rename from LICENSE.md rename to LICENSE_POLICY.md index 8f6f572a..9b3e13d9 100644 --- a/LICENSE.md +++ b/LICENSE_POLICY.md @@ -1,17 +1,17 @@ # License Agreement -Up to date information for the whole [SpiNNakerManchester Projects](https://github.com/SpiNNakerManchester) can be found [here](http://spinnakermanchester.github.io/common_pages/4.0.0/LicenseAgreement.html) +Up to date information for the whole [SpiNNakerManchester Projects](https://github.com/SpiNNakerManchester) can be found [here](https://spinnakermanchester.github.io/latest/LicenseAgreement.html) -As shown there the software is currently being released under the GPL version 3 license listed [here](http://www.gnu.org/copyleft/gpl.html) +As shown there the software is currently being released under the Apache License 2.0 listed [here](https://www.apache.org/licenses/LICENSE-2.0) # Paper Authorship -See: [here](http://spinnakermanchester.github.io/common_pages/4.0.0/LicenseAgreement.html#paper-authorship) +See: [here](https://spinnakermanchester.github.io/latest/LicenseAgreement.html#paper-authorship) # Modifications -See: [here](http://spinnakermanchester.github.io/common_pages/4.0.0/LicenseAgreement.html#modifications) +See: [here](https://spinnakermanchester.github.io/latest/LicenseAgreement.html#modifications) # Contributors @@ -19,5 +19,5 @@ For up to date information on Contributors see the graphs/contributors pages on For example [https://github.com/SpiNNakerManchester/SpiNNakerGraphFrontEnd/graphs/contributors](https://github.com/SpiNNakerManchester/SpiNNakerGraphFrontEnd/graphs/contributors) -[Combined list](http://spinnakermanchester.github.io/common_pages/4.0.0/LicenseAgreement.html#contributors) +[Combined list](https://spinnakermanchester.github.io/latest/LicenseAgreement.html#contributors) diff --git a/MANIFEST.in b/MANIFEST.in index 86061928..4e4eef7b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include CITATION.cff LICENSE.md requirements.txt pypi_to_import \ No newline at end of file +include LICENSE LICENSE_POLICY.md README.md CITATION.cff \ No newline at end of file diff --git a/doc/Makefile b/doc/Makefile index ff158ae2..2ff97163 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -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, diff --git a/doc/doc_requirements.txt b/doc/doc_requirements.txt index e4ef8f4c..b6274ebe 100644 --- a/doc/doc_requirements.txt +++ b/doc/doc_requirements.txt @@ -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, @@ -16,6 +16,5 @@ -e git+https://github.com/SpiNNakerManchester/SpiNNMachine.git@master#egg=SpiNNMachine -e git+https://github.com/SpiNNakerManchester/SpiNNMan.git@master#egg=spinnman -e git+https://github.com/SpiNNakerManchester/PACMAN.git@master#egg=spinnaker-pacman --e git+https://github.com/SpiNNakerManchester/DataSpecification.git@master#egg=spinnaker-dataspecification -e git+https://github.com/SpiNNakerManchester/spalloc.git@master#egg=spalloc -e git+https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.git@master#egg=spinnfrontendcommon diff --git a/doc/make.bat b/doc/make.bat index 77663699..eeb5e577 100644 --- a/doc/make.bat +++ b/doc/make.bat @@ -6,7 +6,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, @@ -36,7 +36,7 @@ if errorlevel 9009 ( echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ + echo.https://sphinx-doc.org/ exit /b 1 ) diff --git a/doc/source/conf.py b/doc/source/conf.py index d1efeb39..fefea8b2 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -6,7 +6,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, @@ -55,21 +55,25 @@ 'sphinx.ext.intersphinx' ] +# Which version of other SpiNNaker docs do we refer to? +spinnaker_doc_version = "latest" + intersphinx_mapping = { 'python': ('https://docs.python.org/3.8', None), 'numpy': ("https://numpy.org/doc/1.20/", None), 'spinn_utilities': ( - 'https://spinnutils.readthedocs.io/en/latest/', None), + f'https://spinnutils.readthedocs.io/en/{spinnaker_doc_version}/', + None), 'spinn_machine': ( - 'https://spinnmachine.readthedocs.io/en/latest/', None), + f'https://spinnmachine.readthedocs.io/en/{spinnaker_doc_version}/', + None), 'spinnman': ( - 'https://spinnman.readthedocs.io/en/latest/', None), + f'https://spinnman.readthedocs.io/en/{spinnaker_doc_version}/', None), 'pacman': ( - 'https://pacman.readthedocs.io/en/latest/', None), - 'data_specification': ( - 'https://dataspecification.readthedocs.io/en/latest/', None), + f'https://pacman.readthedocs.io/en/{spinnaker_doc_version}/', None), 'spinn_front_end_common': ( - 'https://spinnfrontendcommon.readthedocs.io/en/latest/', None) + 'https://spinnfrontendcommon.readthedocs.io/en/' + f'{spinnaker_doc_version}/', None) } # Add any paths that contain templates here, relative to this directory. @@ -86,7 +90,7 @@ # General information about the project. project = u'SpiNNakerGraphFrontEnd' -copyright = u'2014-2021' +copyright = u'2014' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -307,7 +311,7 @@ epub_title = u'SpiNNakerGraphFrontEnd' epub_author = u'' epub_publisher = u'' -epub_copyright = u'2014-2017' +epub_copyright = u'2014' # The basename for the epub file. It defaults to the project name. # epub_basename = u'data_allocation' diff --git a/doc/source/index.rst b/doc/source/index.rst index 48e20d0e..bfe081de 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1,18 +1,17 @@ These pages document the python code for the SpiNNakerGraphFrontEnd_ module which is part of the SpiNNaker_ Project. -This code depends on SpiNNUtils_, SpiNNMachine_, SpiNNMan_, PACMAN_, DataSpecification_, SpiNNFrontEndCommon_ +This code depends on SpiNNUtils_, SpiNNMachine_, SpiNNMan_, PACMAN_, SpiNNFrontEndCommon_ (Combined_documentation_). -.. _SpiNNaker: http://apt.cs.manchester.ac.uk/projects/SpiNNaker +.. _SpiNNaker: https://apt.cs.manchester.ac.uk/projects/SpiNNaker .. _SpiNNakerGraphFrontEnd: https://github.com/SpiNNakerManchester/SpiNNakerGraphFrontEnd -.. _SpiNNUtils: http://spinnutils.readthedocs.io -.. _SpiNNMachine: http://spinnmachine.readthedocs.io -.. _SpiNNMan: http://spinnman.readthedocs.io -.. _PACMAN: http://pacman.readthedocs.io -.. _DataSpecification: http://dataspecification.readthedocs.io -.. _SpiNNFrontEndCommon: http://spinnfrontendcommon.readthedocs.io -.. _Combined_documentation: http://spinnakermanchester.readthedocs.io +.. _SpiNNUtils: https://spinnutils.readthedocs.io +.. _SpiNNMachine: https://spinnmachine.readthedocs.io +.. _SpiNNMan: https://spinnman.readthedocs.io +.. _PACMAN: https://pacman.readthedocs.io +.. _SpiNNFrontEndCommon: https://spinnfrontendcommon.readthedocs.io +.. _Combined_documentation: https://spinnakermanchester.readthedocs.io SpiNNakerGraphFrontEnd ====================== diff --git a/gfe_examples/Conways/Makefile b/gfe_examples/Conways/Makefile index bb302f0c..3437bd03 100644 --- a/gfe_examples/Conways/Makefile +++ b/gfe_examples/Conways/Makefile @@ -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, diff --git a/gfe_examples/Conways/__init__.py b/gfe_examples/Conways/__init__.py index 6484caf8..e65c9b9b 100644 --- a/gfe_examples/Conways/__init__.py +++ b/gfe_examples/Conways/__init__.py @@ -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, diff --git a/gfe_examples/Conways/no_edges_examples/__init__.py b/gfe_examples/Conways/no_edges_examples/__init__.py index 6484caf8..e65c9b9b 100644 --- a/gfe_examples/Conways/no_edges_examples/__init__.py +++ b/gfe_examples/Conways/no_edges_examples/__init__.py @@ -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, diff --git a/gfe_examples/Conways/no_edges_examples/conways_basic_cell.py b/gfe_examples/Conways/no_edges_examples/conways_basic_cell.py index f847589c..f29d5ff9 100644 --- a/gfe_examples/Conways/no_edges_examples/conways_basic_cell.py +++ b/gfe_examples/Conways/no_edges_examples/conways_basic_cell.py @@ -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, @@ -17,7 +17,8 @@ class ConwayBasicCell(MachineVertex): - """ Cell which represents a cell within the 2d fabric + """ + Cell which represents a cell within the 2d fabric. """ @property diff --git a/gfe_examples/Conways/no_edges_examples/conways_no_edges.py b/gfe_examples/Conways/no_edges_examples/conways_no_edges.py index 718b8c6a..afdc7add 100644 --- a/gfe_examples/Conways/no_edges_examples/conways_no_edges.py +++ b/gfe_examples/Conways/no_edges_examples/conways_no_edges.py @@ -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, @@ -21,8 +21,7 @@ front_end.setup() for count in range(0, 60): - front_end.add_machine_vertex_instance( - ConwayBasicCell("cell{}".format(count))) + front_end.add_machine_vertex_instance(ConwayBasicCell(f"cell{count}")) front_end.run(1) front_end.stop() diff --git a/gfe_examples/Conways/one_no_graph_example/__init__.py b/gfe_examples/Conways/one_no_graph_example/__init__.py index 6484caf8..e65c9b9b 100644 --- a/gfe_examples/Conways/one_no_graph_example/__init__.py +++ b/gfe_examples/Conways/one_no_graph_example/__init__.py @@ -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, diff --git a/gfe_examples/Conways/one_no_graph_example/conways_no_graph.py b/gfe_examples/Conways/one_no_graph_example/conways_no_graph.py index b1dce7d1..724d77fa 100644 --- a/gfe_examples/Conways/one_no_graph_example/conways_no_graph.py +++ b/gfe_examples/Conways/one_no_graph_example/conways_no_graph.py @@ -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, diff --git a/gfe_examples/Conways/one_no_graph_example/spiNNakerGraphFrontEnd.cfg b/gfe_examples/Conways/one_no_graph_example/spiNNakerGraphFrontEnd.cfg index b60e6d9f..6725518b 100644 --- a/gfe_examples/Conways/one_no_graph_example/spiNNakerGraphFrontEnd.cfg +++ b/gfe_examples/Conways/one_no_graph_example/spiNNakerGraphFrontEnd.cfg @@ -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, diff --git a/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/Makefile b/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/Makefile index fc9b5155..67f7c79f 100644 --- a/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/Makefile +++ b/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/Makefile @@ -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, diff --git a/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/__init__.py b/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/__init__.py index 6484caf8..e65c9b9b 100644 --- a/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/__init__.py +++ b/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/__init__.py @@ -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, diff --git a/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_basic_cell.py b/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_basic_cell.py index 760857ff..477674b7 100644 --- a/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_basic_cell.py +++ b/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_basic_cell.py @@ -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, @@ -39,7 +39,8 @@ class DataRegions(IntEnum): class ConwayBasicCell(SimulatorVertex, MachineDataSpecableVertex): - """ Cell which represents a cell within the 2d fabric + """ + Cell which represents a cell within the 2d fabric. """ PARTITION_ID = "STATE" @@ -133,8 +134,8 @@ def get_data(self): expected_bytes = n_steps * self.RECORDING_ELEMENT_SIZE if number_of_bytes_to_read != expected_bytes: raise ConfigurationException( - "number of bytes seems wrong; have {} but expected {}".format( - number_of_bytes_to_read, expected_bytes)) + f"number of bytes seems wrong; have {number_of_bytes_to_read} " + f"but expected {expected_bytes}") # read the bytes raw_data = txrx.read_memory( diff --git a/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_partitioned.py b/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_partitioned.py index c258092a..e6771e90 100644 --- a/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_partitioned.py +++ b/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_partitioned.py @@ -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, @@ -43,7 +43,7 @@ for x in range(0, MAX_X_SIZE_OF_FABRIC): for y in range(0, MAX_Y_SIZE_OF_FABRIC): vert = ConwayBasicCell( - "cell{}".format((x * MAX_X_SIZE_OF_FABRIC) + y), + f"cell{(x * MAX_X_SIZE_OF_FABRIC) + y}", (x, y) in active_states) vertices[x, y] = vert front_end.add_machine_vertex_instance(vert) @@ -96,7 +96,7 @@ # visualise it in text form (bad but no vis this time) for time in range(0, runtime): - print("at time {}".format(time)) + print(f"at time {time}") output = "" for y in range(MAX_X_SIZE_OF_FABRIC - 1, 0, -1): for x in range(0, MAX_Y_SIZE_OF_FABRIC): diff --git a/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/src/conways_cell.c b/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/src/conways_cell.c index 19d8fc82..d9675bbb 100644 --- a/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/src/conways_cell.c +++ b/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/src/conways_cell.c @@ -5,7 +5,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, diff --git a/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/Makefile b/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/Makefile index fc9b5155..67f7c79f 100644 --- a/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/Makefile +++ b/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/Makefile @@ -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, diff --git a/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/__init__.py b/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/__init__.py index 6484caf8..e65c9b9b 100644 --- a/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/__init__.py +++ b/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/__init__.py @@ -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, diff --git a/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/conways_basic_cell.py b/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/conways_basic_cell.py index d89f37cd..4d7cfc71 100644 --- a/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/conways_basic_cell.py +++ b/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/conways_basic_cell.py @@ -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, @@ -50,7 +50,8 @@ class Channels(IntEnum): class ConwayBasicCell( SimulatorVertex, MachineDataSpecableVertex, AbstractReceiveBuffersToHost): - """ Cell which represents a cell within the 2d fabric + """ + Cell which represents a cell within the 2d fabric. """ PARTITION_ID = "STATE" @@ -136,8 +137,8 @@ def get_data(self): # do check for missing data if data_missing: placement = self.placement - print("missing_data from ({}, {}, {}); ".format( - placement.x, placement.y, placement.p)) + print("missing_data from " + f"({placement.x}, {placement.y}, {placement.p}); ") # return the data, converted to list of booleans return [ diff --git a/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/conways_partitioned.py b/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/conways_partitioned.py index 98bcb0fd..4962dc1c 100644 --- a/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/conways_partitioned.py +++ b/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/conways_partitioned.py @@ -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, @@ -43,7 +43,7 @@ for x in range(0, MAX_X_SIZE_OF_FABRIC): for y in range(0, MAX_Y_SIZE_OF_FABRIC): vert = ConwayBasicCell( - "cell{}".format((x * MAX_X_SIZE_OF_FABRIC) + y), + f"cell{(x * MAX_X_SIZE_OF_FABRIC) + y}", (x, y) in active_states) vertices[x, y] = vert front_end.add_machine_vertex_instance(vert) @@ -96,7 +96,7 @@ # visualise it in text form (bad but no vis this time) for time in range(0, runtime): - print("at time {}".format(time)) + print(f"at time {time}") output = "" for y in range(MAX_X_SIZE_OF_FABRIC - 1, 0, -1): for x in range(0, MAX_Y_SIZE_OF_FABRIC): diff --git a/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/src/conways_cell.c b/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/src/conways_cell.c index 3668cf88..64d0f993 100644 --- a/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/src/conways_cell.c +++ b/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/src/conways_cell.c @@ -5,7 +5,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, diff --git a/gfe_examples/Makefile b/gfe_examples/Makefile index c710cce0..0942c084 100644 --- a/gfe_examples/Makefile +++ b/gfe_examples/Makefile @@ -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, @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -BUILD_DIRS = hello_world hello_world_untimed Conways template sync_test +BUILD_DIRS = hello_world hello_world_untimed Conways template sync_test live_io all: $(BUILD_DIRS) for d in $(BUILD_DIRS); do (cd $$d; "$(MAKE)") || exit $$?; done diff --git a/gfe_examples/__init__.py b/gfe_examples/__init__.py index 6484caf8..e65c9b9b 100644 --- a/gfe_examples/__init__.py +++ b/gfe_examples/__init__.py @@ -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, diff --git a/gfe_examples/hello_world/Makefile b/gfe_examples/hello_world/Makefile index 62b34dd3..c0d08ef9 100644 --- a/gfe_examples/hello_world/Makefile +++ b/gfe_examples/hello_world/Makefile @@ -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, diff --git a/gfe_examples/hello_world/__init__.py b/gfe_examples/hello_world/__init__.py index a91431a9..f3859049 100644 --- a/gfe_examples/hello_world/__init__.py +++ b/gfe_examples/hello_world/__init__.py @@ -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, diff --git a/gfe_examples/hello_world/hello_world.py b/gfe_examples/hello_world/hello_world.py index 6fc34fe1..987f0b5d 100644 --- a/gfe_examples/hello_world/hello_world.py +++ b/gfe_examples/hello_world/hello_world.py @@ -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, @@ -13,7 +13,7 @@ # limitations under the License. """ -Hello World program on SpiNNaker +Hello World program on SpiNNaker. Each core stores into its region in SDRAM the string: "Hello World from $chip.x, $chip.y, $core" diff --git a/gfe_examples/hello_world/hello_world_vertex.py b/gfe_examples/hello_world/hello_world_vertex.py index 7a266806..accfb261 100644 --- a/gfe_examples/hello_world/hello_world_vertex.py +++ b/gfe_examples/hello_world/hello_world_vertex.py @@ -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, @@ -73,7 +73,8 @@ def generate_machine_data_specification( spec.end_specification() def read(self): - """ Get the data written into SDRAM + """ + Get the data written into SDRAM. :return: string output """ diff --git a/gfe_examples/hello_world/src/hello_world.c b/gfe_examples/hello_world/src/hello_world.c index 7175af99..1e66e88c 100644 --- a/gfe_examples/hello_world/src/hello_world.c +++ b/gfe_examples/hello_world/src/hello_world.c @@ -5,7 +5,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, diff --git a/gfe_examples/hello_world_untimed/Makefile b/gfe_examples/hello_world_untimed/Makefile index 62b34dd3..c0d08ef9 100644 --- a/gfe_examples/hello_world_untimed/Makefile +++ b/gfe_examples/hello_world_untimed/Makefile @@ -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, diff --git a/gfe_examples/hello_world_untimed/__init__.py b/gfe_examples/hello_world_untimed/__init__.py index 6484caf8..e65c9b9b 100644 --- a/gfe_examples/hello_world_untimed/__init__.py +++ b/gfe_examples/hello_world_untimed/__init__.py @@ -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, diff --git a/gfe_examples/hello_world_untimed/hello_world.py b/gfe_examples/hello_world_untimed/hello_world.py index b301c129..32c935db 100644 --- a/gfe_examples/hello_world_untimed/hello_world.py +++ b/gfe_examples/hello_world_untimed/hello_world.py @@ -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, @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """ -Hello World program on SpiNNaker +Hello World program on SpiNNaker. Each core stores into its region in SDRAM the string: "Hello World from $chip.x, $chip.y, $core" diff --git a/gfe_examples/hello_world_untimed/hello_world_vertex.py b/gfe_examples/hello_world_untimed/hello_world_vertex.py index 4834b95c..4453829d 100644 --- a/gfe_examples/hello_world_untimed/hello_world_vertex.py +++ b/gfe_examples/hello_world_untimed/hello_world_vertex.py @@ -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, @@ -38,7 +38,8 @@ class DataRegions(IntEnum): - """ The data regions that the C code uses + """ + The data regions that the C code uses. """ SYSTEM = 0 PARAMS = 1 @@ -46,7 +47,8 @@ class DataRegions(IntEnum): class Channels(IntEnum): - """ The recording channel IDs that the C code uses + """ + The recording channel IDs that the C code uses. """ HELLO = 0 @@ -60,7 +62,6 @@ class HelloWorldVertex( def __init__(self, label): """ - :param int n_repeats: The number of times to repeat the label in total :param str label: The label, which will be printed """ @@ -111,7 +112,8 @@ def generate_data_specification(self, spec, placement): spec.end_specification() def read(self): - """ Get the data written into SDRAM + """ + Get the data written into SDRAM. :return: string output """ diff --git a/gfe_examples/hello_world_untimed/src/hello_world.c b/gfe_examples/hello_world_untimed/src/hello_world.c index b43c663d..22f45d8b 100644 --- a/gfe_examples/hello_world_untimed/src/hello_world.c +++ b/gfe_examples/hello_world_untimed/src/hello_world.c @@ -5,7 +5,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, diff --git a/gfe_examples/live_io/Makefile b/gfe_examples/live_io/Makefile new file mode 100644 index 00000000..e74a299a --- /dev/null +++ b/gfe_examples/live_io/Makefile @@ -0,0 +1,25 @@ +# 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 +# +# 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. + +# If SPINN_DIRS is not defined, this is an error! +ifndef SPINN_DIRS + $(error SPINN_DIRS is not set. Please define SPINN_DIRS (possibly by running "source setup" in the spinnaker package folder)) +endif + +APP = live_io +SOURCES = live_io.c + +APP_OUTPUT_DIR := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))/ + +include $(SPINN_DIRS)/make/local.mk diff --git a/gfe_examples/live_io/__init__.py b/gfe_examples/live_io/__init__.py new file mode 100644 index 00000000..91eaa0c5 --- /dev/null +++ b/gfe_examples/live_io/__init__.py @@ -0,0 +1,13 @@ +# 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 +# +# 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. diff --git a/gfe_examples/live_io/live_io.py b/gfe_examples/live_io/live_io.py new file mode 100644 index 00000000..508b3749 --- /dev/null +++ b/gfe_examples/live_io/live_io.py @@ -0,0 +1,100 @@ +# 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 +# +# 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. + +import os +from time import sleep +from random import randint +from pacman.model.graphs.machine.machine_edge import MachineEdge +from spinn_front_end_common.data.fec_data_view import FecDataView +from spinn_front_end_common.utilities.connections import LiveEventConnection +from spinn_front_end_common.utility_models import ( + LivePacketGatherMachineVertex, ReverseIPTagMulticastSourceMachineVertex) +from spinn_front_end_common.utilities.utility_objs import ( + LivePacketGatherParameters) +import spinnaker_graph_front_end as front_end +from gfe_examples.live_io.live_io_vertex import LiveIOVertex + +n_receivers = 20 +receiver_label = "Receiver" +sender_label = "Sender" +sender_partition = "Send" +n_sender_keys = 32 +sends_per_cycle = 10 +lpg_label = "LPGReceiver" +running = True + + +def start_sending(label, c): + # pylint: disable=unused-argument + sleep(0.5) + while running: + for _ in range(sends_per_cycle): + key = randint(0, n_sender_keys - 1) + print(f"Sending {key}") + c.send_event(sender_label, key) + sleep(0.1) + + +def end_sim(label, c): + # pylint: disable=unused-argument + global running + running = False + + +def receive(label, time, keys): + print(f"Received from {label} at time {time}: {keys}") + + +# Make a connection to send and receive data +conn = LiveEventConnection( + live_packet_gather_label=lpg_label, + receive_labels=[receiver_label + f" {x}" for x in range(n_receivers)], + send_labels=[sender_label], local_port=None) +conn.add_start_resume_callback(sender_label, start_sending) +conn.add_pause_stop_callback(sender_label, end_sim) +for x in range(n_receivers): + conn.add_receive_callback(receiver_label + f" {x}", receive) + +front_end.setup( + n_chips_required=1, model_binary_folder=os.path.dirname(__file__)) +front_end.add_socket_address(None, None, conn.local_port) + +# Add a sender +sender = ReverseIPTagMulticastSourceMachineVertex( + n_keys=n_sender_keys, label="Sender", + injection_partition_id=sender_partition) +front_end.add_machine_vertex_instance(sender) + +live_out = LivePacketGatherMachineVertex( + LivePacketGatherParameters(tag=1, port=10000, hostname="localhost"), + label=lpg_label) +front_end.add_machine_vertex_instance(live_out) + + +# Put LiveIOVertex on some cores +for x in range(n_receivers): + vertex = LiveIOVertex( + n_keys=n_sender_keys, send_partition=sender_partition, + label=receiver_label + f" {x}") + front_end.add_machine_vertex_instance(vertex) + front_end.add_machine_edge_instance( + MachineEdge(sender, vertex), sender_partition) + front_end.add_machine_edge_instance( + MachineEdge(vertex, live_out), sender_partition) + live_out.add_incoming_source(vertex, sender_partition) + FecDataView.add_live_output_vertex(vertex, sender_partition) + +front_end.run(10000) + +front_end.stop() diff --git a/gfe_examples/live_io/live_io_vertex.py b/gfe_examples/live_io/live_io_vertex.py new file mode 100644 index 00000000..e8033e00 --- /dev/null +++ b/gfe_examples/live_io/live_io_vertex.py @@ -0,0 +1,78 @@ +# 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 +# +# 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. + +from enum import IntEnum +import logging +from spinn_utilities.log import FormatAdapter +from spinn_utilities.overrides import overrides +from pacman.model.graphs.common import Slice +from pacman.model.graphs.machine import MachineVertex +from pacman.model.resources import ConstantSDRAM +from spinn_front_end_common.utilities.constants import ( + SYSTEM_BYTES_REQUIREMENT, BYTES_PER_WORD) +from spinn_front_end_common.abstract_models.impl import ( + MachineDataSpecableVertex) +from spinn_front_end_common.data.fec_data_view import FecDataView +from spinnaker_graph_front_end.utilities import SimulatorVertex + +logger = FormatAdapter(logging.getLogger(__name__)) +N_KEY_DATA_BYTES = 3 * BYTES_PER_WORD + + +class DataRegions(IntEnum): + SYSTEM = 0 + KEY_DATA = 1 + + +class LiveIOVertex( + SimulatorVertex, MachineDataSpecableVertex): + + def __init__(self, n_keys, send_partition="LiveOut", label=None): + super().__init__(label, "live_io.aplx") + self.__n_keys = n_keys + self.__send_partition = send_partition + self._vertex_slice = Slice(0, n_keys - 1) + + @property + @overrides(MachineVertex.sdram_required) + def sdram_required(self): + return ConstantSDRAM( + SYSTEM_BYTES_REQUIREMENT + N_KEY_DATA_BYTES) + + def get_n_keys_for_partition(self, partition_id): + return self.__n_keys + + @overrides(MachineDataSpecableVertex.generate_machine_data_specification) + def generate_machine_data_specification( + self, spec, placement, iptags, reverse_iptags): + # Generate the system data region for simulation .c requirements + self.generate_system_region(spec) + + spec.reserve_memory_region(DataRegions.KEY_DATA, N_KEY_DATA_BYTES) + spec.switch_write_focus(DataRegions.KEY_DATA) + + routing_infos = FecDataView().get_routing_infos() + r_info = routing_infos.get_routing_info_from_pre_vertex( + placement.vertex, self.__send_partition) + if r_info is None: + spec.write_value(0) + spec.write_value(0) + spec.write_value(0) + else: + spec.write_value(1) + spec.write_value(r_info.key) + spec.write_value((~r_info.mask) & 0xFFFFFFFF) + + # End-of-Spec: + spec.end_specification() diff --git a/gfe_examples/live_io/src/live_io.c b/gfe_examples/live_io/src/live_io.c new file mode 100644 index 00000000..6614bec4 --- /dev/null +++ b/gfe_examples/live_io/src/live_io.c @@ -0,0 +1,164 @@ +/* + * 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 + * + * 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. + */ + +//! imports +#include +#include "common-typedefs.h" +#include +#include +#include +#include + +//! control value, which says how many timer ticks to run for before exiting +static uint32_t simulation_ticks = 0; +static uint32_t infinite_run = 0; +static uint32_t time = 0; + +//! int as a bool to represent if this simulation should run forever +static uint32_t infinite_run; + +//! The key to send data with +static uint32_t send_key; + +//! Whether the data should be sent +static uint32_t do_send; + +//! The mask to apply to the key to extract any data before sending +static uint32_t key_mask; + +//! human readable definitions of each region in SDRAM +typedef enum regions_e { + SYSTEM_REGION, + KEY_DATA_REGION, +} regions_e; + +//! values for the priority for each callback +typedef enum callback_priorities { + MC_PACKET = -1, + SDP = 0, + DMA = 1, + TIMER = 2, + USER = 3 +} callback_priorities; + +// ------------------------------------------------------------------- + +static void receive_data_pl(uint key, uint payload) { + log_info("Key=%u Payload=%u", key, payload); + if (do_send) { + uint key_to_send = send_key | (key & key_mask); + spin1_send_mc_packet(key_to_send, payload, 1); + } +} + +static void receive_data(uint key, UNUSED uint unused) { + log_info("Key=%u", key); + if (do_send) { + uint key_to_send = send_key | (key & key_mask); + spin1_send_mc_packet(key_to_send, 0, 0); + } +} + +static void update(uint ticks, uint b) { + use(b); + use(ticks); + + time++; + + // check that the run time hasn't already elapsed and thus needs to be + // killed + if ((infinite_run != TRUE) && (time >= simulation_ticks)) { + + // fall into the pause resume mode of operating + simulation_handle_pause_resume(NULL); + + // switch to state where host is ready to read + simulation_ready_to_read(); + + return; + } +} + +static bool initialize(uint32_t *timer_period) { + log_info("Initialise: started\n"); + + // Get the address this core's DTCM data starts at from SRAM + data_specification_metadata_t *data = data_specification_get_data_address(); + + // Read the header + if (!data_specification_read_header(data)) { + log_error("failed to read the data spec header"); + return false; + } + + // Get the timing details and set up the simulation interface + if (!simulation_initialise( + data_specification_get_region(SYSTEM_REGION, data), + APPLICATION_NAME_HASH, timer_period, &simulation_ticks, + &infinite_run, &time, SDP, DMA)) { + return false; + } + + // Get key data + uint *key_data = data_specification_get_region(KEY_DATA_REGION, data); + do_send = key_data[0]; + send_key = key_data[1]; + key_mask = key_data[2]; + + if (do_send) { + log_info("Re-sending received keys with key 0x%08x and mask 0x%08x", + send_key, key_mask); + } else { + log_info("Not re-sending received keys"); + } + + return true; +} + +/****f* + * + * SUMMARY + * This function is called at application start-up. + * It is used to register event callbacks and begin the simulation. + * + * SYNOPSIS + * int c_main() + * + * SOURCE + */ +void c_main(void) { + + // Load DTCM data + uint32_t timer_period; + + // initialise the model + if (!initialize(&timer_period)) { + rt_error(RTE_SWERR); + } + + // set timer tick value to configured value + spin1_set_timer_tick(timer_period); + + // register callbacks + spin1_callback_on(MCPL_PACKET_RECEIVED, receive_data_pl, MC_PACKET); + spin1_callback_on(MC_PACKET_RECEIVED, receive_data, MC_PACKET); + spin1_callback_on(TIMER_TICK, update, TIMER); + + // Start the time at "-1" so that the first tick will be 0 + time = UINT32_MAX; + + simulation_run(); +} diff --git a/gfe_examples/sync_test/Makefile b/gfe_examples/sync_test/Makefile index 0edbddd8..af0567bd 100644 --- a/gfe_examples/sync_test/Makefile +++ b/gfe_examples/sync_test/Makefile @@ -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, diff --git a/gfe_examples/sync_test/__init__.py b/gfe_examples/sync_test/__init__.py index e2d953ab..efc02205 100644 --- a/gfe_examples/sync_test/__init__.py +++ b/gfe_examples/sync_test/__init__.py @@ -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, diff --git a/gfe_examples/sync_test/src/sync_test.c b/gfe_examples/sync_test/src/sync_test.c index 5b87efa1..8afa2ce7 100644 --- a/gfe_examples/sync_test/src/sync_test.c +++ b/gfe_examples/sync_test/src/sync_test.c @@ -5,7 +5,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, diff --git a/gfe_examples/sync_test/sync_test.py b/gfe_examples/sync_test/sync_test.py index 93304ea7..3f81ca83 100644 --- a/gfe_examples/sync_test/sync_test.py +++ b/gfe_examples/sync_test/sync_test.py @@ -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, diff --git a/gfe_examples/sync_test/sync_test_vertex.py b/gfe_examples/sync_test/sync_test_vertex.py index 189df073..3dfabaaa 100644 --- a/gfe_examples/sync_test/sync_test_vertex.py +++ b/gfe_examples/sync_test/sync_test_vertex.py @@ -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, @@ -16,6 +16,7 @@ import logging from spinn_utilities.log import FormatAdapter from spinn_utilities.overrides import overrides +from spinnman.model.enums import ExecutableType from pacman.model.graphs.machine import MachineVertex from pacman.model.resources import ConstantSDRAM from spinn_front_end_common.data import FecDataView @@ -23,7 +24,6 @@ SYSTEM_BYTES_REQUIREMENT, BYTES_PER_WORD) from spinn_front_end_common.abstract_models import ( AbstractGeneratesDataSpecification, AbstractHasAssociatedBinary) -from spinn_front_end_common.utilities.utility_objs import ExecutableType from spinnaker_graph_front_end.utilities.data_utils import ( generate_system_data_region) from pacman.model.graphs.application.abstract import ( @@ -41,7 +41,6 @@ class DataRegions(IntEnum): class SyncTestVertex(AbstractOneAppOneMachineVertex): - def __init__(self, lead, label=None): AbstractOneAppOneMachineVertex.__init__( self, SyncTestMachineVertex(lead, self, label), @@ -50,7 +49,6 @@ def __init__(self, lead, label=None): class SyncTestMachineVertex(MachineVertex, AbstractHasAssociatedBinary, AbstractGeneratesDataSpecification): - def __init__(self, lead, app_vertex, label=None): super().__init__(label, app_vertex) self._lead = lead diff --git a/gfe_examples/template/Makefile b/gfe_examples/template/Makefile index 92faf7b0..bb2c0a78 100644 --- a/gfe_examples/template/Makefile +++ b/gfe_examples/template/Makefile @@ -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, diff --git a/gfe_examples/template/__init__.py b/gfe_examples/template/__init__.py index 6484caf8..e65c9b9b 100644 --- a/gfe_examples/template/__init__.py +++ b/gfe_examples/template/__init__.py @@ -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, diff --git a/gfe_examples/template/python_template.py b/gfe_examples/template/python_template.py index 5b387bbd..2eda5489 100644 --- a/gfe_examples/template/python_template.py +++ b/gfe_examples/template/python_template.py @@ -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, @@ -37,13 +37,12 @@ # calculate total number of 'free' cores for the given board # (i.e. does not include those busy with SARK or reinjection) -total_number_of_cores = \ - front_end.get_number_of_available_cores_on_machine() +total_number_of_cores = front_end.get_number_of_available_cores_on_machine() # fill all cores with a Vertex each for x in range(0, total_number_of_cores): front_end.add_machine_vertex_instance( - TemplateVertex(label="Template program at x {}".format(x))) + TemplateVertex(label=f"Template program at x {x}")) # run for a specified length of time front_end.run(10) diff --git a/gfe_examples/template/src/c_template_vertex.c b/gfe_examples/template/src/c_template_vertex.c index 0dec6d0a..0f9c019b 100644 --- a/gfe_examples/template/src/c_template_vertex.c +++ b/gfe_examples/template/src/c_template_vertex.c @@ -5,7 +5,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, diff --git a/gfe_examples/template/template_vertex.py b/gfe_examples/template/template_vertex.py index ec4dde76..61d82695 100644 --- a/gfe_examples/template/template_vertex.py +++ b/gfe_examples/template/template_vertex.py @@ -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, @@ -113,7 +113,8 @@ def _write_app_memory_regions(self, spec, iptags): spec.write_value(0 if key is None else key) def read(self): - """ Get the recorded data + """ + Get the recorded data. :return: The data read, as bytes """ diff --git a/gfe_integration_tests/Makefile b/gfe_integration_tests/Makefile index 494bf8d8..c71bfa82 100644 --- a/gfe_integration_tests/Makefile +++ b/gfe_integration_tests/Makefile @@ -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, diff --git a/gfe_integration_tests/__init__.py b/gfe_integration_tests/__init__.py index b60e6d9f..6725518b 100644 --- a/gfe_integration_tests/__init__.py +++ b/gfe_integration_tests/__init__.py @@ -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, diff --git a/gfe_integration_tests/script_builder.py b/gfe_integration_tests/script_builder.py index 9274b168..cb6c4b6a 100644 --- a/gfe_integration_tests/script_builder.py +++ b/gfe_integration_tests/script_builder.py @@ -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, diff --git a/gfe_integration_tests/sdram_edge_tests/Makefile b/gfe_integration_tests/sdram_edge_tests/Makefile index b1d91428..1128cad2 100644 --- a/gfe_integration_tests/sdram_edge_tests/Makefile +++ b/gfe_integration_tests/sdram_edge_tests/Makefile @@ -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, diff --git a/gfe_integration_tests/sdram_edge_tests/__init__.py b/gfe_integration_tests/sdram_edge_tests/__init__.py index 76780b6f..42bb998f 100644 --- a/gfe_integration_tests/sdram_edge_tests/__init__.py +++ b/gfe_integration_tests/sdram_edge_tests/__init__.py @@ -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, diff --git a/gfe_integration_tests/sdram_edge_tests/common/Makefile b/gfe_integration_tests/sdram_edge_tests/common/Makefile index cb2642b3..c7b0d160 100644 --- a/gfe_integration_tests/sdram_edge_tests/common/Makefile +++ b/gfe_integration_tests/sdram_edge_tests/common/Makefile @@ -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, diff --git a/gfe_integration_tests/sdram_edge_tests/common/__init__.py b/gfe_integration_tests/sdram_edge_tests/common/__init__.py index 7843e6d3..408b9410 100644 --- a/gfe_integration_tests/sdram_edge_tests/common/__init__.py +++ b/gfe_integration_tests/sdram_edge_tests/common/__init__.py @@ -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, diff --git a/gfe_integration_tests/sdram_edge_tests/common/sdram_machine_vertex.py b/gfe_integration_tests/sdram_edge_tests/common/sdram_machine_vertex.py index 6190521c..9ebdeb63 100644 --- a/gfe_integration_tests/sdram_edge_tests/common/sdram_machine_vertex.py +++ b/gfe_integration_tests/sdram_edge_tests/common/sdram_machine_vertex.py @@ -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, @@ -13,6 +13,7 @@ # limitations under the License. from enum import IntEnum +from spinnman.model.enums import ExecutableType from pacman.model.graphs import AbstractSupportsSDRAMEdges from pacman.model.graphs.machine import MachineVertex from pacman.model.resources import ConstantSDRAM @@ -22,7 +23,6 @@ from spinn_front_end_common.interface.simulation import simulation_utilities from spinn_front_end_common.utilities.constants import ( SIMULATION_N_BYTES, BYTES_PER_WORD, SARK_PER_MALLOC_SDRAM_USAGE) -from spinn_front_end_common.utilities.utility_objs import ExecutableType from spinn_utilities.overrides import overrides @@ -35,7 +35,8 @@ class DataRegions(IntEnum): class SDRAMMachineVertex( MachineVertex, AbstractSupportsSDRAMEdges, AbstractHasAssociatedBinary, MachineDataSpecableVertex): - """ A MachineVertex that stores its own resources. + """ + A MachineVertex that stores its own resources. """ SDRAM_PARTITION_BASE_DSG_SIZE = 2 * BYTES_PER_WORD diff --git a/gfe_integration_tests/sdram_edge_tests/common/sdram_test_vertex.py b/gfe_integration_tests/sdram_edge_tests/common/sdram_test_vertex.py index 0493720c..2daaeaed 100644 --- a/gfe_integration_tests/sdram_edge_tests/common/sdram_test_vertex.py +++ b/gfe_integration_tests/sdram_edge_tests/common/sdram_test_vertex.py @@ -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, diff --git a/gfe_integration_tests/sdram_edge_tests/common/src/sdram.c b/gfe_integration_tests/sdram_edge_tests/common/src/sdram.c index e9063cc7..fb90fbaa 100644 --- a/gfe_integration_tests/sdram_edge_tests/common/src/sdram.c +++ b/gfe_integration_tests/sdram_edge_tests/common/src/sdram.c @@ -5,7 +5,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, diff --git a/gfe_integration_tests/sdram_edge_tests/test_constant_internal/__init__.py b/gfe_integration_tests/sdram_edge_tests/test_constant_internal/__init__.py index cb58a483..d173113b 100644 --- a/gfe_integration_tests/sdram_edge_tests/test_constant_internal/__init__.py +++ b/gfe_integration_tests/sdram_edge_tests/test_constant_internal/__init__.py @@ -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, diff --git a/gfe_integration_tests/sdram_edge_tests/test_constant_internal/sdram_splitter_internal.py b/gfe_integration_tests/sdram_edge_tests/test_constant_internal/sdram_splitter_internal.py index db14e19e..a9482b88 100644 --- a/gfe_integration_tests/sdram_edge_tests/test_constant_internal/sdram_splitter_internal.py +++ b/gfe_integration_tests/sdram_edge_tests/test_constant_internal/sdram_splitter_internal.py @@ -4,20 +4,18 @@ # 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. +from spinn_utilities.overrides import overrides from pacman.model.graphs.common import Slice from pacman.model.graphs.machine import SDRAMMachineEdge -from pacman.model.partitioner_splitters.abstract_splitters import ( - AbstractSplitterCommon) +from pacman.model.partitioner_splitters import AbstractSplitterCommon from pacman.model.graphs.machine import ConstantSDRAMMachinePartition -from spinn_utilities.overrides import overrides -from spinn_front_end_common.data import FecDataView from gfe_integration_tests.sdram_edge_tests.common.\ sdram_machine_vertex import SDRAMMachineVertex @@ -54,22 +52,20 @@ def get_in_coming_vertices(self, partition_id): def create_machine_vertices(self, chip_counter): # slices - self._pre_slice = Slice(0, int(self._governed_app_vertex.n_atoms / 2)) + self._pre_slice = Slice(0, int(self.governed_app_vertex.n_atoms / 2)) self._post_slice = Slice( - int(self._governed_app_vertex.n_atoms / 2) + 1, - int(self._governed_app_vertex.n_atoms - 1)) + int(self.governed_app_vertex.n_atoms / 2) + 1, + int(self.governed_app_vertex.n_atoms - 1)) # mac verts - self._pre_vertex = ( - SDRAMMachineVertex( - vertex_slice=self._pre_slice, label=None, - app_vertex=self._governed_app_vertex, sdram_cost=20)) - self._governed_app_vertex.remember_machine_vertex(self._pre_vertex) - self._post_vertex = ( - SDRAMMachineVertex( - vertex_slice=self._post_slice, label=None, - app_vertex=self._governed_app_vertex)) - self._governed_app_vertex.remember_machine_vertex(self._post_vertex) + self._pre_vertex = SDRAMMachineVertex( + vertex_slice=self._pre_slice, label=None, + app_vertex=self.governed_app_vertex, sdram_cost=20) + self.governed_app_vertex.remember_machine_vertex(self._pre_vertex) + self._post_vertex = SDRAMMachineVertex( + vertex_slice=self._post_slice, label=None, + app_vertex=self.governed_app_vertex) + self.governed_app_vertex.remember_machine_vertex(self._post_vertex) self._sdram_part = ConstantSDRAMMachinePartition( identifier="sdram", pre_vertex=self._pre_vertex) diff --git a/gfe_integration_tests/sdram_edge_tests/test_constant_internal/test_sdram_internal_edges.py b/gfe_integration_tests/sdram_edge_tests/test_constant_internal/test_sdram_internal_edges.py index 3ed38fcb..f2083c99 100644 --- a/gfe_integration_tests/sdram_edge_tests/test_constant_internal/test_sdram_internal_edges.py +++ b/gfe_integration_tests/sdram_edge_tests/test_constant_internal/test_sdram_internal_edges.py @@ -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, diff --git a/gfe_integration_tests/sdram_edge_tests/test_multi_dest_internal/__init__.py b/gfe_integration_tests/sdram_edge_tests/test_multi_dest_internal/__init__.py index 0ca5d00c..145f41be 100644 --- a/gfe_integration_tests/sdram_edge_tests/test_multi_dest_internal/__init__.py +++ b/gfe_integration_tests/sdram_edge_tests/test_multi_dest_internal/__init__.py @@ -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, diff --git a/gfe_integration_tests/sdram_edge_tests/test_multi_dest_internal/sdram_splitter.py b/gfe_integration_tests/sdram_edge_tests/test_multi_dest_internal/sdram_splitter.py index a138549c..a1f7c1c6 100644 --- a/gfe_integration_tests/sdram_edge_tests/test_multi_dest_internal/sdram_splitter.py +++ b/gfe_integration_tests/sdram_edge_tests/test_multi_dest_internal/sdram_splitter.py @@ -4,23 +4,19 @@ # 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. -from gfe_integration_tests.sdram_edge_tests.common import ( - SDRAMMachineVertex) -from pacman.model.graphs.application import ApplicationEdge +from spinn_utilities.overrides import overrides from pacman.model.graphs.common import Slice from pacman.model.graphs.machine import ( SDRAMMachineEdge, DestinationSegmentedSDRAMMachinePartition) -from pacman.model.partitioner_splitters.abstract_splitters import ( - AbstractSplitterCommon) -from spinn_utilities.overrides import overrides -from spinn_front_end_common.data import FecDataView +from pacman.model.partitioner_splitters import AbstractSplitterCommon +from gfe_integration_tests.sdram_edge_tests.common import SDRAMMachineVertex class SDRAMSplitter(AbstractSplitterCommon): @@ -54,7 +50,7 @@ def get_in_coming_vertices(self, partition_id): def create_machine_vertices(self, chip_counter): # slices self._pre_slice = Slice( - 0, int(self._governed_app_vertex.n_atoms / self.N_VERTS)) + 0, int(self.governed_app_vertex.n_atoms / self.N_VERTS)) for count in range(1, self.N_VERTS): self._post_slices.append(Slice( @@ -62,19 +58,17 @@ def create_machine_vertices(self, chip_counter): self._pre_slice.n_atoms * count + self._pre_slice.n_atoms)) # mac verts - self._pre_vertex = ( - SDRAMMachineVertex( - vertex_slice=self._pre_slice, label=None, - app_vertex=self._governed_app_vertex, sdram_cost=20)) - self._governed_app_vertex.remember_machine_vertex(self._pre_vertex) + self._pre_vertex = SDRAMMachineVertex( + vertex_slice=self._pre_slice, label=None, + app_vertex=self.governed_app_vertex, sdram_cost=20) + self.governed_app_vertex.remember_machine_vertex(self._pre_vertex) for vertex_slice in self._post_slices: - post_vertex = ( - SDRAMMachineVertex( - vertex_slice=vertex_slice, label=None, - app_vertex=self._governed_app_vertex)) + post_vertex = SDRAMMachineVertex( + vertex_slice=vertex_slice, label=None, + app_vertex=self.governed_app_vertex) self._post_vertices.append(post_vertex) - self._governed_app_vertex.remember_machine_vertex(post_vertex) + self.governed_app_vertex.remember_machine_vertex(post_vertex) self._partition = DestinationSegmentedSDRAMMachinePartition( identifier="sdram", pre_vertex=self._pre_vertex) diff --git a/gfe_integration_tests/sdram_edge_tests/test_multi_dest_internal/test_sdram_internal_edges.py b/gfe_integration_tests/sdram_edge_tests/test_multi_dest_internal/test_sdram_internal_edges.py index 254a18fd..e898864b 100644 --- a/gfe_integration_tests/sdram_edge_tests/test_multi_dest_internal/test_sdram_internal_edges.py +++ b/gfe_integration_tests/sdram_edge_tests/test_multi_dest_internal/test_sdram_internal_edges.py @@ -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, diff --git a/gfe_integration_tests/sdram_edge_tests/test_multi_src_internal/__init__.py b/gfe_integration_tests/sdram_edge_tests/test_multi_src_internal/__init__.py index 14314fc1..aa2e3e33 100644 --- a/gfe_integration_tests/sdram_edge_tests/test_multi_src_internal/__init__.py +++ b/gfe_integration_tests/sdram_edge_tests/test_multi_src_internal/__init__.py @@ -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, diff --git a/gfe_integration_tests/sdram_edge_tests/test_multi_src_internal/sdram_splitter.py b/gfe_integration_tests/sdram_edge_tests/test_multi_src_internal/sdram_splitter.py index 47925a10..8bbffb2b 100644 --- a/gfe_integration_tests/sdram_edge_tests/test_multi_src_internal/sdram_splitter.py +++ b/gfe_integration_tests/sdram_edge_tests/test_multi_src_internal/sdram_splitter.py @@ -4,20 +4,19 @@ # 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. -from gfe_integration_tests.sdram_edge_tests.common import SDRAMMachineVertex +from spinn_utilities.overrides import overrides from pacman.model.graphs.common import Slice from pacman.model.graphs.machine import SDRAMMachineEdge -from pacman.model.partitioner_splitters.abstract_splitters import ( - AbstractSplitterCommon) -from spinn_utilities.overrides import overrides +from pacman.model.partitioner_splitters import AbstractSplitterCommon from pacman.model.graphs.machine import SourceSegmentedSDRAMMachinePartition +from gfe_integration_tests.sdram_edge_tests.common import SDRAMMachineVertex class SDRAMSplitter(AbstractSplitterCommon): @@ -51,7 +50,7 @@ def get_in_coming_vertices(self, partition_id): def create_machine_vertices(self, chip_counter): # slices self._post_slice = Slice( - 0, int(self._governed_app_vertex.n_atoms / self.N_VERTS)) + 0, int(self.governed_app_vertex.n_atoms / self.N_VERTS)) for count in range(1, self.N_VERTS): self._pre_slices.append(Slice( @@ -59,18 +58,16 @@ def create_machine_vertices(self, chip_counter): self._post_slice.n_atoms * count + self._post_slice.n_atoms)) # mac verts - self._post_vertex = ( - SDRAMMachineVertex( - vertex_slice=self._post_slice, label=None, - app_vertex=self._governed_app_vertex)) - self._governed_app_vertex.remember_machine_vertex(self._post_vertex) + self._post_vertex = SDRAMMachineVertex( + vertex_slice=self._post_slice, label=None, + app_vertex=self.governed_app_vertex) + self.governed_app_vertex.remember_machine_vertex(self._post_vertex) for vertex_slice in self._pre_slices: - pre_vertex = ( - SDRAMMachineVertex( - vertex_slice=vertex_slice, label=None, - app_vertex=self._governed_app_vertex, sdram_cost=20)) - self._governed_app_vertex.remember_machine_vertex(pre_vertex) + pre_vertex = SDRAMMachineVertex( + vertex_slice=vertex_slice, label=None, + app_vertex=self.governed_app_vertex, sdram_cost=20) + self.governed_app_vertex.remember_machine_vertex(pre_vertex) self._pre_vertices.append(pre_vertex) self._partition = SourceSegmentedSDRAMMachinePartition( diff --git a/gfe_integration_tests/sdram_edge_tests/test_multi_src_internal/test_sdram_internal_edges.py b/gfe_integration_tests/sdram_edge_tests/test_multi_src_internal/test_sdram_internal_edges.py index 6976ad1c..9c4289af 100644 --- a/gfe_integration_tests/sdram_edge_tests/test_multi_src_internal/test_sdram_internal_edges.py +++ b/gfe_integration_tests/sdram_edge_tests/test_multi_src_internal/test_sdram_internal_edges.py @@ -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, diff --git a/gfe_integration_tests/test_extra_monitor/Makefile b/gfe_integration_tests/test_extra_monitor/Makefile index 58b49753..b19365b7 100644 --- a/gfe_integration_tests/test_extra_monitor/Makefile +++ b/gfe_integration_tests/test_extra_monitor/Makefile @@ -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, diff --git a/gfe_integration_tests/test_extra_monitor/__init__.py b/gfe_integration_tests/test_extra_monitor/__init__.py index b60e6d9f..6725518b 100644 --- a/gfe_integration_tests/test_extra_monitor/__init__.py +++ b/gfe_integration_tests/test_extra_monitor/__init__.py @@ -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, diff --git a/gfe_integration_tests/test_extra_monitor/sdram_writer.py b/gfe_integration_tests/test_extra_monitor/sdram_writer.py index 25bb0333..9a01fbb9 100644 --- a/gfe_integration_tests/test_extra_monitor/sdram_writer.py +++ b/gfe_integration_tests/test_extra_monitor/sdram_writer.py @@ -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, @@ -14,13 +14,13 @@ from enum import IntEnum from spinn_utilities.overrides import overrides +from spinnman.model.enums import ExecutableType from pacman.model.graphs.machine import MachineVertex from pacman.model.resources import ConstantSDRAM from spinn_front_end_common.abstract_models import ( AbstractHasAssociatedBinary) from spinn_front_end_common.abstract_models.impl import ( MachineDataSpecableVertex) -from spinn_front_end_common.utilities.utility_objs import ExecutableType from spinn_front_end_common.interface.simulation import simulation_utilities from spinn_front_end_common.utilities.constants import ( SIMULATION_N_BYTES, SYSTEM_BYTES_REQUIREMENT, BYTES_PER_KB) diff --git a/gfe_integration_tests/test_extra_monitor/spiNNakerGraphFrontEnd.cfg b/gfe_integration_tests/test_extra_monitor/spiNNakerGraphFrontEnd.cfg index 53ef1280..1edded64 100644 --- a/gfe_integration_tests/test_extra_monitor/spiNNakerGraphFrontEnd.cfg +++ b/gfe_integration_tests/test_extra_monitor/spiNNakerGraphFrontEnd.cfg @@ -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, diff --git a/gfe_integration_tests/test_extra_monitor/src/sdram_writer.c b/gfe_integration_tests/test_extra_monitor/src/sdram_writer.c index 2c8a9806..c99704d6 100644 --- a/gfe_integration_tests/test_extra_monitor/src/sdram_writer.c +++ b/gfe_integration_tests/test_extra_monitor/src/sdram_writer.c @@ -5,7 +5,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, diff --git a/gfe_integration_tests/test_extra_monitor/test_extra_monitor.py b/gfe_integration_tests/test_extra_monitor/test_extra_monitor.py index ef17d869..2d115185 100644 --- a/gfe_integration_tests/test_extra_monitor/test_extra_monitor.py +++ b/gfe_integration_tests/test_extra_monitor/test_extra_monitor.py @@ -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, diff --git a/gfe_integration_tests/test_hello_world.py b/gfe_integration_tests/test_hello_world.py index da1ab0d5..4a2ba7b4 100644 --- a/gfe_integration_tests/test_hello_world.py +++ b/gfe_integration_tests/test_hello_world.py @@ -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, diff --git a/gfe_integration_tests/test_hello_world_untimed.py b/gfe_integration_tests/test_hello_world_untimed.py index 109e688d..22f2be10 100644 --- a/gfe_integration_tests/test_hello_world_untimed.py +++ b/gfe_integration_tests/test_hello_world_untimed.py @@ -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, diff --git a/gfe_integration_tests/test_profile/Makefile b/gfe_integration_tests/test_profile/Makefile index 4d904394..ecdeff1e 100755 --- a/gfe_integration_tests/test_profile/Makefile +++ b/gfe_integration_tests/test_profile/Makefile @@ -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, diff --git a/gfe_integration_tests/test_profile/profiled_vertex.py b/gfe_integration_tests/test_profile/profiled_vertex.py index 2fdeabac..a71e4f64 100644 --- a/gfe_integration_tests/test_profile/profiled_vertex.py +++ b/gfe_integration_tests/test_profile/profiled_vertex.py @@ -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, diff --git a/gfe_integration_tests/test_profile/src/test_profile.c b/gfe_integration_tests/test_profile/src/test_profile.c index 4dd821ad..86b2405e 100644 --- a/gfe_integration_tests/test_profile/src/test_profile.c +++ b/gfe_integration_tests/test_profile/src/test_profile.c @@ -5,7 +5,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, diff --git a/gfe_integration_tests/test_profile/test_profile.mk b/gfe_integration_tests/test_profile/test_profile.mk index fd58ad35..6d79cb83 100755 --- a/gfe_integration_tests/test_profile/test_profile.mk +++ b/gfe_integration_tests/test_profile/test_profile.mk @@ -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, diff --git a/gfe_integration_tests/test_profile/test_profile.py b/gfe_integration_tests/test_profile/test_profile.py index d4c3d1b1..eac81752 100644 --- a/gfe_integration_tests/test_profile/test_profile.py +++ b/gfe_integration_tests/test_profile/test_profile.py @@ -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, diff --git a/gfe_integration_tests/test_rte/Makefile b/gfe_integration_tests/test_rte/Makefile index 37c2f00f..ca56e811 100644 --- a/gfe_integration_tests/test_rte/Makefile +++ b/gfe_integration_tests/test_rte/Makefile @@ -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, diff --git a/gfe_integration_tests/test_rte/__init__.py b/gfe_integration_tests/test_rte/__init__.py index b60e6d9f..6725518b 100644 --- a/gfe_integration_tests/test_rte/__init__.py +++ b/gfe_integration_tests/test_rte/__init__.py @@ -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, diff --git a/gfe_integration_tests/test_rte/run_vertex.py b/gfe_integration_tests/test_rte/run_vertex.py index 215a28b6..015aac9f 100644 --- a/gfe_integration_tests/test_rte/run_vertex.py +++ b/gfe_integration_tests/test_rte/run_vertex.py @@ -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, diff --git a/gfe_integration_tests/test_rte/src/test_rte_during_run.c b/gfe_integration_tests/test_rte/src/test_rte_during_run.c index 8218bcc5..7a873e76 100644 --- a/gfe_integration_tests/test_rte/src/test_rte_during_run.c +++ b/gfe_integration_tests/test_rte/src/test_rte_during_run.c @@ -5,7 +5,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, diff --git a/gfe_integration_tests/test_rte/src/test_rte_start.c b/gfe_integration_tests/test_rte/src/test_rte_start.c index 3aa4b5f3..e596412e 100644 --- a/gfe_integration_tests/test_rte/src/test_rte_start.c +++ b/gfe_integration_tests/test_rte/src/test_rte_start.c @@ -5,7 +5,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, diff --git a/gfe_integration_tests/test_rte/src/test_run_too_long.c b/gfe_integration_tests/test_rte/src/test_run_too_long.c index 1557d85b..ddef1377 100644 --- a/gfe_integration_tests/test_rte/src/test_run_too_long.c +++ b/gfe_integration_tests/test_rte/src/test_run_too_long.c @@ -5,7 +5,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, diff --git a/gfe_integration_tests/test_rte/test_rte_during_run.mk b/gfe_integration_tests/test_rte/test_rte_during_run.mk index 1f83b2d0..befbd6f3 100644 --- a/gfe_integration_tests/test_rte/test_rte_during_run.mk +++ b/gfe_integration_tests/test_rte/test_rte_during_run.mk @@ -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, diff --git a/gfe_integration_tests/test_rte/test_rte_during_run.py b/gfe_integration_tests/test_rte/test_rte_during_run.py index 641c0d9e..4d34d188 100644 --- a/gfe_integration_tests/test_rte/test_rte_during_run.py +++ b/gfe_integration_tests/test_rte/test_rte_during_run.py @@ -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, @@ -15,8 +15,8 @@ import os import traceback import pytest -from spinn_front_end_common.utilities.utility_objs import ExecutableType from spinnman.exceptions import SpinnmanException +from spinnman.model.enums import ExecutableType import spinnaker_graph_front_end as s from gfe_integration_tests.test_rte.run_vertex import RunVertex diff --git a/gfe_integration_tests/test_rte/test_rte_during_run_forever.py b/gfe_integration_tests/test_rte/test_rte_during_run_forever.py index 33a785c6..edea9122 100644 --- a/gfe_integration_tests/test_rte/test_rte_during_run_forever.py +++ b/gfe_integration_tests/test_rte/test_rte_during_run_forever.py @@ -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, @@ -14,7 +14,7 @@ import os from time import sleep -from spinn_front_end_common.utilities.utility_objs import ExecutableType +from spinnman.model.enums import ExecutableType from spinn_front_end_common.utilities.exceptions import ( ExecutableFailedToStopException) from spinn_front_end_common.utilities.database import DatabaseConnection @@ -29,16 +29,15 @@ def start(): sleep(3.0) s.stop_run() - conn = DatabaseConnection(start, local_port=None) - s.setup(model_binary_folder=os.path.dirname(__file__)) - s.add_machine_vertex_instance(RunVertex( - "test_rte_during_run.aplx", - ExecutableType.USES_SIMULATION_INTERFACE)) - s.add_socket_address(None, "localhost", conn.local_port) - s.run(None) - with pytest.raises(ExecutableFailedToStopException): - s.stop() - conn.close() + with DatabaseConnection(start, local_port=None) as conn: + s.setup(model_binary_folder=os.path.dirname(__file__)) + s.add_machine_vertex_instance(RunVertex( + "test_rte_during_run.aplx", + ExecutableType.USES_SIMULATION_INTERFACE)) + s.add_socket_address(None, "localhost", conn.local_port) + s.run(None) + with pytest.raises(ExecutableFailedToStopException): + s.stop() if __name__ == "__main__": diff --git a/gfe_integration_tests/test_rte/test_rte_start.mk b/gfe_integration_tests/test_rte/test_rte_start.mk index 07fdfcfd..73d1b4db 100644 --- a/gfe_integration_tests/test_rte/test_rte_start.mk +++ b/gfe_integration_tests/test_rte/test_rte_start.mk @@ -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, diff --git a/gfe_integration_tests/test_rte/test_rte_start.py b/gfe_integration_tests/test_rte/test_rte_start.py index b2509037..e0b642f8 100644 --- a/gfe_integration_tests/test_rte/test_rte_start.py +++ b/gfe_integration_tests/test_rte/test_rte_start.py @@ -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, @@ -14,8 +14,8 @@ import os import pytest -from spinn_front_end_common.utilities.utility_objs import ExecutableType from spinnman.exceptions import SpinnmanException +from spinnman.model.enums import ExecutableType import spinnaker_graph_front_end as s from gfe_integration_tests.test_rte.run_vertex import RunVertex diff --git a/gfe_integration_tests/test_rte/test_run_too_long.mk b/gfe_integration_tests/test_rte/test_run_too_long.mk index 776ad272..53089f75 100644 --- a/gfe_integration_tests/test_rte/test_run_too_long.mk +++ b/gfe_integration_tests/test_rte/test_run_too_long.mk @@ -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, diff --git a/gfe_integration_tests/test_rte/test_run_too_long.py b/gfe_integration_tests/test_rte/test_run_too_long.py index bb3f7351..65180aa7 100644 --- a/gfe_integration_tests/test_rte/test_run_too_long.py +++ b/gfe_integration_tests/test_rte/test_run_too_long.py @@ -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, @@ -14,8 +14,8 @@ import os import pytest -from spinn_front_end_common.utilities.utility_objs import ExecutableType from spinnman.exceptions import SpinnmanTimeoutException +from spinnman.model.enums import ExecutableType import spinnaker_graph_front_end as s from gfe_integration_tests.test_rte.run_vertex import RunVertex diff --git a/gfe_integration_tests/test_scripts.py b/gfe_integration_tests/test_scripts.py index aaab7c9e..9d6af358 100644 --- a/gfe_integration_tests/test_scripts.py +++ b/gfe_integration_tests/test_scripts.py @@ -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, @@ -27,47 +27,53 @@ class TestScripts(ScriptChecker): """ # flake8: noqa - def test_gfe_examples_sync_test_sync_test(self): - self.check_script("gfe_examples/sync_test/sync_test.py") + def test_gfe_examples_live_io_live_io(self): + self.check_script("gfe_examples/live_io/live_io.py") - def test_gfe_examples_sync_test_sync_test_vertex(self): - self.check_script("gfe_examples/sync_test/sync_test_vertex.py") + def test_gfe_examples_live_io_live_io_vertex(self): + self.check_script("gfe_examples/live_io/live_io_vertex.py") - def test_gfe_examples_Conways_one_no_graph_example_conways_no_graph(self): - self.check_script("gfe_examples/Conways/one_no_graph_example/conways_no_graph.py") + def test_gfe_examples_template_template_vertex(self): + self.check_script("gfe_examples/template/template_vertex.py") - def test_gfe_examples_Conways_partitioned_example_a_no_vis_no_buffer_conways_basic_cell(self): - self.check_script("gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_basic_cell.py") + def test_gfe_examples_template_python_template(self): + self.check_script("gfe_examples/template/python_template.py") - def test_gfe_examples_Conways_partitioned_example_a_no_vis_no_buffer_conways_partitioned(self): - self.check_script("gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_partitioned.py") + def test_gfe_examples_hello_world_untimed_hello_world(self): + self.check_script("gfe_examples/hello_world_untimed/hello_world.py") - def test_gfe_examples_Conways_partitioned_example_b_no_vis_buffer_conways_basic_cell(self): - self.check_script("gfe_examples/Conways/partitioned_example_b_no_vis_buffer/conways_basic_cell.py") + def test_gfe_examples_hello_world_untimed_hello_world_vertex(self): + self.check_script("gfe_examples/hello_world_untimed/hello_world_vertex.py") def test_gfe_examples_Conways_partitioned_example_b_no_vis_buffer_conways_partitioned(self): self.check_script("gfe_examples/Conways/partitioned_example_b_no_vis_buffer/conways_partitioned.py") - def test_gfe_examples_Conways_no_edges_examples_conways_basic_cell(self): - self.check_script("gfe_examples/Conways/no_edges_examples/conways_basic_cell.py") + def test_gfe_examples_Conways_partitioned_example_b_no_vis_buffer_conways_basic_cell(self): + self.check_script("gfe_examples/Conways/partitioned_example_b_no_vis_buffer/conways_basic_cell.py") + + def test_gfe_examples_Conways_partitioned_example_a_no_vis_no_buffer_conways_partitioned(self): + self.check_script("gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_partitioned.py") + + def test_gfe_examples_Conways_partitioned_example_a_no_vis_no_buffer_conways_basic_cell(self): + self.check_script("gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_basic_cell.py") + + def test_gfe_examples_Conways_one_no_graph_example_conways_no_graph(self): + self.check_script("gfe_examples/Conways/one_no_graph_example/conways_no_graph.py") def test_gfe_examples_Conways_no_edges_examples_conways_no_edges(self): self.check_script("gfe_examples/Conways/no_edges_examples/conways_no_edges.py") + def test_gfe_examples_Conways_no_edges_examples_conways_basic_cell(self): + self.check_script("gfe_examples/Conways/no_edges_examples/conways_basic_cell.py") + + def test_gfe_examples_sync_test_sync_test_vertex(self): + self.check_script("gfe_examples/sync_test/sync_test_vertex.py") + + def test_gfe_examples_sync_test_sync_test(self): + self.check_script("gfe_examples/sync_test/sync_test.py") + def test_gfe_examples_hello_world_hello_world(self): self.check_script("gfe_examples/hello_world/hello_world.py") def test_gfe_examples_hello_world_hello_world_vertex(self): self.check_script("gfe_examples/hello_world/hello_world_vertex.py") - - def test_gfe_examples_hello_world_untimed_hello_world(self): - self.check_script("gfe_examples/hello_world_untimed/hello_world.py") - - def test_gfe_examples_hello_world_untimed_hello_world_vertex(self): - self.check_script("gfe_examples/hello_world_untimed/hello_world_vertex.py") - - def test_gfe_examples_template_python_template(self): - self.check_script("gfe_examples/template/python_template.py") - - def test_gfe_examples_template_template_vertex(self): - self.check_script("gfe_examples/template/template_vertex.py") diff --git a/pypi_to_import b/pypi_to_import index c859ad4b..e29e0dc8 100644 --- a/pypi_to_import +++ b/pypi_to_import @@ -2,5 +2,4 @@ SpiNNUtilities:spinn_utilities SpiNNMachine:spinn_machine SpiNNMan:spinnman SpiNNaker_PACMAN:pacman -SpiNNaker_DataSpecification:data_specification SpiNNFrontEndCommon:spinn_front_end_common \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..b2bf2c79 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,17 @@ +# 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 +# +# 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. + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..b718838d --- /dev/null +++ b/setup.cfg @@ -0,0 +1,58 @@ +# 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 +# +# 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. + +[metadata] +name = SpiNNakerGraphFrontEnd +version = attr: spinnaker_graph_front_end._version.__version__ +description= Front end to the SpiNNaker tool chain which uses a basic graph +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/SpiNNakerManchester/SpiNNakerGraphFrontEnd +license = Apache License 2.0 +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + Intended Audience :: Science/Research + License :: OSI Approved :: Apache Software License + Natural Language :: English + Operating System :: POSIX :: Linux + Operating System :: Microsoft :: Windows + Operating System :: MacOS + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 +maintainer = SpiNNakerTeam +maintainer_email = spinnakerusers@googlegroups.com + +[options] +python_requires = >=3.7, <4 +packages = find: +zip_safe = True +include_package_data = True +install_requires = + SpiNNFrontEndCommon == 1!7.1.0 + +[options.package_data] +* = + spiNNakerGraphFrontEnd.cfg + +[options.extras_require] +test = + SpiNNakerTestBase == 1!7.1.0 + # pytest will be brought in by pytest-cov + pytest-cov + testfixtures diff --git a/setup.py b/setup.py index 73d28ca3..3c58b3cd 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,10 @@ -# Copyright (c) 2015 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, @@ -12,73 +12,22 @@ # See the License for the specific language governing permissions and # limitations under the License. -from collections import defaultdict +import distutils.dir_util +from setuptools import setup import os -try: - from setuptools import setup -except ImportError: - from distutils.core import setup - -__version__ = None -exec(open("spinnaker_graph_front_end/_version.py").read()) -assert __version__ - -# Build a list of all project modules, as well as supplementary files -main_package = "spinnaker_graph_front_end" -extensions = { - ".aplx", ".boot", ".cfg", ".json", ".sql", ".template", ".xml", ".xsd"} -main_package_dir = os.path.join(os.path.dirname(__file__), main_package) -start = len(main_package_dir) -packages = [] -package_data = defaultdict(list) -for dirname, _dirnames, filenames in os.walk(main_package_dir): - if '__init__.py' in filenames: - package = "{}{}".format( - main_package, dirname[start:].replace(os.sep, '.')) - packages.append(package) - for filename in filenames: - _, ext = os.path.splitext(filename) - if ext in extensions: - package = "{}{}".format( - main_package, dirname[start:].replace(os.sep, '.')) - package_data[package].append(filename) - -setup( - name="SpiNNakerGraphFrontEnd", - version=__version__, - description="Front end to the SpiNNaker tool chain which uses a " - "basic graph", - url="https://github.com/SpiNNakerManchester/SpiNNakerGraphFrontEnd", - classifiers=[ - "Development Status :: 5 - Production/Stable", - - "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - - "License :: OSI Approved :: Apache License 2.0", - - "Natural Language :: English", - - "Operating System :: POSIX :: Linux", - "Operating System :: Microsoft :: Windows", - "Operating System :: MacOS", - - "Programming Language :: C", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - ], - packages=packages, - package_data=package_data, - install_requires=['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'], - maintainer="SpiNNakerTeam", - maintainer_email="spinnakerusers@googlegroups.com" -) +import sys + + +if __name__ == '__main__': + # Repeated installs assume files have not changed + # https://github.com/pypa/setuptools/issues/3236 + if len(sys.argv) > 0 and sys.argv[1] == 'egg_info': + # on the first call to setpy.py remove files left by previous install + this_dir = os.path.dirname(os.path.abspath(__file__)) + build_dir = os.path.join(this_dir, "build") + if os.path.isdir(build_dir): + distutils.dir_util.remove_tree(build_dir) + egg_dir = os.path.join(this_dir, "SpiNNakerGraphFrontEnd.egg-info") + if os.path.isdir(egg_dir): + distutils.dir_util.remove_tree(egg_dir) + setup() diff --git a/spinnaker_graph_front_end/__init__.py b/spinnaker_graph_front_end/__init__.py index 178c596a..eb3362bf 100644 --- a/spinnaker_graph_front_end/__init__.py +++ b/spinnaker_graph_front_end/__init__.py @@ -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, @@ -79,8 +79,9 @@ def setup(model_binary_module=None, model_binary_folder=None, database_socket_addresses=(), n_chips_required=None, n_boards_required=None, time_scale_factor=None, machine_time_step=None): - """ Set up a graph, ready to have vertices and edges added to it, and the\ - simulator engine that will execute the graph. + """ + Set up a graph, ready to have vertices and edges added to it, and the + simulator engine that will execute the graph. .. note:: This must be called *before* the other functions in this API. @@ -143,7 +144,8 @@ def setup(model_binary_module=None, def run(duration=None): - """ Run a simulation for a number of microseconds. + """ + Run a simulation for a number of microseconds. :param int duration: the number of microseconds the application code should run for @@ -153,7 +155,8 @@ def run(duration=None): def run_until_complete(n_steps=None): - """ Run until the simulation is complete. + """ + Run until the simulation is complete. :param int n_steps: If not ``None``, this specifies that the simulation should be @@ -165,7 +168,8 @@ def run_until_complete(n_steps=None): def stop(): - """ Do any necessary cleaning up before exiting. Unregisters the controller + """ + Do any necessary cleaning up before exiting. Unregisters the controller. """ # pylint: disable=global-variable-undefined global _executable_finder @@ -176,14 +180,16 @@ def stop(): def stop_run(): - """ Stop a request to run forever + """ + Stop a request to run forever. """ FecDataView.check_valid_simulator() __simulator.stop_run() def add_vertex_instance(vertex_to_add): - """ Add an existing application vertex to the unpartitioned graph. + """ + Add an existing application vertex to the unpartitioned graph. :param ~pacman.model.graphs.application.ApplicationVertex vertex_to_add: vertex instance to add to the graph @@ -192,12 +198,12 @@ def add_vertex_instance(vertex_to_add): def _new_edge_label(): - label = f"Edge {FecDataView.get_next_none_labelled_edge_number()}" - return label + return f"Edge {FecDataView.get_next_none_labelled_edge_number()}" def add_edge_instance(edge, partition_id): - """ Add an edge to the unpartitioned graph. + """ + Add an edge to the unpartitioned graph. :param ~pacman.model.graphs.application.ApplicationEdge edge: The edge to add. @@ -208,7 +214,8 @@ def add_edge_instance(edge, partition_id): def add_machine_vertex_instance(machine_vertex): - """ Add a machine vertex instance to the graph. + """ + Add a machine vertex instance to the graph. :param ~pacman.model.graphs.machine.MachineVertex machine_vertex: The vertex to add @@ -220,7 +227,8 @@ def add_machine_vertex_instance(machine_vertex): def add_machine_edge_instance(edge, partition_id): - """ Add a machine edge instance to the graph. + """ + Add a machine edge instance to the graph. :param ~pacman.model.graphs.machine.MachineEdge edge: The edge to add @@ -235,7 +243,8 @@ def add_machine_edge_instance(edge, partition_id): def add_socket_address( database_ack_port_num, database_notify_host, database_notify_port_num): - """ Add a socket address for the notification protocol. + """ + Add a socket address for the notification protocol. :param int database_ack_port_num: port number to send acknowledgement to @@ -253,8 +262,9 @@ def add_socket_address( def get_number_of_available_cores_on_machine(): - """ Get the number of cores on this machine that are available to the\ - simulation. + """ + Get the number of cores on this machine that are available to the + simulation. :rtype: int """ @@ -263,7 +273,8 @@ def get_number_of_available_cores_on_machine(): def has_ran(): - """ Get whether the simulation has already run. + """ + Get whether the simulation has already run. :rtype: bool """ @@ -271,7 +282,8 @@ def has_ran(): def routing_infos(): - """ Get information about how messages are routed on the machine. + """ + Get information about how messages are routed on the machine. :rtype: ~pacman.model.routing_info.RoutingInfo """ @@ -279,24 +291,32 @@ def routing_infos(): def placements(): - """ No Longer supported use View iterate_placements instead + """ + Get the placements. + + .. deprecated:: 7.0 + No Longer supported! Use View iterate_placements instead + + Instead of:: - Instead of - front_end.placements().placements + front_end.placements().placements - Use - FecDataView.iterate_placemements() + Use:: - FecDataView can be imported from spinn_front_end_common.data + FecDataView.iterate_placemements() + + :py:class:`~spinn_front_end_common.data.FecDataView` can be imported from + `spinn_front_end_common.data` """ raise NotImplementedError( "This method has been replaced with View methods such as " "iterate_placements. See " - "http://spinnakermanchester.github.io/common_pages/GlobalData.html") + "https://spinnakermanchester.github.io/common_pages/GlobalData.html") def tags(): - """ Get the IPTAGs allocated on the machine. + """ + Get the IPTAGs allocated on the machine. :rtype: ~pacman.model.tags.Tags """ @@ -304,7 +324,8 @@ def tags(): def buffer_manager(): - """ Get the buffer manager being used for loading/extracting buffers + """ + Get the buffer manager being used for loading/extracting buffers. :rtype: ~spinn_front_end_common.interface.buffer_management.BufferManager """ @@ -312,7 +333,8 @@ def buffer_manager(): def machine(): - """ Get the model of the attached/allocated machine. + """ + Get the model of the attached/allocated machine. :rtype: ~spinn_machine.Machine """ @@ -326,7 +348,8 @@ def machine(): def is_allocated_machine(): - """ Get whether a machine is allocated. + """ + Get whether a machine is allocated. :rtype: bool """ diff --git a/spinnaker_graph_front_end/_version.py b/spinnaker_graph_front_end/_version.py index 69947134..8f3f316a 100644 --- a/spinnaker_graph_front_end/_version.py +++ b/spinnaker_graph_front_end/_version.py @@ -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, @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1!6.0.1" -__version_month__ = "May" -__version_year__ = "2021" +__version__ = "1!7.1.0" +__version_month__ = "TBD" +__version_year__ = "TBD" __version_day__ = "TBD" __version_name__ = "Not yet released" diff --git a/spinnaker_graph_front_end/config_setup.py b/spinnaker_graph_front_end/config_setup.py index fdce43cc..75d5b5c2 100644 --- a/spinnaker_graph_front_end/config_setup.py +++ b/spinnaker_graph_front_end/config_setup.py @@ -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, @@ -12,11 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +""" +Utilities for setting up the global configuration. +""" + import os from spinn_utilities.config_holder import ( clear_cfg_files, set_cfg_files) from spinn_front_end_common.interface.config_setup import ( add_default_cfg, add_spinnaker_cfg) +from spinn_front_end_common.data.fec_data_writer import FecDataWriter #: The name of the configuration file CONFIG_FILE_NAME = "spiNNakerGraphFrontEnd.cfg" @@ -24,32 +29,33 @@ def setup_configs(): """ - Sets up the configs including the users cfg file - - Clears out any previous read configs but does not load the new configs - so a warning is generated if a config is used before setup is called. + Sets up the configurations including the user's configuration file. + Clears out any previous read configurations but does not load the new + configurations so a warning is generated if a configuration is used before + :py:func:`~spinnaker_graph_front_end.setup` is called. """ clear_cfg_files(False) add_spinnaker_cfg() # This add its dependencies too set_cfg_files( - configfile=CONFIG_FILE_NAME, + config_file=CONFIG_FILE_NAME, default=os.path.join(os.path.dirname(__file__), CONFIG_FILE_NAME)) + FecDataWriter.mock() def unittest_setup(): """ - Does all the steps that may be required before a unittest + Does all the steps that may be required before a unit test. - Resets the configs so only the local default configs are included. - The user cfg is NOT included! + Resets the configurations so only the local default configurations are + included. + The user configuration is *not* included! - Unsets any previous simulators and tempdirs + Unsets any previous simulators and temporary directories. .. note:: - This file should only be called from Spynnaker tests - that do not call sim.setup - + This file should only be called from spinnaker_graph_front_end tests + that do not call :py:func:`~spinnaker_graph_front_end.setup`. """ clear_cfg_files(True) add_spinnaker_cfg() # This add its dependencies too diff --git a/spinnaker_graph_front_end/spiNNakerGraphFrontEnd.cfg b/spinnaker_graph_front_end/spiNNakerGraphFrontEnd.cfg index f27dc2ed..a004b34f 100644 --- a/spinnaker_graph_front_end/spiNNakerGraphFrontEnd.cfg +++ b/spinnaker_graph_front_end/spiNNakerGraphFrontEnd.cfg @@ -7,7 +7,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, diff --git a/spinnaker_graph_front_end/spinnaker.py b/spinnaker_graph_front_end/spinnaker.py index bfc93c84..d7e3566f 100644 --- a/spinnaker_graph_front_end/spinnaker.py +++ b/spinnaker_graph_front_end/spinnaker.py @@ -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, @@ -13,7 +13,7 @@ # limitations under the License. import logging -from spinn_utilities.config_holder import get_config_str +from spinn_utilities.config_holder import is_config_none from spinn_utilities.log import FormatAdapter from spinn_front_end_common.data import FecDataView from spinn_front_end_common.interface.abstract_spinnaker_base import ( @@ -26,12 +26,15 @@ def _is_allocated_machine(): - return (get_config_str("Machine", "spalloc_server") or - get_config_str("Machine", "remote_spinnaker_url")) + if is_config_none("Machine", "spalloc_server"): + return not is_config_none("Machine", "remote_spinnaker_url") + else: + return True class SpiNNaker(AbstractSpinnakerBase): - """ The implementation of the SpiNNaker simulation interface. + """ + The implementation of the SpiNNaker simulation interface. .. note:: You should not normally instantiate this directly from user code. @@ -44,7 +47,7 @@ def __init__( """ :param int n_chips_required: How many chips are required. - *Prefer ``n_boards_required`` if possible.* + *Prefer* `n_boards_required` *if possible.* :param int n_boards_required: How many boards are required. Unnecessary with a local board. :param int time_scale_factor: @@ -69,7 +72,7 @@ def __init__( def __repr__(self): if FecDataView.has_ipaddress(): - return f"SpiNNaker Graph Front End object " \ - f"for machine {FecDataView.get_ipaddress()}" + return (f"SpiNNaker Graph Front End object " + f"for machine {FecDataView.get_ipaddress()}") else: return "SpiNNaker Graph Front End object no machine set" diff --git a/spinnaker_graph_front_end/utilities/__init__.py b/spinnaker_graph_front_end/utilities/__init__.py index 30da6e3b..8e4347fa 100644 --- a/spinnaker_graph_front_end/utilities/__init__.py +++ b/spinnaker_graph_front_end/utilities/__init__.py @@ -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, diff --git a/spinnaker_graph_front_end/utilities/data_utils.py b/spinnaker_graph_front_end/utilities/data_utils.py index 6f6be0c1..c064e514 100644 --- a/spinnaker_graph_front_end/utilities/data_utils.py +++ b/spinnaker_graph_front_end/utilities/data_utils.py @@ -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, @@ -18,7 +18,8 @@ def generate_system_data_region(spec, region_id, machine_vertex): - """ Generate a system data region for time-based simulations. + """ + Generate a system data region for time-based simulations. :param ~data_specification.DataSpecificationGenerator spec: The data specification to write to @@ -27,7 +28,6 @@ def generate_system_data_region(spec, region_id, machine_vertex): :param ~pacman.model.graphs.machine.MachineVertex machine_vertex: The machine vertex to write for """ - # reserve memory regions spec.reserve_memory_region( region=region_id, size=SIMULATION_N_BYTES, label='systemInfo') @@ -39,7 +39,8 @@ def generate_system_data_region(spec, region_id, machine_vertex): def generate_steps_system_data_region(spec, region_id, machine_vertex): - """ Generate a system data region for step-based simulations. + """ + Generate a system data region for step-based simulations. :param data_specification.DataSpecificationGenerator spec: The data specification to write to diff --git a/spinnaker_graph_front_end/utilities/simulator_vertex.py b/spinnaker_graph_front_end/utilities/simulator_vertex.py index a7fcc4b9..92137038 100644 --- a/spinnaker_graph_front_end/utilities/simulator_vertex.py +++ b/spinnaker_graph_front_end/utilities/simulator_vertex.py @@ -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, @@ -15,20 +15,21 @@ import sys from spinn_utilities.overrides import overrides from spinn_utilities.log import FormatAdapter +from spinnman.model.enums import ExecutableType from pacman.model.graphs.machine import MachineVertex from spinn_front_end_common.abstract_models import AbstractHasAssociatedBinary from spinn_front_end_common.data import FecDataView -from spinn_front_end_common.utilities.utility_objs import ExecutableType -from spinnaker_graph_front_end.utilities.data_utils import ( - generate_system_data_region) from spinn_front_end_common.interface.buffer_management import ( recording_utilities) +from spinnaker_graph_front_end.utilities.data_utils import ( + generate_system_data_region) log = FormatAdapter(logging.getLogger(__file__)) class SimulatorVertex(MachineVertex, AbstractHasAssociatedBinary): - """ A machine vertex that is implemented by a binary APLX that supports\ - the spin1_api simulation control protocol. + """ + A machine vertex that is implemented by a binary APLX that supports + the `spin1_api` simulation control protocol. """ __slots__ = ["_binary_name", "__front_end"] diff --git a/unittests/__init__.py b/unittests/__init__.py index 523cd560..f3a422e4 100644 --- a/unittests/__init__.py +++ b/unittests/__init__.py @@ -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, diff --git a/unittests/test_cfg_checker.py b/unittests/test_cfg_checker.py index af6dc0a9..98818ea2 100644 --- a/unittests/test_cfg_checker.py +++ b/unittests/test_cfg_checker.py @@ -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, @@ -15,6 +15,7 @@ import os import unittest from spinn_utilities.config_holder import run_config_checks +import spinnaker_graph_front_end from spinnaker_graph_front_end.config_setup import unittest_setup @@ -28,7 +29,7 @@ def test_config_checks(self): parent = os.path.dirname(unittests) gfe_examples = os.path.join(parent, "gfe_examples") gfe_integration_tests = os.path.join(parent, "gfe_integration_tests") - gfe = os.path.join(parent, "spinnaker_graph_front_end") + gfe = spinnaker_graph_front_end.__path__[0] repeaters = [ "placer", "router", "info_allocator", "compressor"] run_config_checks( diff --git a/unittests/test_import_all.py b/unittests/test_import_all.py index aead0047..b34e5fde 100644 --- a/unittests/test_import_all.py +++ b/unittests/test_import_all.py @@ -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, diff --git a/unittests/test_using_virtual_board/__init__.py b/unittests/test_using_virtual_board/__init__.py index b60e6d9f..6725518b 100644 --- a/unittests/test_using_virtual_board/__init__.py +++ b/unittests/test_using_virtual_board/__init__.py @@ -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, diff --git a/unittests/test_using_virtual_board/test_hello_world.py b/unittests/test_using_virtual_board/test_hello_world.py index 9fde2445..7741f7da 100644 --- a/unittests/test_using_virtual_board/test_hello_world.py +++ b/unittests/test_using_virtual_board/test_hello_world.py @@ -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, diff --git a/unittests/test_version.py b/unittests/test_version.py index 32670aae..b65eab67 100644 --- a/unittests/test_version.py +++ b/unittests/test_version.py @@ -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, @@ -15,7 +15,6 @@ import unittest import spinn_utilities import spinn_machine -import data_specification import pacman import spinnman import spinn_front_end_common @@ -23,7 +22,8 @@ class Test(unittest.TestCase): - """ Tests for the component version comparison + """ + Tests for the component version comparison """ # no unittest_setup to check version without it @@ -31,7 +31,6 @@ class Test(unittest.TestCase): def test_compare_versions(self): spinn_utilities_parts = spinn_utilities.__version__.split('.') spinn_machine_parts = spinn_machine.__version__.split('.') - data_specification_parts = data_specification.__version__.split('.') pacman_parts = pacman.__version__.split('.') spinnman_parts = spinnman.__version__.split('.') spinn_front_end_common_parts = spinn_front_end_common.\ @@ -49,11 +48,6 @@ def test_compare_versions(self): self.assertLessEqual(spinn_machine_parts[1], spinnaker_graph_front_end_parts[1]) - self.assertEqual(data_specification_parts[0], - spinnaker_graph_front_end_parts[0]) - self.assertLessEqual(data_specification_parts[1], - spinnaker_graph_front_end_parts[1]) - self.assertEqual(pacman_parts[0], spinnaker_graph_front_end_parts[0]) self.assertLessEqual(pacman_parts[1],