Skip to content

Commit

Permalink
Merge pull request #109 from SpiNNakerManchester/python3.12
Browse files Browse the repository at this point in the history
Python3.12
  • Loading branch information
Christian-B authored Jan 5, 2024
2 parents a4ff059 + f07151c commit 819830f
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/c_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
uses: ./support/actions/apt-get-install
with:
packages: doxygen gcc-arm-none-eabi
- name: Configure Python 3.8
- name: Configure Python 3.12
# Note: Python is needed for spinn_utilities.make_tools when building
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.12

- name: Set environment variables
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
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:
# Check out the code and critical support code
- name: Checkout
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
exitcheck: 39

- name: Run rat copyright enforcement
if: matrix.python-version == 3.8
if: matrix.python-version == 3.12
uses: ./support/actions/check-copyrights
with:
config_file: rat_asl20.xml
Expand All @@ -94,5 +94,5 @@ jobs:
# base-path: ${{ env.CODE_PATHS }}

- name: Validate CITATION.cff
if: matrix.python-version == 3.8
if: matrix.python-version == 3.12
uses: dieghernan/cff-validator@main
6 changes: 6 additions & 0 deletions python_models8/connectors/my_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ def __init__(self, weights=0.0, delays=1, allow_self_connections=True

@overrides(AbstractConnector.get_delay_maximum)
def get_delay_maximum(self, synapse_info):
# TODO call self._get_delay_maximum if needed
return 16

@overrides(AbstractConnector.get_delay_minimum)
def get_delay_minimum(self, synapse_info):
# TODO call self._get_delay_minimum if needed
return 1

@overrides(AbstractGenerateConnectorOnHost.create_synaptic_block)
def create_synaptic_block(
self, post_slices, post_vertex_slice, synapse_type, synapse_info):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ class MyTimingDependence(AbstractTimingDependence):
"_a_minus",
"_a_plus",
"_my_depression_parameter",
"_my_potentiation_parameter",
"_synapse_structure"]
"_my_potentiation_parameter"]

NUM_PARAMETERS = 2

Expand All @@ -27,13 +26,13 @@ def __init__(

A_plus=0.01, A_minus=0.01):

# TODO: Update to match the synapse structure in the C code
super().__init__(SynapseStructureWeightOnly())

# TODO: Store any parameters
self._my_potentiation_parameter = my_potentiation_parameter
self._my_depression_parameter = my_depression_parameter

# TODO: Update to match the synapse structure in the C code
self._synapse_structure = SynapseStructureWeightOnly()

# Are these in the c code?
self._a_plus = A_plus
self._a_minus = A_minus
Expand Down Expand Up @@ -113,12 +112,6 @@ def write_parameters(
def get_parameter_names(self):
return ['my_potentiation_parameter', 'my_depression_parameter']

@property
def synaptic_structure(self):
""" Get the synaptic structure of the plastic part of the rows
"""
return self._synapse_structure

@property
def A_plus(self):
return self._a_plus
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
pynn

[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,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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


Expand All @@ -26,9 +26,9 @@
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, "sPyNNaker8NewModelTemplate.egg-info")
if os.path.isdir(egg_dir):
distutils.dir_util.remove_tree(egg_dir)
shutil.rmtree(egg_dir)
setup()

0 comments on commit 819830f

Please sign in to comment.