From 3a7fb2b32fbbff00d98709978a4f05017cee2f94 Mon Sep 17 00:00:00 2001 From: Mike S Wang <32841762+MikeSWang@users.noreply.github.com> Date: Tue, 10 Sep 2024 08:45:51 -0700 Subject: [PATCH] ENH(ci): Add and update deployment scripts --- .gitignore | 1 + deploy/dev/enh_codee.sh | 16 ++++++++++++++++ deploy/pkg/prerelease_ops.sh | 4 +++- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 deploy/dev/enh_codee.sh diff --git a/.gitignore b/.gitignore index c7598c22..b43133fb 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,7 @@ docs/source/Doxyfile.conf.bak ## CI generated deploy/pkg/patches/** +deploy/dev/*.json ## Jupyter Notebook .ipynb_checkpoints diff --git a/deploy/dev/enh_codee.sh b/deploy/dev/enh_codee.sh new file mode 100644 index 00000000..bab5cc2d --- /dev/null +++ b/deploy/dev/enh_codee.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# @file enh_codee.sh +# @author Mike S Wang +# @brief Improve code quality with Codee. +# @note Requires ``bear`` (e.g. from conda-forge) and ``codee``. +# + +THIS_DIR="$(dirname -- "${BASH_SOURCE[0]}")" + +make cppclean + +bear --output "${THIS_DIR}/compile_commands.json" -- \ + make -j cppappbuild useomp=true + +codee checks --config "${THIS_DIR}/compile_commands.json" diff --git a/deploy/pkg/prerelease_ops.sh b/deploy/pkg/prerelease_ops.sh index 4ef0b5fa..91a184c5 100755 --- a/deploy/pkg/prerelease_ops.sh +++ b/deploy/pkg/prerelease_ops.sh @@ -6,8 +6,10 @@ # THIS_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" -CONFIG_FILE="${THIS_DIR}/../../.pyproject.toml" +ROOT_DIR="${THIS_DIR}/../.." + export PYTHONPATH="${PYTHONPATH}:${THIS_DIR}" +CONFIG_FILE="${ROOT_DIR}/.pyproject.toml" semantic-release -v --config ${CONFIG_FILE} changelog 2> /dev/null semantic-release -v --config ${CONFIG_FILE} --noop version # 2> /dev/null