Skip to content

Commit 351ea9b

Browse files
authored
Merge pull request #2543 from SCIInstitute/amorris/merge-6.7
Merge ShapeWorks 6.7.0 changes
2 parents 88d77dd + 136b926 commit 351ea9b

10 files changed

Lines changed: 32 additions & 24 deletions

File tree

.github/workflows/build-mac-arm64.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
env:
1313
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
1414
BUILD_TYPE: Release
15+
MACOSX_DEPLOYMENT_TARGET: "12.0"
1516
SW_CLOUD_LOGIN: ${{ secrets.CLOUD_LOGIN }}
1617
CACHE_HOST: ${{ secrets.SSH_HOST }}
1718
GA_MEASUREMENT_ID: ${{ secrets.GA_MEASUREMENT_ID }}
@@ -55,7 +56,7 @@ jobs:
5556
uses: actions/cache/restore@v3
5657
with:
5758
path: /Users/runner/install
58-
key: ${{ runner.os }}-arm64-deps-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }}
59+
key: ${{ runner.os }}-arm64-deps-osx${{ env.MACOSX_DEPLOYMENT_TARGET }}-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }}
5960

6061
- name: Build Dependencies
6162
if: steps.cache-deps-restore.outputs.cache-hit != 'true'
@@ -67,11 +68,11 @@ jobs:
6768
uses: actions/cache/save@v3
6869
with:
6970
path: /Users/runner/install
70-
key: ${{ runner.os }}-arm64-deps-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }}
71+
key: ${{ runner.os }}-arm64-deps-osx${{ env.MACOSX_DEPLOYMENT_TARGET }}-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }}
7172

7273
- name: cmake
7374
shell: bash -l {0}
74-
run: conda activate shapeworks && mkdir build && cd build && cmake -DCMAKE_LIBTOOL=/usr/bin/libtool -DCMAKE_CXX_FLAGS="-g -Wno-enum-constexpr-conversion" -DCMAKE_PREFIX_PATH=$HOME/install -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPython3_ROOT_DIR:FILEPATH=${CONDA_PREFIX} -DUSE_OPENMP=OFF -DBuild_Studio=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/shapeworks-install -DBUILD_DOCUMENTATION=ON -DGA_MEASUREMENT_ID=$GA_MEASUREMENT_ID -DGA_API_SECRET=$GA_API_SECRET ..
75+
run: conda activate shapeworks && mkdir build && cd build && cmake -DCMAKE_LIBTOOL=/usr/bin/libtool -DCMAKE_CXX_FLAGS="-g -Wno-enum-constexpr-conversion" -DCMAKE_OSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET -DCMAKE_PREFIX_PATH=$HOME/install -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPython3_ROOT_DIR:FILEPATH=${CONDA_PREFIX} -DUSE_OPENMP=OFF -DBuild_Studio=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/shapeworks-install -DBUILD_DOCUMENTATION=ON -DGA_MEASUREMENT_ID=$GA_MEASUREMENT_ID -DGA_API_SECRET=$GA_API_SECRET ..
7576

7677
- name: make
7778
shell: bash -l {0}

.github/workflows/build-mac.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
env:
1313
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
1414
BUILD_TYPE: Release
15+
MACOSX_DEPLOYMENT_TARGET: "12.0"
1516
SW_CLOUD_LOGIN: ${{ secrets.CLOUD_LOGIN }}
1617
CACHE_HOST: ${{ secrets.SSH_HOST }}
1718
GA_MEASUREMENT_ID: ${{ secrets.GA_MEASUREMENT_ID }}
@@ -56,7 +57,7 @@ jobs:
5657
uses: actions/cache/restore@v3
5758
with:
5859
path: /Users/runner/install
59-
key: ${{ runner.os }}-intel-deps-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }}
60+
key: ${{ runner.os }}-intel-deps-osx${{ env.MACOSX_DEPLOYMENT_TARGET }}-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }}
6061

6162
- name: Build Dependencies
6263
shell: bash -l {0}
@@ -67,11 +68,11 @@ jobs:
6768
uses: actions/cache/save@v3
6869
with:
6970
path: /Users/runner/install
70-
key: ${{ runner.os }}-intel-deps-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }}
71+
key: ${{ runner.os }}-intel-deps-osx${{ env.MACOSX_DEPLOYMENT_TARGET }}-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }}
7172

7273
- name: cmake
7374
shell: bash -l {0}
74-
run: conda activate shapeworks && mkdir build && cd build && cmake -DCMAKE_LIBTOOL=/usr/bin/libtool -DCMAKE_CXX_FLAGS=-g -DCMAKE_PREFIX_PATH=$HOME/install -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPython3_ROOT_DIR:FILEPATH=${CONDA_PREFIX} -DUSE_OPENMP=OFF -DBuild_Studio=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/shapeworks-install -DBUILD_DOCUMENTATION=OFF -DGA_MEASUREMENT_ID=$GA_MEASUREMENT_ID -DGA_API_SECRET=$GA_API_SECRET ..
75+
run: conda activate shapeworks && mkdir build && cd build && cmake -DCMAKE_LIBTOOL=/usr/bin/libtool -DCMAKE_CXX_FLAGS=-g -DCMAKE_OSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET -DCMAKE_PREFIX_PATH=$HOME/install -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPython3_ROOT_DIR:FILEPATH=${CONDA_PREFIX} -DUSE_OPENMP=OFF -DBuild_Studio=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/shapeworks-install -DBUILD_DOCUMENTATION=OFF -DGA_MEASUREMENT_ID=$GA_MEASUREMENT_ID -DGA_API_SECRET=$GA_API_SECRET ..
7576

7677
- name: make
7778
shell: bash -l {0}

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ cmake_minimum_required(VERSION 3.20)
44
# SHAPEWORKS VERSION
55
###########################################
66
SET(SHAPEWORKS_MAJOR_VERSION 6 CACHE INTERNAL "Major version number" FORCE)
7-
SET(SHAPEWORKS_MINOR_VERSION 7 CACHE INTERNAL "Minor version number" FORCE)
7+
SET(SHAPEWORKS_MINOR_VERSION 8 CACHE INTERNAL "Minor version number" FORCE)
88
SET(SHAPEWORKS_PATCH_VERSION 0 CACHE INTERNAL "Patch version number" FORCE)
9-
SET(SHAPEWORKS_VERSION_STRING "6.7.0-dev")
9+
SET(SHAPEWORKS_VERSION_STRING "6.8.0-dev")
1010
SET(SHAPEWORKS_VERSION "${SHAPEWORKS_MAJOR_VERSION}.${SHAPEWORKS_MINOR_VERSION}.${SHAPEWORKS_PATCH_VERSION}")
1111

1212
# First, check that files were checked out properly using git-lfs

Installation/install_python_module.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Ensures conda Python module is able to locate correct shapeworks_py binary module.
55

66

7-
CONDA_INSTALL_DIR=`pip show shapeworks | grep Location | awk '{print $2}'`/shapeworks
7+
CONDA_INSTALL_DIR=`python -m pip show shapeworks | grep Location | awk '{print $2}'`/shapeworks
88

99
# check if $CONDA_INSTALL_DIR is under $CONDA_PREFIX
1010
if [[ "$CONDA_INSTALL_DIR" != "$CONDA_PREFIX"* ]]; then

Libs/Application/Job/PythonWorker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class PythonWorker : public QObject {
1818
Q_OBJECT
1919

2020
public:
21-
constexpr static const char* python_api_version = "6.7";
21+
constexpr static const char* python_api_version = "6.8";
2222

2323
PythonWorker();
2424
~PythonWorker();

Python/shapeworks/shapeworks/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def compute_line_indices(n, is_closed=True):
172172

173173

174174
def get_api_version():
175-
return "6.7"
175+
return "6.8"
176176

177177

178178
def set_sw_logger(log_object):

devenv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# compiled portion of the Python bindings).
1212
#
1313

14-
SW_MAJOR_VERSION=6.7
14+
SW_MAJOR_VERSION=6.8
1515

1616
(return 0 2>/dev/null) && sourced=1 || sourced=0
1717

docs/dev/release-process.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ SET(SHAPEWORKS_VERSION "${SHAPEWORKS_MAJOR_VERSION}.${SHAPEWORKS_MINOR_VERSION}.
1919

2020
TODO - This should be automated from a single place
2121

22-
- `Studio/Python/PythonWorker.h`
22+
- `Libs/Application/Job/PythonWorker.h`
2323

2424
```
2525
constexpr static const char* python_api_version = "6.5";
@@ -46,6 +46,12 @@ python -c "import sys; print(sys.prefix)" > "%USERPROFILE%\.shapeworks\python_ho
4646
echo %PATH% > "%USERPROFILE%\.shapeworks\path_6.5.txt"
4747
```
4848

49+
- `devenv.sh`
50+
51+
```
52+
SW_MAJOR_VERSION=6.5
53+
```
54+
4955
* Update Release Notes
5056

5157
- Update `docs/about/release_notes.md` with the new release notes

install_shapeworks.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ call .\Installation\install_python_module.bat || goto :error
8585
call .\Installation\conda_env_setup.bat || goto :error
8686

8787
md "%USERPROFILE%\.shapeworks"
88-
python -c "import sys; print('\n'.join(sys.path))" > "%USERPROFILE%\.shapeworks\python_path_6.7.txt"
89-
python -c "import sys; print(sys.prefix)" > "%USERPROFILE%\.shapeworks\python_home_6.7.txt"
90-
echo %PATH% > "%USERPROFILE%\.shapeworks\path_6.7.txt"
88+
python -c "import sys; print('\n'.join(sys.path))" > "%USERPROFILE%\.shapeworks\python_path_6.8.txt"
89+
python -c "import sys; print(sys.prefix)" > "%USERPROFILE%\.shapeworks\python_home_6.8.txt"
90+
echo %PATH% > "%USERPROFILE%\.shapeworks\path_6.8.txt"
9191
call conda info
9292

9393
REM === Validating installation ===

install_shapeworks.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Installs conda environment for building ShapeWorks
33
#
44

5-
SW_MAJOR_VERSION=6.7
5+
SW_MAJOR_VERSION=6.8
66

77
# Set up logging
88
INSTALL_LOG="install_shapeworks_$(date +%Y%m%d_%H%M%S).log"
@@ -173,7 +173,7 @@ function install_conda() {
173173
if [[ $(uname -s) == "Darwin" ]] && [[ $(uname -m) == "x86_64" ]]; then
174174
# Intel Mac - use older versions with NumPy 1.x
175175
if ! python -m light_the_torch install torch==2.2.2 torchaudio==2.2.2 torchvision==0.17.2; then return 1; fi
176-
pip install "numpy<2"
176+
python -m pip install "numpy<2"
177177
else
178178
# Apple Silicon, Linux, Windows - use latest with NumPy 2.x support
179179
if ! python -m light_the_torch install torch==2.8.0 torchaudio==2.8.0 torchvision==0.23.0; then return 1; fi
@@ -183,13 +183,13 @@ function install_conda() {
183183
# open3d needs to be installed differently on each platform so it's not part of python_requirements.txt
184184
OPEN3D_INSTALLED=NO
185185
if [[ "$(uname)" == "Linux" ]]; then
186-
if pip install open3d-cpu==0.19.0; then
186+
if python -m pip install open3d-cpu==0.19.0; then
187187
OPEN3D_INSTALLED=YES
188188
else
189189
echo "WARNING: open3d-cpu could not be installed. Network analysis features will not be available."
190190
fi
191191
elif [[ "$(uname)" == "Darwin" ]]; then
192-
if pip install open3d==0.19.0; then
192+
if python -m pip install open3d==0.19.0; then
193193
OPEN3D_INSTALLED=YES
194194
if [[ "$(uname -m)" == "arm64" ]]; then
195195
pushd $CONDA_PREFIX/lib/python3.12/site-packages/open3d/cpu
@@ -202,7 +202,7 @@ function install_conda() {
202202
echo "WARNING: open3d could not be installed. Network analysis features will not be available."
203203
fi
204204
else
205-
if pip install open3d==0.19.0; then
205+
if python -m pip install open3d==0.19.0; then
206206
OPEN3D_INSTALLED=YES
207207
else
208208
echo "WARNING: open3d could not be installed. Network analysis features will not be available."
@@ -211,9 +211,9 @@ function install_conda() {
211211

212212
for package in DataAugmentationUtilsPackage DatasetUtilsPackage MONAILabelPackage DeepSSMUtilsPackage DocumentationUtilsPackage ShapeCohortGenPackage shapeworks ; do
213213
if [[ -e Python/${package}.tar.gz ]] ; then
214-
if ! pip install Python/${package}.tar.gz; then return 1; fi
214+
if ! python -m pip install Python/${package}.tar.gz; then return 1; fi
215215
else
216-
if ! pip install Python/${package}; then return 1; fi
216+
if ! python -m pip install Python/${package}; then return 1; fi
217217
fi
218218
done
219219

@@ -270,7 +270,7 @@ if install_conda; then
270270
conda list
271271

272272
echo "Pip installed packages:"
273-
pip list
273+
python -m pip list
274274

275275
conda clean -t -y
276276

0 commit comments

Comments
 (0)