From c8f11f8f13fd9737ce42e0ba79f26defac261333 Mon Sep 17 00:00:00 2001 From: Gerard Capes Date: Thu, 4 Dec 2025 11:51:36 +0000 Subject: [PATCH 1/7] Return None for default seeds value This had been returning a np.array of None values, which MatFlow wasn't able to serialise. --- cipher_parse/geometry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cipher_parse/geometry.py b/cipher_parse/geometry.py index 5f1b035..aab1d04 100644 --- a/cipher_parse/geometry.py +++ b/cipher_parse/geometry.py @@ -70,7 +70,7 @@ def __init__( self.voxel_map = voxel_map self.voxel_phase = voxel_phase - self.seeds = np.asarray(seeds) + self.seeds = np.asarray(seeds) if seeds is not None else None self.materials = materials self.interfaces = interfaces self.random_seed = random_seed @@ -278,7 +278,7 @@ def to_JSON(self, keep_arrays=False): } if not keep_arrays: data["size"] = data["size"].tolist() - data["seeds"] = data["seeds"].tolist() + data["seeds"] = data["seeds"].tolist() if data["seeds"] is not None else None data["voxel_phase"] = data["voxel_phase"].tolist() if data["misorientation_matrix"] is not None: data["misorientation_matrix"] = data["misorientation_matrix"].tolist() @@ -299,7 +299,7 @@ def from_JSON(cls, data, quiet=True): "materials": [MaterialDefinition.from_JSON(i) for i in data["materials"]], "interfaces": [InterfaceDefinition.from_JSON(i) for i in data["interfaces"]], "size": np.array(data["size"]), - "seeds": np.array(data["seeds"]), + "seeds": np.array(data["seeds"]) if data["seeds"] is not None else None, "voxel_phase": np.array(data["voxel_phase"]), "is_periodic": data.get("is_periodic", False), "random_seed": data["random_seed"], From 0184f5be520075ebf05fc136e1eb1528fbac6eb5 Mon Sep 17 00:00:00 2001 From: Gerard Capes Date: Thu, 11 Dec 2025 10:53:17 +0000 Subject: [PATCH 2/7] Upgrade actions/cache from v2 to v4 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ff0a19b..4bf5110 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: poetry config installer.modern-installation false - name: Cache the virtualenv - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ./.venv key: ${{ runner.os }}-test-${{ matrix.python-version }}-venv-${{ hashFiles('**/poetry.lock') }} From 08f71ec8e0071462144f262cbfd7716159b00f08 Mon Sep 17 00:00:00 2001 From: Gerard Capes Date: Thu, 11 Dec 2025 10:56:39 +0000 Subject: [PATCH 3/7] Update Python version in CI workflow Python 3.8 gave errors trying to install some of the dependencies --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4bf5110..8d7f6b5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8"] + python-version: ["3.13"] os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} From 2f67a9662144f9a1c75b3f4bba14f9a726b557d0 Mon Sep 17 00:00:00 2001 From: Gerard Capes Date: Thu, 11 Dec 2025 11:38:20 +0000 Subject: [PATCH 4/7] Remove deprecated(?) poetry config setting --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d7f6b5..8e97ffc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,6 @@ jobs: run: | python -m pip install poetry poetry config virtualenvs.in-project true - poetry config installer.modern-installation false - name: Cache the virtualenv uses: actions/cache@v4 From 174cbc6ae60ea0bcec6ffe8a61e5ec566202d633 Mon Sep 17 00:00:00 2001 From: Gerard Capes Date: Thu, 11 Dec 2025 11:48:05 +0000 Subject: [PATCH 5/7] Update Python version in CI workflow 3.13 gave an error that it wasn't supported by the project. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e97ffc..9a4deb6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.13"] + python-version: ["3.11"] os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} From 7bfdf36faa5ea2b2d87ec1494bdaa8677023027a Mon Sep 17 00:00:00 2001 From: Gerard Capes Date: Thu, 11 Dec 2025 11:49:24 +0000 Subject: [PATCH 6/7] Change Python version in CI workflow to 3.10 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9a4deb6..26336f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.11"] + python-version: ["3.10"] os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} From 5d0cfb8eea789cfe6605dcb2bda73117a2b7cd8b Mon Sep 17 00:00:00 2001 From: Gerard Capes Date: Thu, 11 Dec 2025 11:58:32 +0000 Subject: [PATCH 7/7] Try newer python setup version Ubuntu tests were failing - everything else passed. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 26336f5..445ec9e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: with: ref: ${{ github.ref }} - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }}