Skip to content

Commit

Permalink
Merge pull request #392 from SCM-NV/submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
BvB93 authored Oct 6, 2023
2 parents 7efabe0 + 2db7a99 commit 6a604da
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:

jobs:
build_wheels:
name: Build wheels cp38-${{ matrix.buildplat[1] }}
name: Build wheels cp39-${{ matrix.buildplat[1] }}
runs-on: ${{ matrix.buildplat[0] }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: cp38-${{ matrix.buildplat[1] }}
CIBW_BUILD: cp39-${{ matrix.buildplat[1] }}
CIBW_MANYLINUX_AARCH64_IMAGE: "ghcr.io/nlesc-nano/manylinux2014_aarch64-qmflows:${{ env.TAG }}"
CIBW_MANYLINUX_X86_64_IMAGE: "ghcr.io/nlesc-nano/manylinux2014_x86_64-qmflows:${{ env.TAG }}"

Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
version: ["3.8", "3.9", "3.10", "3.11"]
version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand All @@ -145,17 +145,23 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: cp38-manylinux_x86_64
CIBW_BUILD: cp39-manylinux_x86_64
CIBW_MANYLINUX_X86_64_IMAGE: "ghcr.io/nlesc-nano/manylinux2014_x86_64-qmflows:${{ env.TAG }}"

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version }}

# TODO: Remove the manual h5py building once h5py 3.10 has been released with cp312 wheels
- name: Install dependencies
run: |
WHL_NAME=$(python scripts/get_whl_name.py wheelhouse manylinux2014_x86_64)
if [[ "${{ matrix.version }}" == '3.12' ]]; then
sudo apt-get update
sudo apt-get install libhdf5-dev
pip install git+https://github.com/h5py/h5py@89e1e2e78d7fb167d2a67c9a8354ced6491160fe
fi
pip install "$WHL_NAME"[test]
- name: Python info
Expand Down
1 change: 1 addition & 0 deletions libint/py_compute_integrals.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define PY_SSIZE_T_CLEAN
#define Py_LIMITED_API 0x03080000
#define NPY_NO_DEPRECATED_API NPY_1_17_API_VERSION
#define NPY_TARGET_VERSION NPY_1_17_API_VERSION
#include <Python.h>
#include <numpy/arrayobject.h>

Expand Down
3 changes: 1 addition & 2 deletions nanoqm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from . import _monkey_patch

from ._version import __version__ as __version__, __version_tuple__ as __version_tuple__
from ._version_info import version_info as version_info
from ._logger import logger as logger

from .analysis import (
Expand All @@ -24,7 +23,7 @@
del _monkey_patch

__all__ = [
'__version__', '__version_tuple__', 'version_info', 'logger',
'__version__', '__version_tuple__', 'logger',
'autocorrelate', 'calculate_couplings_levine', 'calculate_mos',
'compute_overlaps_for_coupling', 'convolute', 'dephasing',
'func_conv', 'gauss_function', 'lazy_couplings',
Expand Down
11 changes: 0 additions & 11 deletions nanoqm/_version_info.py

This file was deleted.

4 changes: 2 additions & 2 deletions nanoqm/workflows/input_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ def add_cell_parameters(self) -> None:
for s in (self.general.cp2k_settings_main, self.general.cp2k_settings_guess):
if self.general.file_cell_parameters is None:
s.cell_parameters = self.general.cell_parameters
s.cell_angles = None
s.cell_angles = self.general.cell_angles
else:
s.cell_parameters = None
s.cell_angles = None
s.cell_angles = None

def add_periodic(self) -> None:
"""Add the keyword for the periodicity of the system."""
Expand Down
5 changes: 4 additions & 1 deletion nanoqm/workflows/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ def validate(self, data: Any, **kwargs: Any) -> Any:
"periodic": any_lambda(("none", "x", "y", "z", "xy", "xy", "yz", "xyz")),

# Specify the angles between the vectors defining the unit cell
Optional("cell_angles", default=None): list,
Optional("cell_angles", default=None): Or(
None,
lambda xs: isinstance(xs, list) and len(xs) == 3 and all(isinstance(i, Real) for i in xs),
),

# Path to the folder containing the basis set specifications
Optional(
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ per-file-ignores = [

[tool.cibuildwheel]
build = [
"cp38-manylinux_x86_64",
"cp38-manylinux-aarch64",
"cp38-macosx_x86_64",
"cp38-macosx_arm64",
"cp39-manylinux_x86_64",
"cp39-manylinux-aarch64",
"cp39-macosx_x86_64",
"cp39-macosx_arm64",
]
build-verbosity = "3"
before-all = "cp licenses/LICENSE_LIBHDF5.txt licenses/LICENSE_LIBINT2.txt ."
build-frontend = "build"

[tool.cibuildwheel.linux]
environment = { QMFLOWS_INCLUDEDIR="", QMFLOWS_LIBDIR="", CFLAGS="-Werror", LDFLAGS="-Wl,--strip-debug" }
Expand All @@ -147,5 +147,5 @@ repair-wheel-command = [
]

[[tool.cibuildwheel.overrides]]
select = "cp38-macosx_arm64"
select = "cp39-macosx_arm64"
environment = { QMFLOWS_INCLUDEDIR="", QMFLOWS_LIBDIR="", LDFLAGS="-Wl", MACOSX_DEPLOYMENT_TARGET="11" }
2 changes: 1 addition & 1 deletion test/test_files/input_fast_test_derivative_couplings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cp2k_general_settings:
potential: "GTH-PBE"
basis: "DZVP-MOLOPT-SR-GTH"
cell_parameters: 10.0
cell_angles: [90.0, 90.0, 90.0]
cell_angles: null
periodic: none
executable: cp2k.ssmp

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ cp2k_general_settings:
basis: "DZVP-MOLOPT-SR-GTH"
potential: "GTH-PBE"
cell_parameters: 28.0
cell_angles: [90.0, 90.0, 90.0]
periodic: xyz
executable: cp2k.ssmp

Expand Down
7 changes: 0 additions & 7 deletions test/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,3 @@ def test_dev_version(is_release: bool) -> None:
return None
version = Version(nanoqm.__version__)
assertion.not_(version.is_devrelease)


@pytest.mark.parametrize("name", ["major", "minor", "micro"])
def test_version_info(name: str) -> None:
attr = getattr(nanoqm.version_info, name)
assertion.isinstance(attr, int)
assertion.ge(attr, 0)

0 comments on commit 6a604da

Please sign in to comment.