From aab7bab056d69ef5da2bdb30a9b3b0d0621f5654 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 17 Mar 2023 14:14:00 +0000 Subject: [PATCH 01/39] change to pyproject.toml and setup.cfg --- pyproject.toml | 17 ++++++++++ setup.cfg | 58 ++++++++++++++++++++++++++++++++++ setup.py | 84 -------------------------------------------------- 3 files changed, 75 insertions(+), 84 deletions(-) create mode 100644 pyproject.toml create mode 100644 setup.cfg delete mode 100644 setup.py 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..a705a4c2 --- /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 = SpiNNUtilities +version = attr: spinn_utilities/_version +description="Utility classes and functions for SpiNNaker projects" +long_description = file: README.md +long_description_content_type = text/markdown +url="https://github.com/SpiNNakerManchester/SpiNNUtils" +license="Apache License 2.0" +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 :: 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] +packages = find: + +[options.package_data] +* = README.md +* = progress_bar.txt +* = spinn_utilities.cfg + +options] +install_requires = + appdirs + numpy > 1.13, < 1.21 + pyyaml + requests + + [options] +zip_safe = True +include_package_data = True diff --git a/setup.py b/setup.py deleted file mode 100644 index 301d73c9..00000000 --- a/setup.py +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright (c) 2017 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 collections import defaultdict -try: - from setuptools import setup -except ImportError: - from distutils.core import setup - -__version__ = None -exec(open("spinn_utilities/_version.py").read()) -assert __version__ - -# Build a list of all project modules, as well as supplementary files -main_package = "spinn_utilities" -extensions = {".aplx", ".boot", ".cfg", ".json", ".sql", ".template", ".txt", - ".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="SpiNNUtilities", - version=__version__, - description="Utility classes and functions for SpiNNaker projects", - url="https://github.com/SpiNNakerManchester/SpiNNUtils", - license="Apache License 2.0", - 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 :: 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=[ - "appdirs", - "numpy > 1.13, < 1.21; python_version == '3.7'", - "numpy < 1.24; python_version >= '3.8'", - "pyyaml", - "requests >= 2.4.1", - ], - maintainer="SpiNNakerTeam", - maintainer_email="spinnakerusers@googlegroups.com" -) From 319e512e56381a6995338fa138cf431938fd2e0f Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 17 Mar 2023 14:17:52 +0000 Subject: [PATCH 02/39] can only use * once --- setup.cfg | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index a705a4c2..0a0ca5d8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -43,10 +43,9 @@ packages = find: [options.package_data] * = README.md -* = progress_bar.txt -* = spinn_utilities.cfg +progress_bar.txt = progress_bar.txt +cfg = spinn_utilities.cfg -options] install_requires = appdirs numpy > 1.13, < 1.21 From 51b85f19e00bb3b571b6fcfd3bd0dbcf0232fede Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 17 Mar 2023 14:28:00 +0000 Subject: [PATCH 03/39] uses run install --- .github/workflows/python_actions.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml index 0c3ddd7b..fddbd7cb 100644 --- a/.github/workflows/python_actions.yml +++ b/.github/workflows/python_actions.yml @@ -42,8 +42,9 @@ jobs: path: support - name: Install pip, etc. uses: ./support/actions/python-tools - - name: Setup - uses: ./support/actions/run-setup + + - name: Run Install + uses: ./support/actions/run-install - name: Test with pytest uses: ./support/actions/pytest From 0c532accd037cb440f1ad08861de9c05c748cdc0 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 17 Mar 2023 15:06:37 +0000 Subject: [PATCH 04/39] default build system --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b2bf2c79..5f2c23a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,5 +13,5 @@ # limitations under the License. [build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" \ No newline at end of file +requires = ["setuptools>=40.8.0", "wheel"] +build-backend = "setuptools.build_meta:__legacy__" \ No newline at end of file From 973188d4bc8f57329cd9daa25c8fff5b16c2bce4 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 17 Mar 2023 15:48:59 +0000 Subject: [PATCH 05/39] local project path --- .github/workflows/python_actions.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml index fddbd7cb..1b9ccad4 100644 --- a/.github/workflows/python_actions.yml +++ b/.github/workflows/python_actions.yml @@ -45,7 +45,8 @@ jobs: - name: Run Install uses: ./support/actions/run-install - + with: + project-path: SpiNNUtils - name: Test with pytest uses: ./support/actions/pytest with: From 24ed292a8c4e5c873c76d4e4b592285cfd17926c Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 17 Mar 2023 15:54:35 +0000 Subject: [PATCH 06/39] /home/runner/work/SpiNNUtils --- .github/workflows/python_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml index 1b9ccad4..4fc3f121 100644 --- a/.github/workflows/python_actions.yml +++ b/.github/workflows/python_actions.yml @@ -46,7 +46,7 @@ jobs: - name: Run Install uses: ./support/actions/run-install with: - project-path: SpiNNUtils + project-path: /home/runner/work/SpiNNUtils - name: Test with pytest uses: ./support/actions/pytest with: From 7fbc30f6322de45f3699624fef24f8a042f6d7fa Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 17 Mar 2023 16:14:20 +0000 Subject: [PATCH 07/39] need double SpiNNUtils --- .github/workflows/python_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml index 4fc3f121..b21cc2f1 100644 --- a/.github/workflows/python_actions.yml +++ b/.github/workflows/python_actions.yml @@ -46,7 +46,7 @@ jobs: - name: Run Install uses: ./support/actions/run-install with: - project-path: /home/runner/work/SpiNNUtils + project-path: /home/runner/work/SpiNNUtils/SpiNNUtils - name: Test with pytest uses: ./support/actions/pytest with: From 1c2a3915b292e913918394d7f2448623bd3f465a Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 17 Mar 2023 16:27:18 +0000 Subject: [PATCH 08/39] version fix --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 0a0ca5d8..2bae3b7b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,7 +14,7 @@ [metadata] name = SpiNNUtilities -version = attr: spinn_utilities/_version +version = attr: spinn_utilities/_version/__version__ description="Utility classes and functions for SpiNNaker projects" long_description = file: README.md long_description_content_type = text/markdown From db674fd8733f1f8fd30f808e62d4bf906e31ccac Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 17 Mar 2023 16:29:53 +0000 Subject: [PATCH 09/39] comment out version for now --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 2bae3b7b..1dd1179a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,7 +14,7 @@ [metadata] name = SpiNNUtilities -version = attr: spinn_utilities/_version/__version__ +#version = attr: spinn_utilities/_version/__version__ description="Utility classes and functions for SpiNNaker projects" long_description = file: README.md long_description_content_type = text/markdown From f1a274f72edf94b50e2a835268f3f8a41a1af07f Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 17 Mar 2023 16:45:05 +0000 Subject: [PATCH 10/39] __version__ --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 1dd1179a..07e1efde 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,7 +14,7 @@ [metadata] name = SpiNNUtilities -#version = attr: spinn_utilities/_version/__version__ +version = attr: __version__ description="Utility classes and functions for SpiNNaker projects" long_description = file: README.md long_description_content_type = text/markdown From d8eaa6c02f9984fe161eaba0b86b81d187d528b7 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 17 Mar 2023 16:47:18 +0000 Subject: [PATCH 11/39] change to pyproject.toml and setup.cfg --- .github/workflows/python_actions.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml index b21cc2f1..c9ce3921 100644 --- a/.github/workflows/python_actions.yml +++ b/.github/workflows/python_actions.yml @@ -45,8 +45,6 @@ jobs: - name: Run Install uses: ./support/actions/run-install - with: - project-path: /home/runner/work/SpiNNUtils/SpiNNUtils - name: Test with pytest uses: ./support/actions/pytest with: From b6d2c6126df4fd7c2a33386594766699c85f2491 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 17 Mar 2023 16:49:19 +0000 Subject: [PATCH 12/39] spinn_utilities.__version__ --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 07e1efde..2cf9c63f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,7 +14,7 @@ [metadata] name = SpiNNUtilities -version = attr: __version__ +version = attr: spinn_utilities.__version__ description="Utility classes and functions for SpiNNaker projects" long_description = file: README.md long_description_content_type = text/markdown From c42a5f3b2d414d2e4e556707b653ad35728c1345 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 17 Mar 2023 16:52:57 +0000 Subject: [PATCH 13/39] new line --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5f2c23a8..ad2fef7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,4 +14,4 @@ [build-system] requires = ["setuptools>=40.8.0", "wheel"] -build-backend = "setuptools.build_meta:__legacy__" \ No newline at end of file +build-backend = "setuptools.build_meta:__legacy__" From 23cf2967cc071840685a619c561b8c93db1d9d58 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 20 Mar 2023 06:40:53 +0000 Subject: [PATCH 14/39] cap numpy as 3.8 --- setup.cfg | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index 2cf9c63f..9a5ab3be 100644 --- a/setup.cfg +++ b/setup.cfg @@ -40,6 +40,8 @@ maintainer_email="spinnakerusers@googlegroups.com" [options] packages = find: +zip_safe = True +include_package_data = True [options.package_data] * = README.md @@ -48,10 +50,6 @@ cfg = spinn_utilities.cfg install_requires = appdirs - numpy > 1.13, < 1.21 + numpy < 1.24 pyyaml requests - - [options] -zip_safe = True -include_package_data = True From 984334e3cd70cdbc92a1c2cdbfcc7f5ff1060fd7 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 20 Mar 2023 07:04:25 +0000 Subject: [PATCH 15/39] install_requires in correct place --- setup.cfg | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index 9a5ab3be..76704f60 100644 --- a/setup.cfg +++ b/setup.cfg @@ -39,17 +39,29 @@ maintainer="SpiNNakerTeam" maintainer_email="spinnakerusers@googlegroups.com" [options] +python_requires = >=3.7, <4 packages = find: zip_safe = True include_package_data = True +install_requires = + appdirs + numpy < 1.24 + pyyaml + requests + +[options.extras_require] +test = + flake8 + coverage >= 4.4, < 5.0 + # pytest will be brought in by pytest-cov + pytest-cov + testfixtures + sphinx >= 2 + pyyaml + httpretty != 1.0.0 [options.package_data] * = README.md progress_bar.txt = progress_bar.txt cfg = spinn_utilities.cfg -install_requires = - appdirs - numpy < 1.24 - pyyaml - requests From 96a7f55471bad19b867dd60c4cac15f0c3655db8 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 20 Mar 2023 07:39:48 +0000 Subject: [PATCH 16/39] test jsonschema --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 76704f60..ecab24f7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -48,6 +48,7 @@ install_requires = numpy < 1.24 pyyaml requests + jsonschema [options.extras_require] test = @@ -57,7 +58,6 @@ test = pytest-cov testfixtures sphinx >= 2 - pyyaml httpretty != 1.0.0 [options.package_data] From 24920bd36a6565768b878a132da37f49b96974f0 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 20 Mar 2023 07:40:17 +0000 Subject: [PATCH 17/39] no longer need requirements files --- requirements-test.txt | 23 ----------------------- requirements.txt | 19 ------------------- 2 files changed, 42 deletions(-) delete mode 100644 requirements-test.txt delete mode 100644 requirements.txt diff --git a/requirements-test.txt b/requirements-test.txt deleted file mode 100644 index b3a5c683..00000000 --- a/requirements-test.txt +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2017 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. - --r requirements.txt -flake8 -coverage >= 4.4, < 5.0 -# pytest will be brought in by pytest-cov -pytest-cov -testfixtures -sphinx >= 2 -pyyaml -httpretty != 1.0.0 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 76d79181..00000000 --- a/requirements.txt +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2017 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. - -appdirs -numpy > 1.13, < 1.21; python_version == '3.7' -numpy < 1.24; python_version >= '3.8' -pyyaml -requests >= 2.4.1 From 1e3c59948e234affa8a30dc71b200c6a24ccd02f Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 20 Mar 2023 08:31:35 +0000 Subject: [PATCH 18/39] higher flake8 --- setup.cfg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index ecab24f7..e8c1d0c3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -48,11 +48,10 @@ install_requires = numpy < 1.24 pyyaml requests - jsonschema [options.extras_require] test = - flake8 + flake8 >= 5 coverage >= 4.4, < 5.0 # pytest will be brought in by pytest-cov pytest-cov From 28fd158df012e8e44ffd78638b4d046d1abe1c15 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 20 Mar 2023 08:36:01 +0000 Subject: [PATCH 19/39] free flake8 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index e8c1d0c3..8d3be0a2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -51,7 +51,7 @@ install_requires = [options.extras_require] test = - flake8 >= 5 + flake8 coverage >= 4.4, < 5.0 # pytest will be brought in by pytest-cov pytest-cov From 768d3f259ad42bbe486a8d434c1fc074d5e7d8e9 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 20 Mar 2023 11:19:13 +0000 Subject: [PATCH 20/39] remove __legacy__ --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ad2fef7e..f965cd0d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,5 +13,5 @@ # limitations under the License. [build-system] -requires = ["setuptools>=40.8.0", "wheel"] -build-backend = "setuptools.build_meta:__legacy__" +requires = ["setuptools"] +build-backend = "setuptools.build_meta:" From f513ab71eed4af429fdf87215d381ffd42938de1 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 20 Mar 2023 13:35:12 +0000 Subject: [PATCH 21/39] minimum flake8 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 8d3be0a2..e8c1d0c3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -51,7 +51,7 @@ install_requires = [options.extras_require] test = - flake8 + flake8 >= 5 coverage >= 4.4, < 5.0 # pytest will be brought in by pytest-cov pytest-cov From d489f9c465fdf7ebfd47271c2646a225546b546b Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 20 Mar 2023 13:36:14 +0000 Subject: [PATCH 22/39] intentional flake8 errors --- spinn_utilities/exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spinn_utilities/exceptions.py b/spinn_utilities/exceptions.py index b748d6f2..b9380c3a 100644 --- a/spinn_utilities/exceptions.py +++ b/spinn_utilities/exceptions.py @@ -30,7 +30,7 @@ class NotSetupException(SpiNNUtilsException): """ def __init__(self, data): - super().__init__(f"Requesting {data} is not valid before setup") + super().__init__( f"Requesting {data} is not valid before setup") class InvalidDirectory(SpiNNUtilsException): From 4146dbcf2d82355c9cd13b97c6398cb8f8e2b38f Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 20 Mar 2023 13:38:42 +0000 Subject: [PATCH 23/39] Revert "intentional flake8 errors" This reverts commit d489f9c465fdf7ebfd47271c2646a225546b546b. --- spinn_utilities/exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spinn_utilities/exceptions.py b/spinn_utilities/exceptions.py index b9380c3a..b748d6f2 100644 --- a/spinn_utilities/exceptions.py +++ b/spinn_utilities/exceptions.py @@ -30,7 +30,7 @@ class NotSetupException(SpiNNUtilsException): """ def __init__(self, data): - super().__init__( f"Requesting {data} is not valid before setup") + super().__init__(f"Requesting {data} is not valid before setup") class InvalidDirectory(SpiNNUtilsException): From 82b986b428dbc83b0d109d30a2989df56910c8d5 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 21 Mar 2023 06:07:17 +0000 Subject: [PATCH 24/39] get version from _version.py --- setup.cfg | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/setup.cfg b/setup.cfg index e8c1d0c3..969bdfec 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,7 +14,7 @@ [metadata] name = SpiNNUtilities -version = attr: spinn_utilities.__version__ +version = attr: spinn_utilities._verion.__version__ description="Utility classes and functions for SpiNNaker projects" long_description = file: README.md long_description_content_type = text/markdown @@ -59,8 +59,3 @@ test = sphinx >= 2 httpretty != 1.0.0 -[options.package_data] -* = README.md -progress_bar.txt = progress_bar.txt -cfg = spinn_utilities.cfg - From 4ba28c017cc9a3bcce5a6161467fcc9ec32b19be Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 21 Mar 2023 06:09:42 +0000 Subject: [PATCH 25/39] get version from _version.py --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 969bdfec..4ca3c271 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,7 +14,7 @@ [metadata] name = SpiNNUtilities -version = attr: spinn_utilities._verion.__version__ +version = attr: spinn_utilities._version.__version__ description="Utility classes and functions for SpiNNaker projects" long_description = file: README.md long_description_content_type = text/markdown From cab568036558fe5efbfe84f1b5094979bad0e712 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 21 Mar 2023 13:16:09 +0000 Subject: [PATCH 26/39] removed incorrect [ --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 4ca3c271..fa0fbaa5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,7 +20,7 @@ long_description = file: README.md long_description_content_type = text/markdown url="https://github.com/SpiNNakerManchester/SpiNNUtils" license="Apache License 2.0" -classifiers=[ +classifiers= Development Status :: 5 - Production/Stable Intended Audience :: Developers Intended Audience :: Science/Research From bcd0976f82ee2f3643c47c664241ee9d47efc4c6 Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Tue, 21 Mar 2023 15:54:04 +0000 Subject: [PATCH 27/39] More metadata corrections --- setup.cfg | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index fa0fbaa5..0fb81499 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,11 +15,11 @@ [metadata] name = SpiNNUtilities version = attr: spinn_utilities._version.__version__ -description="Utility classes and functions for SpiNNaker projects" +description = Utility classes and functions for SpiNNaker projects long_description = file: README.md long_description_content_type = text/markdown -url="https://github.com/SpiNNakerManchester/SpiNNUtils" -license="Apache License 2.0" +url = https://github.com/SpiNNakerManchester/SpiNNUtils +license=Apache-2.0 classifiers= Development Status :: 5 - Production/Stable Intended Audience :: Developers @@ -35,8 +35,11 @@ classifiers= Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 -maintainer="SpiNNakerTeam" -maintainer_email="spinnakerusers@googlegroups.com" +maintainer = SpiNNakerTeam +maintainer_email = spinnakerusers@googlegroups.com +keywords = + spinnaker + utilities [options] python_requires = >=3.7, <4 From f2019da73cd25fdb756e88e82a5d160ab2b78b97 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 28 Mar 2023 11:01:12 +0100 Subject: [PATCH 28/39] minor setup.cfg changes --- pyproject.toml | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f965cd0d..ddb15f36 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,4 +14,4 @@ [build-system] requires = ["setuptools"] -build-backend = "setuptools.build_meta:" +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg index 0fb81499..3f384c4d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ description = Utility classes and functions for SpiNNaker projects long_description = file: README.md long_description_content_type = text/markdown url = https://github.com/SpiNNakerManchester/SpiNNUtils -license=Apache-2.0 +license = Apache-2.0 classifiers= Development Status :: 5 - Production/Stable Intended Audience :: Developers From 62b63938504d141c23de08b2df43a1548653e298 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 28 Mar 2023 15:13:57 +0100 Subject: [PATCH 29/39] dummy setup.py --- setup.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..ae0950da --- /dev/null +++ b/setup.py @@ -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. + +from setuptools import setup +if __name__ == '__main__': + setup() From 3ad9292274b248900fec0dcd44f33195310b47cb Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Wed, 29 Mar 2023 16:03:02 +0100 Subject: [PATCH 30/39] comment out long description and fix manifest --- MANIFEST.in | 2 +- setup.cfg | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 86061928..7d53693d 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.md LICENSE_POLICY.md \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 3f384c4d..5e565bcc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,8 +16,8 @@ name = SpiNNUtilities version = attr: spinn_utilities._version.__version__ description = Utility classes and functions for SpiNNaker projects -long_description = file: README.md -long_description_content_type = text/markdown +#long_description = file: README.md +#long_description_content_type = text/markdown url = https://github.com/SpiNNakerManchester/SpiNNUtils license = Apache-2.0 classifiers= From b22f1c31c8f0c5b47f9e9d19a211157d06de0c82 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Wed, 29 Mar 2023 16:18:42 +0100 Subject: [PATCH 31/39] options.packages.find --- setup.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.cfg b/setup.cfg index 5e565bcc..d8cd49d4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -52,6 +52,10 @@ install_requires = pyyaml requests +[options.packages.find] +include = + spinn_utilities + [options.extras_require] test = flake8 >= 5 From 8c3d25ca88bc2f327c999ad1c242fddc6343b672 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Wed, 29 Mar 2023 16:23:18 +0100 Subject: [PATCH 32/39] fix MANIFEST.in --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 7d53693d..a9db2519 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include LICENSE.md LICENSE_POLICY.md \ No newline at end of file +include LICENSE LICENSE_POLICY.md \ No newline at end of file From 5e8c8217744f266fc92ed8b42de28b999c93dab8 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Thu, 30 Mar 2023 15:27:17 +0100 Subject: [PATCH 33/39] leave the install of coverage,flake8, pylint and spinx to the scripts --- setup.cfg | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index d8cd49d4..7302daa7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -58,11 +58,8 @@ include = [options.extras_require] test = - flake8 >= 5 - coverage >= 4.4, < 5.0 # pytest will be brought in by pytest-cov pytest-cov testfixtures - sphinx >= 2 httpretty != 1.0.0 From 2fd83f9ba6b5949d5bc1076ee74a22c733ba7634 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Thu, 30 Mar 2023 15:37:21 +0100 Subject: [PATCH 34/39] more files in MANIFEST.in --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index a9db2519..4e4eef7b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include LICENSE LICENSE_POLICY.md \ No newline at end of file +include LICENSE LICENSE_POLICY.md README.md CITATION.cff \ No newline at end of file From a154ea19fc973caef311d6f2d7ff2c12aef8eac6 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 31 Mar 2023 16:40:26 +0100 Subject: [PATCH 35/39] remove previous build data --- setup.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/setup.py b/setup.py index ae0950da..381194c7 100644 --- a/setup.py +++ b/setup.py @@ -12,6 +12,19 @@ # 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 sys if __name__ == '__main__': + if len(sys.argv) > 0 and sys.argv[1] == 'egg_info': + 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, "SpiNNUtilities.egg-info") + if os.path.isdir(egg_dir): + distutils.dir_util.remove_tree(egg_dir) + print(sys.argv) setup() From 2e83fe2c8e55d9b1bf6238da89a664874f793a14 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 31 Mar 2023 16:40:46 +0100 Subject: [PATCH 36/39] include is not recursive --- setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 7302daa7..aa0694a0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -43,7 +43,7 @@ keywords = [options] python_requires = >=3.7, <4 -packages = find: +packages = find_namespace: zip_safe = True include_package_data = True install_requires = @@ -55,6 +55,7 @@ install_requires = [options.packages.find] include = spinn_utilities + spinn_utilities.* [options.extras_require] test = From fbe306d6e3ce748a7179e29f09366daa0341bb8c Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 3 Apr 2023 07:21:07 +0100 Subject: [PATCH 37/39] comment setup.py --- setup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 381194c7..5df3ee70 100644 --- a/setup.py +++ b/setup.py @@ -13,12 +13,16 @@ # limitations under the License. import distutils.dir_util - from setuptools import setup import os 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): @@ -26,5 +30,4 @@ egg_dir = os.path.join(this_dir, "SpiNNUtilities.egg-info") if os.path.isdir(egg_dir): distutils.dir_util.remove_tree(egg_dir) - print(sys.argv) setup() From 655f15678c36eedc5ac081c34fde25eaa5d833a6 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 3 Apr 2023 14:43:02 +0100 Subject: [PATCH 38/39] include cfg file --- setup.cfg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.cfg b/setup.cfg index aa0694a0..f6b35e12 100644 --- a/setup.cfg +++ b/setup.cfg @@ -57,6 +57,11 @@ include = spinn_utilities spinn_utilities.* +[options.package_data] +* = + spinn_utilities.cfg + progress_bar.txt + [options.extras_require] test = # pytest will be brought in by pytest-cov From 362a0ca2bd3c0d60f7e920855a1e2c5cab64760e Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 3 Apr 2023 15:34:07 +0100 Subject: [PATCH 39/39] add db.sql to install --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index f6b35e12..4b5f65c6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -61,6 +61,7 @@ include = * = spinn_utilities.cfg progress_bar.txt + db.sql [options.extras_require] test =