Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8"]
python-version: ["3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]

runs-on: ${{ matrix.os }}
Expand All @@ -22,18 +22,17 @@ jobs:
with:
ref: ${{ github.ref }}

- uses: actions/setup-python@v2
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install and configure poetry
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@v2
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-test-${{ matrix.python-version }}-venv-${{ hashFiles('**/poetry.lock') }}
Expand Down
6 changes: 3 additions & 3 deletions cipher_parse/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -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"],
Expand Down
Loading