From 24f359556a946e1adf4ee65080fa5a89b3e5abe1 Mon Sep 17 00:00:00 2001 From: James Nightingale Date: Mon, 16 Oct 2023 11:13:06 +0100 Subject: [PATCH 1/4] requirements update --- autoconf/__init__.py | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autoconf/__init__.py b/autoconf/__init__.py index c861e3c..276e3dd 100644 --- a/autoconf/__init__.py +++ b/autoconf/__init__.py @@ -7,4 +7,4 @@ from .json_prior.config import path_for_class from .json_prior.config import JSONPriorConfig -__version__ = "2023.7.5.2" +__version__ = "2023.9.18.4" diff --git a/requirements.txt b/requirements.txt index f4ed9eb..cf22618 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ typing-inspect>=0.4.0 PyYAML>=6.0.1 -numpy<=1.23.5 +numpy<=1.26.0 From 384191b15e1f5b4f6aef7c054fcb41345853353c Mon Sep 17 00:00:00 2001 From: Richard Date: Mon, 16 Oct 2023 15:33:40 +0100 Subject: [PATCH 2/4] use builtin not numpy alias --- autoconf/dictable.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/autoconf/dictable.py b/autoconf/dictable.py index c5ef084..e9b32a0 100644 --- a/autoconf/dictable.py +++ b/autoconf/dictable.py @@ -11,14 +11,20 @@ logger = logging.getLogger(__name__) +np_type_map = { + "bool": "bool_", +} + + def nd_array_as_dict(obj: np.ndarray) -> dict: """ Converts a numpy array to a dictionary representation. """ + np_type = str(obj.dtype) return { "type": "ndarray", "array": obj.tolist(), - "dtype": str(obj.dtype), + "dtype": np_type_map.get(np_type, np_type), } From d460dfcdba127732fdac4cd52560520e91a9d049 Mon Sep 17 00:00:00 2001 From: James Nightingale Date: Mon, 16 Oct 2023 15:35:33 +0100 Subject: [PATCH 3/4] udpated requirements --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index cf22618..0b8d013 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ typing-inspect>=0.4.0 +pathlib PyYAML>=6.0.1 numpy<=1.26.0 From 3a9f98f065e0c5d9959b40fa743599f657ceb262 Mon Sep 17 00:00:00 2001 From: James Nightingale Date: Mon, 16 Oct 2023 16:46:00 +0100 Subject: [PATCH 4/4] add Python 3.11 to build serve --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 24159c6..7ce6c72 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.9, '3.10'] + python-version: [3.8, 3.9, '3.10', '3.11'] steps: - name: Checkout PyAutoConf uses: actions/checkout@v2