From 914da898197517dfc7905ddcde2ec02e23f61fde Mon Sep 17 00:00:00 2001 From: "J.A. de Jong - Redu-Sone B.V., ASCEE V.O.F" Date: Tue, 18 Jul 2023 17:06:40 +0200 Subject: [PATCH] build(Testing): Not yet --- .pre-commit-config.yaml | 8 ++++++++ CMakeLists.txt | 1 - pyproject.toml | 7 +++++-- python_src/lasp/__init__.py | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..2ca1bb7 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +--- +repos: + - repo: https://github.com/commitizen-tools/commitizen + rev: master + hooks: + - id: commitizen + - id: commitizen-branch + stages: [push] diff --git a/CMakeLists.txt b/CMakeLists.txt index 92079d6..43173bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,6 @@ cmake_minimum_required (VERSION 3.16) project(LASP LANGUAGES C CXX VERSION 1.0) - set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED) diff --git a/pyproject.toml b/pyproject.toml index a07b3dc..fa45bde 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ dependencies = ["scipy", "numpy", "matplotlib", "appdirs", "dataclasses_json", "h5py", "pybind11"] [build-system] # How pip and other frontends should build this project -requires = ["py-build-cmake~=0.1.8", "setuptools-scm"] +requires = ["py-build-cmake~=0.1.8", "setuptools_scm[toml]>=6.2"] build-backend = "py_build_cmake.build" [tool.py-build-cmake.module] # Where to find the Python module to package @@ -40,4 +40,7 @@ include = ["CMakeLists.txt", "cmake", "cpp_src", "python_src", "img", "scripts", build_type = "Release" source_path = "." build_args = ["-j"] -install_components = ["python_modules", "python_stubs"] +install_components = ["python_modules"] + +[tool.setuptools_scm] +version_file = ["python_src/lasp/_version.py" , "cpp_src/_version.txt"] diff --git a/python_src/lasp/__init__.py b/python_src/lasp/__init__.py index b6f3e90..7cfbdc5 100644 --- a/python_src/lasp/__init__.py +++ b/python_src/lasp/__init__.py @@ -2,10 +2,10 @@ LASP: Library for Acoustic Signal Processing """ +from ._version import * from .lasp_cpp import * import lasp.lasp_cpp from .lasp_common import * -__version__ = lasp_cpp.__version__ # from .lasp_imptube import * # TwoMicImpedanceTube from .lasp_measurement import * # Measurement, scaleBlockSens