From 7a408501ac2ab8d96a4a56426b571e6b94795a68 Mon Sep 17 00:00:00 2001 From: full-Strix Date: Wed, 6 Mar 2024 10:38:07 +0100 Subject: [PATCH 1/9] build: bump version --- CHANGELOG.md | 10 ++++++++++ commit/info.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e4bacdf..93ebcfbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ # Change Log ### All notable changes to `COMMIT` will be documented in this file. +## `v2.1.1`
_2024-03-06_ +### 🐛Fixed +- Fix `set_thread` isotropic compartment voxel distribution + +### ✨Added +- Add `do_reweighting` parameter to `save_results()` + +--- +--- + ## `v2.1.0`
_2024-01-22_ ### ✨Added - Work In Progress (WIP) models diff --git a/commit/info.py b/commit/info.py index 7873725b..f9588353 100644 --- a/commit/info.py +++ b/commit/info.py @@ -3,7 +3,7 @@ # Format version as expected by setup.py (string of form "X.Y.Z") _version_major = 2 _version_minor = 1 -_version_micro = 0 +_version_micro = 1 _version_extra = '' #'.dev' __version__ = "%s.%s.%s%s" % (_version_major,_version_minor,_version_micro,_version_extra) From 3fa35095bd9bd376c10cf6f2df4b5293066f182d Mon Sep 17 00:00:00 2001 From: nightwnvol Date: Wed, 13 Mar 2024 12:44:09 +0100 Subject: [PATCH 2/9] ci: add run_tests workflow --- .github/workflows/run_tests.yml | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/run_tests.yml diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml new file mode 100644 index 00000000..1a83f8d6 --- /dev/null +++ b/.github/workflows/run_tests.yml @@ -0,0 +1,34 @@ +name: Run tests +run-name: Run tests - ${{ github.sha }} +on: push +jobs: + run_test: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, macos-14] + py: [3.8, 3.9, 3.10, 3.11, 3.12] + name: Python ${{ matrix.py }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + - name: Download data + working-directory: tests + run: | + curl -L -O https://github.com/daducci/COMMIT/wiki/files/demo01_data.zip + curl -L -O https://github.com/daducci/COMMIT/wiki/files/demo01_fibers.tck + 7z x demo01_data.zip + mv demo01_fibers.tck demo01_data + - name: Set up Python ${{ matrix.py }} + uses: actions/setup-python@v5.0.0 + with: + python-version: ${{ matrix.py }} + - name: Install dmri-commit + run: pip install . --no-cache-dir --force-reinstall + - name: Run tests + working-directory: tests + run: | + echo "Run tests" + - name: Done + run: | + echo "All tests passed!" From 5489d449eed494dbfe1e94d63de4c2ee4d77d221 Mon Sep 17 00:00:00 2001 From: nightwnvol Date: Wed, 13 Mar 2024 12:55:05 +0100 Subject: [PATCH 3/9] fix: python version format --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 1a83f8d6..3b4b3f24 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -6,7 +6,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, macos-14] - py: [3.8, 3.9, 3.10, 3.11, 3.12] + py: ['3.8', '3.9', '3.10', '3.11', '3.12'] name: Python ${{ matrix.py }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: From 755d3e2e2dae682570c2ca9ff35f879b73f9df98 Mon Sep 17 00:00:00 2001 From: nightwnvol Date: Wed, 13 Mar 2024 13:34:58 +0100 Subject: [PATCH 4/9] ci: exclude python 3.8 and 3.9 with macos arm64 --- .github/workflows/run_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 3b4b3f24..21e962c7 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -20,6 +20,7 @@ jobs: 7z x demo01_data.zip mv demo01_fibers.tck demo01_data - name: Set up Python ${{ matrix.py }} + if: ! (startsWith(matrix.py, '3.8') || startsWith(matrix.py, '3.9')) && startsWith(matrix.os, 'macos-14') uses: actions/setup-python@v5.0.0 with: python-version: ${{ matrix.py }} From a384a00d9558630df6fb3b4309be45e12682e5a6 Mon Sep 17 00:00:00 2001 From: nightwnvol Date: Wed, 13 Mar 2024 13:37:32 +0100 Subject: [PATCH 5/9] ci: fix condition syntax --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 21e962c7..fc33f82c 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -20,7 +20,7 @@ jobs: 7z x demo01_data.zip mv demo01_fibers.tck demo01_data - name: Set up Python ${{ matrix.py }} - if: ! (startsWith(matrix.py, '3.8') || startsWith(matrix.py, '3.9')) && startsWith(matrix.os, 'macos-14') + if: (! ((startsWith(matrix.py, '3.8') || startsWith(matrix.py, '3.9')) && startsWith(matrix.os, 'macos-14'))) uses: actions/setup-python@v5.0.0 with: python-version: ${{ matrix.py }} From 659e6af93848186f7a9f42e1fcd99385fee98736 Mon Sep 17 00:00:00 2001 From: nightwnvol Date: Wed, 13 Mar 2024 13:40:10 +0100 Subject: [PATCH 6/9] ci: update run_tests workflow --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index fc33f82c..bc8bd187 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -8,6 +8,7 @@ jobs: os: [ubuntu-latest, macos-latest, macos-14] py: ['3.8', '3.9', '3.10', '3.11', '3.12'] name: Python ${{ matrix.py }} on ${{ matrix.os }} + if: (! ((startsWith(matrix.py, '3.8') || startsWith(matrix.py, '3.9')) && startsWith(matrix.os, 'macos-14'))) runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -20,7 +21,6 @@ jobs: 7z x demo01_data.zip mv demo01_fibers.tck demo01_data - name: Set up Python ${{ matrix.py }} - if: (! ((startsWith(matrix.py, '3.8') || startsWith(matrix.py, '3.9')) && startsWith(matrix.os, 'macos-14'))) uses: actions/setup-python@v5.0.0 with: python-version: ${{ matrix.py }} From 445d5c61f96971f42c457ebdb7ab6c35f34907fd Mon Sep 17 00:00:00 2001 From: nightwnvol Date: Wed, 13 Mar 2024 13:43:44 +0100 Subject: [PATCH 7/9] ci: refactor matrix strategy --- .github/workflows/run_tests.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index bc8bd187..6b5aa503 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -5,10 +5,23 @@ jobs: run_test: strategy: matrix: - os: [ubuntu-latest, macos-latest, macos-14] - py: ['3.8', '3.9', '3.10', '3.11', '3.12'] + config: + [ + {os: ubuntu-latest, py: '3.8'}, + {os: ubuntu-latest, py: '3.9'}, + {os: ubuntu-latest, py: '3.10'}, + {os: ubuntu-latest, py: '3.11'}, + {os: ubuntu-latest, py: '3.12'}, + {os: macos-latest, py: '3.8'}, + {os: macos-latest, py: '3.9'}, + {os: macos-latest, py: '3.10'}, + {os: macos-latest, py: '3.11'}, + {os: macos-latest, py: '3.12'}, + {os: macos-14, py: '3.10'}, + {os: macos-14, py: '3.11'}, + {os: macos-14, py: '3.12'}, + ] name: Python ${{ matrix.py }} on ${{ matrix.os }} - if: (! ((startsWith(matrix.py, '3.8') || startsWith(matrix.py, '3.9')) && startsWith(matrix.os, 'macos-14'))) runs-on: ${{ matrix.os }} steps: - name: Checkout From 1192ea1d4c109bc05ac479bba3503e355c0f6bf8 Mon Sep 17 00:00:00 2001 From: nightwnvol Date: Wed, 13 Mar 2024 14:51:04 +0100 Subject: [PATCH 8/9] ci: update matrix variables --- .github/workflows/run_tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 6b5aa503..fe253b47 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -19,10 +19,10 @@ jobs: {os: macos-latest, py: '3.12'}, {os: macos-14, py: '3.10'}, {os: macos-14, py: '3.11'}, - {os: macos-14, py: '3.12'}, + {os: macos-14, py: '3.12'} ] - name: Python ${{ matrix.py }} on ${{ matrix.os }} - runs-on: ${{ matrix.os }} + name: Python ${{ matrix.config.py }} on ${{ matrix.config.os }} + runs-on: ${{ matrix.config.os }} steps: - name: Checkout uses: actions/checkout@v4.1.1 @@ -33,10 +33,10 @@ jobs: curl -L -O https://github.com/daducci/COMMIT/wiki/files/demo01_fibers.tck 7z x demo01_data.zip mv demo01_fibers.tck demo01_data - - name: Set up Python ${{ matrix.py }} + - name: Set up Python ${{ matrix.config.py }} uses: actions/setup-python@v5.0.0 with: - python-version: ${{ matrix.py }} + python-version: ${{ matrix.config.py }} - name: Install dmri-commit run: pip install . --no-cache-dir --force-reinstall - name: Run tests From ea6e9e7d000d185881cae1b3b28e2d3678ceaf15 Mon Sep 17 00:00:00 2001 From: nightwnvol Date: Wed, 13 Mar 2024 14:55:20 +0100 Subject: [PATCH 9/9] ci: remove python 3.12 from tests --- .github/workflows/run_tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index fe253b47..4d48a0e6 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -5,21 +5,22 @@ jobs: run_test: strategy: matrix: + # NOTE: Python 3.12 is not supported yet config: [ {os: ubuntu-latest, py: '3.8'}, {os: ubuntu-latest, py: '3.9'}, {os: ubuntu-latest, py: '3.10'}, {os: ubuntu-latest, py: '3.11'}, - {os: ubuntu-latest, py: '3.12'}, + # {os: ubuntu-latest, py: '3.12'}, {os: macos-latest, py: '3.8'}, {os: macos-latest, py: '3.9'}, {os: macos-latest, py: '3.10'}, {os: macos-latest, py: '3.11'}, - {os: macos-latest, py: '3.12'}, + # {os: macos-latest, py: '3.12'}, {os: macos-14, py: '3.10'}, {os: macos-14, py: '3.11'}, - {os: macos-14, py: '3.12'} + # {os: macos-14, py: '3.12'} ] name: Python ${{ matrix.config.py }} on ${{ matrix.config.os }} runs-on: ${{ matrix.config.os }}