Skip to content

Commit

Permalink
Merge branch 'master' into not_monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B authored Jan 5, 2024
2 parents f12caa3 + 3bcfd73 commit 86e024d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
uses: ./support/actions/pytest
with:
tests: unittests
coverage: ${{ matrix.python-version == 3.8 }}
coverage: ${{ matrix.python-version == 3.12 }}
cover-packages: spinn_machine
coveralls-token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -75,7 +75,7 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
python-version: ["3.8"]
python-version: [3.12]

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
spinnaker_doc_version = "latest"

intersphinx_mapping = {
'python': ('https://docs.python.org/3.8', None),
'python': ('https://docs.python.org/3.12', None),
'numpy': ("https://numpy.org/doc/stable/", None),
'spinn_utilities': (
f'https://spinnutils.readthedocs.io/en/{spinnaker_doc_version}/',
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ classifiers =
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
Programming Language :: Python :: 3.12
maintainer = SpiNNakerTeam
maintainer_email = [email protected]
keywords =
spinnaker
machine model

[options]
python_requires = >=3.7, <4
python_requires = >=3.8, <4
packages = find:
zip_safe = True
include_package_data = True
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import distutils.dir_util
from setuptools import setup
import shutil
import os
import sys

Expand All @@ -26,8 +26,8 @@
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)
shutil.rmtree(build_dir)
egg_dir = os.path.join(this_dir, "SpiNNMachine.egg-info")
if os.path.isdir(egg_dir):
distutils.dir_util.remove_tree(egg_dir)
shutil.rmtree(egg_dir)
setup()
2 changes: 1 addition & 1 deletion spinn_machine/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def where_is_chip(self, chip: Chip) -> str:
return (f"global chip {chip.x}, {chip.y} on {chip00.ip_address} "
f"is chip {localx}, {localy} {ip_address}")
except Exception: # pylint: disable=broad-except
return str(Chip)
return str(chip)

def where_is_xy(self, x: int, y: int) -> str:
"""
Expand Down
10 changes: 9 additions & 1 deletion unittests/data/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,18 @@ def test_where_is_setup(self):
self.assertEqual(
"No Machine created yet",
MachineDataView.where_is_xy(1, 0))
writer.set_machine(virtual_machine(width=12, height=12))
machine = virtual_machine(width=12, height=12)
writer.set_machine(machine)
self.assertEqual(
"global chip 11, 11 on 127.0.0.0 is chip 7, 3 on 127.0.4.8",
MachineDataView.where_is_xy(11, 11))
self.assertEqual(
"No chip -1, 11 found",
MachineDataView.where_is_xy(-1, 11))
self.assertEqual(
"global chip 2, 8 on 127.0.0.0 is chip 6, 4 on 127.0.8.4",
MachineDataView.where_is_chip(machine.get_chip_at(2, 8)))
self.assertEqual(
"None",
MachineDataView.where_is_chip(None)
)

0 comments on commit 86e024d

Please sign in to comment.