Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
awvwgk authored Sep 7, 2024
2 parents 5d26f40 + 5024500 commit dc0e268
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ jobs:
matrix:
os:
- ubuntu-latest
- windows-latest
# windows-latest
- macos-12
python: ['38', '39', '310', '311']
python: ['38', '39', '310', '311', '312']

defaults:
run:
Expand All @@ -97,7 +97,7 @@ jobs:
CIBW_BUILD: "*${{ matrix.python }}-*"
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS_MACOS: x86_64
CIBW_ENVIRONMENT_MACOS: CC=gcc-11 CXX=g++-11 FC=gfortran-11 MACOSX_DEPLOYMENT_TARGET=12.0
CIBW_ENVIRONMENT_MACOS: CC=gcc-12 CXX=g++-12 FC=gfortran-12 MACOSX_DEPLOYMENT_TARGET=12.0
CIBW_BEFORE_BUILD_WINDOWS: choco upgrade mingw && pip install delvewheel
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel show {wheel} && delvewheel repair -w {dest_dir} {wheel} --no-mangle-all"

Expand Down
3 changes: 2 additions & 1 deletion python/dftd3/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ pymod = import('python')
python = pymod.find_installation(
get_option('python_version'),
modules: [
'cffi',
'cffi', # Needed for generating the FFI interface
'setuptools', # Needed for running ffi-builder.py
],
)
python_dep = python.dependency(required: true)
Expand Down
7 changes: 4 additions & 3 deletions python/dftd3/test_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def test_optimized_power_damping_noargs():
def test_structure():
"""check if the molecular structure data is working as expected."""

rng = np.random.default_rng()
numbers = np.array(
[6, 7, 6, 7, 6, 6, 6, 8, 7, 6, 8, 7, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
)
Expand Down Expand Up @@ -158,18 +159,18 @@ def test_structure():

# Also check for sane coordinate input
with raises(ValueError, match="Expected tripels"):
Structure(numbers, np.random.rand(7))
Structure(numbers, rng.random(7))

# Construct real molecule
mol = Structure(numbers, positions)

# Try to update a structure with missmatched coordinates
with raises(ValueError, match="Dimension missmatch for positions"):
mol.update(np.random.rand(7))
mol.update(rng.random(7))

# Try to add a missmatched lattice
with raises(ValueError, match="Invalid lattice provided"):
mol.update(positions, np.random.rand(7))
mol.update(positions, rng.random(7))

# Try to update a structure with nuclear fusion coordinates
with raises(RuntimeError, match="Too close interatomic distances found"):
Expand Down
2 changes: 1 addition & 1 deletion python/mesonpep517.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["meson-python", "cffi"]
requires = ["meson-python", "cffi", "setuptools"]
build-backend = "mesonpy"

[project]
Expand Down

0 comments on commit dc0e268

Please sign in to comment.