Skip to content

Commit b199042

Browse files
committed
Merge branch '2.X' into 2.3.0
2 parents b7308ad + d6b0c1c commit b199042

File tree

11 files changed

+96
-36
lines changed

11 files changed

+96
-36
lines changed

.github/workflows/build_wheels.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ jobs:
1212
runs-on: ubuntu-24.04
1313

1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v6
1616

1717
- name: Build wheels
18-
uses: pypa/cibuildwheel@v3.0.1
18+
uses: pypa/cibuildwheel@v3.3.0
1919
env:
2020
CIBW_ARCHS_LINUX: x86_64
2121

22-
- uses: actions/upload-artifact@v4
22+
- uses: actions/upload-artifact@v6
2323
with:
2424
name: dist_linux_x86_64
2525
path: ./wheelhouse/*.whl
@@ -29,14 +29,14 @@ jobs:
2929
runs-on: ubuntu-24.04-arm
3030

3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v6
3333

3434
- name: Build wheels
35-
uses: pypa/cibuildwheel@v3.0.1
35+
uses: pypa/cibuildwheel@v3.3.0
3636
env:
3737
CIBW_ARCHS_LINUX: aarch64
3838

39-
- uses: actions/upload-artifact@v4
39+
- uses: actions/upload-artifact@v6
4040
with:
4141
name: dist_linux_aarch64
4242
path: ./wheelhouse/*.whl
@@ -46,14 +46,14 @@ jobs:
4646
runs-on: macos-13
4747

4848
steps:
49-
- uses: actions/checkout@v4
49+
- uses: actions/checkout@v6
5050

5151
- name: Build wheels
52-
uses: pypa/cibuildwheel@v3.0.1
52+
uses: pypa/cibuildwheel@v3.3.0
5353
env:
5454
CIBW_ARCHS_MACOS: x86_64
5555

56-
- uses: actions/upload-artifact@v4
56+
- uses: actions/upload-artifact@v6
5757
with:
5858
name: dist_macos13_x86_64
5959
path: ./wheelhouse/*.whl
@@ -63,14 +63,14 @@ jobs:
6363
runs-on: macos-15
6464

6565
steps:
66-
- uses: actions/checkout@v4
66+
- uses: actions/checkout@v6
6767

6868
- name: Build wheels
69-
uses: pypa/cibuildwheel@v3.0.1
69+
uses: pypa/cibuildwheel@v3.3.0
7070
env:
7171
CIBW_ARCHS_MACOS: arm64
7272

73-
- uses: actions/upload-artifact@v4
73+
- uses: actions/upload-artifact@v6
7474
with:
7575
name: dist_macos15_arm64
7676
path: ./wheelhouse/*.whl
@@ -80,8 +80,8 @@ jobs:
8080
runs-on: ubuntu-latest
8181
timeout-minutes: 60
8282
steps:
83-
- uses: actions/checkout@v4
84-
- uses: actions/setup-python@v5
83+
- uses: actions/checkout@v6
84+
- uses: actions/setup-python@v6
8585
with:
8686
python-version: '3.13'
8787

@@ -99,7 +99,7 @@ jobs:
9999
100100
- name: upload sdist
101101
if: always()
102-
uses: actions/upload-artifact@v4
102+
uses: actions/upload-artifact@v6
103103
with:
104104
name: dist_sdist
105105
path: dist/*.tar.gz

.github/workflows/test-linux-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
runs-on: ubuntu-latest
1919
timeout-minutes: 60
2020
steps:
21-
- uses: actions/checkout@v4
22-
- uses: actions/setup-python@v5
21+
- uses: actions/checkout@v6
22+
- uses: actions/setup-python@v6
2323
with:
2424
python-version: '3.13'
2525

@@ -33,7 +33,7 @@ jobs:
3333
### libcasm-global ###
3434
- name: restore libcasm-global cache
3535
id: cache-libcasm-global-restore
36-
uses: actions/cache/restore@v4
36+
uses: actions/cache/restore@v5
3737
with:
3838
path: CASMcode_global/dist
3939
key: ${{ runner.os }}-libcasm-global-v2-3-0

.github/workflows/test-linux-cxx-only.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
runs-on: ubuntu-latest
1919
timeout-minutes: 60
2020
steps:
21-
- uses: actions/checkout@v4
22-
- uses: actions/setup-python@v5
21+
- uses: actions/checkout@v6
22+
- uses: actions/setup-python@v6
2323
with:
2424
python-version: '3.13'
2525

@@ -33,7 +33,7 @@ jobs:
3333
### libcasm-global ###
3434
- name: restore libcasm-global cache
3535
id: cache-libcasm-global-restore
36-
uses: actions/cache/restore@v4
36+
uses: actions/cache/restore@v5
3737
with:
3838
path: CASMcode_global/dist
3939
key: ${{ runner.os }}-libcasm-global-v2-3-0
@@ -83,7 +83,7 @@ jobs:
8383
8484
- name: upload test log
8585
if: always()
86-
uses: actions/upload-artifact@v4
86+
uses: actions/upload-artifact@v6
8787
with:
8888
name: libcasm-xtal-cxx-test-log
8989
path: build_cxx_test/Testing/Temporary/LastTest.log

.github/workflows/test-linux-dependencies.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
timeout-minutes: 60
1010
steps:
11-
- uses: actions/setup-python@v5
11+
- uses: actions/setup-python@v6
1212
with:
1313
python-version: '3.13'
1414

@@ -21,14 +21,14 @@ jobs:
2121
### libcasm-global ###
2222
- name: restore libcasm-global cache
2323
id: cache-libcasm-global-restore
24-
uses: actions/cache/restore@v4
24+
uses: actions/cache/restore@v5
2525
with:
2626
path: CASMcode_global/dist
2727
key: ${{ runner.os }}-libcasm-global-v2-3-0
2828

2929
- name: checkout libcasm-global
3030
if: steps.cache-libcasm-global-restore.outputs.cache-hit != 'true'
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@v6
3232
with:
3333
repository: prisms-center/CASMcode_global
3434
path: CASMcode_global
@@ -47,7 +47,7 @@ jobs:
4747
4848
- name: save libcasm-global cache
4949
id: cache-libcasm-global-save
50-
uses: actions/cache/save@v4
50+
uses: actions/cache/save@v5
5151
with:
5252
path: CASMcode_global/dist
5353
key: ${{ steps.cache-libcasm-global-restore.outputs.cache-primary-key }}

.github/workflows/test-linux.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
runs-on: ubuntu-latest
1919
timeout-minutes: 60
2020
steps:
21-
- uses: actions/checkout@v4
22-
- uses: actions/setup-python@v5
21+
- uses: actions/checkout@v6
22+
- uses: actions/setup-python@v6
2323
with:
2424
python-version: '3.13'
2525

@@ -33,7 +33,7 @@ jobs:
3333
### libcasm-global ###
3434
- name: restore libcasm-global cache
3535
id: cache-libcasm-global-restore
36-
uses: actions/cache/restore@v4
36+
uses: actions/cache/restore@v5
3737
with:
3838
path: CASMcode_global/dist
3939
key: ${{ runner.os }}-libcasm-global-v2-3-0
@@ -66,7 +66,7 @@ jobs:
6666
6767
- name: upload docs
6868
if: always()
69-
uses: actions/upload-artifact@v4
69+
uses: actions/upload-artifact@v6
7070
with:
7171
name: libcasm-xtal-docs
7272
path: python/doc/_build/html

.github/workflows/test-macos-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
runs-on: macOS-latest
1212
timeout-minutes: 60
1313
steps:
14-
- uses: actions/checkout@v4
15-
- uses: actions/setup-python@v5
14+
- uses: actions/checkout@v6
15+
- uses: actions/setup-python@v6
1616
with:
1717
python-version: '3.13'
1818

@@ -40,7 +40,7 @@ jobs:
4040
4141
- name: upload libcasm-xtal-macos-latest-x86_64-dist
4242
if: always()
43-
uses: actions/upload-artifact@v4
43+
uses: actions/upload-artifact@v6
4444
with:
4545
name: libcasm-xtal-macos-latest-x86_64-dist
4646
path: dist

.github/workflows/test-macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
runs-on: macOS-latest
1212
timeout-minutes: 60
1313
steps:
14-
- uses: actions/checkout@v4
15-
- uses: actions/setup-python@v5
14+
- uses: actions/checkout@v6
15+
- uses: actions/setup-python@v6
1616
with:
1717
python-version: '3.13'
1818

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [2.3.0] - 2025-12-15
99

10+
### Fixed
11+
12+
- Fixed a bug in `xtal.make_primitive_structure` that resulted in the wrong atom coordinates.
13+
1014
### Changed
1115

1216
- Build for Python 3.14

python/src/xtal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ xtal::SimpleStructure make_primitive_simplestructure(
963963
atom_type.push_back(site_names[0]);
964964
}
965965

966-
return make_simplestructure(prim->lattice(), get_prim_coordinate_cart(prim),
966+
return make_simplestructure(prim->lattice(), get_prim_coordinate_frac(prim),
967967
atom_type);
968968
}
969969

python/tests/conftest.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,3 +454,51 @@ def example_structure_2():
454454
),
455455
atom_type=["A", "Va", "B", "A"],
456456
)
457+
458+
459+
@pytest.fixture
460+
def example_structure_3():
461+
"""Diamond cubic primitive structure."""
462+
lattice = xtal.Lattice(
463+
np.array([[0.0, 1.0, 1.0], [1.0, 0.0, 1.0], [1.0, 1.0, 0.0]]).transpose()
464+
)
465+
466+
atom_coordinate_frac = np.array(
467+
[
468+
[0.0, 0.0, 0.0],
469+
[0.25, 0.25, 0.25],
470+
]
471+
).transpose()
472+
473+
return xtal.Structure(
474+
lattice=lattice,
475+
atom_coordinate_frac=atom_coordinate_frac,
476+
atom_type=["A", "A"],
477+
)
478+
479+
480+
@pytest.fixture
481+
def example_structure_4():
482+
"""Diamond cubic conventional structure."""
483+
lattice = xtal.Lattice(
484+
np.array([[2.0, 0.0, 0.0], [0.0, 2.0, 0.0], [0.0, 0.0, 2.0]]).transpose()
485+
)
486+
487+
atom_coordinate_frac = np.array(
488+
[
489+
[0.0, 0.0, 0.0],
490+
[0.5, 0.5, 0.0],
491+
[0.5, 0.0, 0.5],
492+
[0.0, 0.5, 0.5],
493+
[0.75, 0.75, 0.25],
494+
[0.75, 0.25, 0.75],
495+
[0.25, 0.75, 0.75],
496+
[0.25, 0.25, 0.25],
497+
]
498+
).transpose()
499+
500+
return xtal.Structure(
501+
lattice=lattice,
502+
atom_coordinate_frac=atom_coordinate_frac,
503+
atom_type=["A", "A", "A", "A", "A", "A", "A", "A"],
504+
)

0 commit comments

Comments
 (0)