From c46bb1021cc754e594f7ea54bb17d48613cfbe26 Mon Sep 17 00:00:00 2001 From: frheault Date: Mon, 24 Apr 2023 11:18:14 -0400 Subject: [PATCH 01/17] change hash --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 81a2c9a..f98096d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,7 @@ install_requires = setuptools_scm deepdiff nibabel >= 3 - dipy@git+https://git@github.com/arokem/dipy@11a94c0fcf9b3 + dipy@git+https://git@github.com/frheault/dipy@371669b5e fury [options.extras_require] From 80773e8841384c5fa31d3088b7176965bcea347f Mon Sep 17 00:00:00 2001 From: frheault Date: Mon, 24 Apr 2023 11:20:19 -0400 Subject: [PATCH 02/17] hash with file --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index f98096d..4628501 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,7 @@ install_requires = setuptools_scm deepdiff nibabel >= 3 - dipy@git+https://git@github.com/frheault/dipy@371669b5e + dipy@git+https://git@github.com/frheault/dipy@bb8d511bb fury [options.extras_require] From aac945b635cfc4b0af84f72d166c9985c4e61f46 Mon Sep 17 00:00:00 2001 From: frheault Date: Mon, 24 Apr 2023 11:29:36 -0400 Subject: [PATCH 03/17] revert packaging --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 4628501..44e35fd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,7 @@ install_requires = setuptools_scm deepdiff nibabel >= 3 - dipy@git+https://git@github.com/frheault/dipy@bb8d511bb + dipy@git+https://git@github.com/frheault/dipy@1843d3046 fury [options.extras_require] From 25f1e34314861635dfdf1531861365d7a4c7a29a Mon Sep 17 00:00:00 2001 From: frheault Date: Mon, 24 Apr 2023 11:31:39 -0400 Subject: [PATCH 04/17] revert src --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 44e35fd..4c4b6c4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,7 @@ install_requires = setuptools_scm deepdiff nibabel >= 3 - dipy@git+https://git@github.com/frheault/dipy@1843d3046 + dipy@git+https://git@github.com/frheault/dipy@0c698d22acf fury [options.extras_require] From 0f233e84a789e6a6be83169dd963d036054c8cbc Mon Sep 17 00:00:00 2001 From: frheault Date: Mon, 8 May 2023 13:19:05 -0400 Subject: [PATCH 05/17] update version --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 4c4b6c4..f64e70d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,7 @@ install_requires = setuptools_scm deepdiff nibabel >= 3 - dipy@git+https://git@github.com/frheault/dipy@0c698d22acf + dipy@git+https://git@github.com/frheault/dipy@8c2f1d808 fury [options.extras_require] From c077d24f854343ad2990e39224b49605229bb969 Mon Sep 17 00:00:00 2001 From: frheault Date: Mon, 8 May 2023 13:31:03 -0400 Subject: [PATCH 06/17] update requirements --- setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index f64e70d..32527f4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,7 +28,8 @@ setup_requires = install_requires = setuptools_scm deepdiff - nibabel >= 3 + nibabel >= 5 + numpy >= 1.22 dipy@git+https://git@github.com/frheault/dipy@8c2f1d808 fury From 19be116ec9894f9e31085ec997bf104376bcec73 Mon Sep 17 00:00:00 2001 From: frheault Date: Mon, 8 May 2023 13:32:47 -0400 Subject: [PATCH 07/17] update workflow --- .github/workflows/python-package.yml | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 2ead153..950a7c4 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v2 diff --git a/setup.cfg b/setup.cfg index 32527f4..8652321 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,7 +21,7 @@ include_package_data = True [options] -python_requires = >=3.7 +python_requires = >=3.8 setup_requires = packaging >= 19.0 cython >= 0.29 From 5215c02483f55ee31d924ba45511fd21b1f7cdac Mon Sep 17 00:00:00 2001 From: frheault Date: Sun, 23 Jul 2023 14:48:42 -0400 Subject: [PATCH 08/17] Micro diff --- setup.cfg | 2 +- trx/trx_file_memmap.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 8652321..3761fa9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,7 +30,7 @@ install_requires = deepdiff nibabel >= 5 numpy >= 1.22 - dipy@git+https://git@github.com/frheault/dipy@8c2f1d808 + dipy@git+https://git@github.com/frheault/dipy@48c381c fury [options.extras_require] diff --git a/trx/trx_file_memmap.py b/trx/trx_file_memmap.py index e2cbccb..014356e 100644 --- a/trx/trx_file_memmap.py +++ b/trx/trx_file_memmap.py @@ -1089,7 +1089,10 @@ def _create_trx_from_pointer( shape=(trx.header["NB_STREAMLINES"]+1,), dtype=ext[1:], ) - lengths = _compute_lengths(offsets) + if offsets[-1] != 0: + lengths = _compute_lengths(offsets) + else: + lengths = [0] elif folder == "dps": nb_scalar = size / trx.header["NB_STREAMLINES"] if not nb_scalar.is_integer() or nb_scalar != dim: From a3a9a93e8bfac3b5066258702a047fabb7c0ef46 Mon Sep 17 00:00:00 2001 From: frheault Date: Fri, 6 Oct 2023 11:56:09 -0400 Subject: [PATCH 09/17] Use case for Windows --- setup.cfg | 2 -- trx/trx_file_memmap.py | 11 +++++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index 8652321..2df1823 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,8 +30,6 @@ install_requires = deepdiff nibabel >= 5 numpy >= 1.22 - dipy@git+https://git@github.com/frheault/dipy@8c2f1d808 - fury [options.extras_require] doc = sphinx <= 6 diff --git a/trx/trx_file_memmap.py b/trx/trx_file_memmap.py index e2cbccb..966264f 100644 --- a/trx/trx_file_memmap.py +++ b/trx/trx_file_memmap.py @@ -1065,8 +1065,15 @@ def _create_trx_from_pointer( ext = ".bool" mem_adress, size = dict_pointer_size[elem_filename] - if root is not None and folder.startswith(root.rstrip("/")): - folder = folder.replace(root, "").lstrip("/") + if root is not None: + # This is for Unix + if os.name != 'nt' and folder.startswith(root.rstrip("/")): + folder = folder.replace(root, "").lstrip("/") + # These two are for Windows + elif os.path.isdir(folder) and os.path.basename(folder) in ['dpg', 'dpv', 'dps']: + folder = os.path.basename(folder) + else: + folder = '' # Parse/walk the directory tree if base == "positions" and folder == "": From a206b9fd5afb8b01bab965300b82bb8f3a0bf3e0 Mon Sep 17 00:00:00 2001 From: Francois Rheault Date: Fri, 6 Oct 2023 13:06:44 -0400 Subject: [PATCH 10/17] Update .github/workflows/python-package.yml Co-authored-by: Ariel Rokem --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 950a7c4..44217db 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v2 From a524251297a58431634e50f8488977005dc725fc Mon Sep 17 00:00:00 2001 From: frheault Date: Fri, 6 Oct 2023 15:59:55 -0400 Subject: [PATCH 11/17] astroid --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 7b1d7e5..4d2e363 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,6 +35,7 @@ install_requires = [options.extras_require] doc = sphinx <= 6 + astroid<=2.15.8 pydata-sphinx-theme sphinx-autoapi numpydoc From 56e58eb28403f159a861ff578a6239545754aec9 Mon Sep 17 00:00:00 2001 From: frheault Date: Fri, 6 Oct 2023 16:29:31 -0400 Subject: [PATCH 12/17] Leave sphinx free --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 4d2e363..f0c4cd7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,7 +34,7 @@ install_requires = fury [options.extras_require] -doc = sphinx <= 6 +doc = sphinx astroid<=2.15.8 pydata-sphinx-theme sphinx-autoapi From 6422dbacce7f50822779ffb3831e58c1bb998036 Mon Sep 17 00:00:00 2001 From: frheault Date: Fri, 6 Oct 2023 16:34:47 -0400 Subject: [PATCH 13/17] Flip order --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index f0c4cd7..3622ae7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,8 +34,8 @@ install_requires = fury [options.extras_require] -doc = sphinx - astroid<=2.15.8 +doc = astroid==2.15.8 + sphinx pydata-sphinx-theme sphinx-autoapi numpydoc From afb81c4d59cf34ee6bb09a7305c066c5de5ac4f4 Mon Sep 17 00:00:00 2001 From: frheault Date: Sat, 7 Oct 2023 09:08:39 -0400 Subject: [PATCH 14/17] Remove authors --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c41e365..93ace1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,6 +10,3 @@ __version__ = "{version}" """ fallback_version = "0.0" local_scheme = "no-local-version" -authors = [ - "Francois Rheault @FrancoisRheault", -] From 857e0327501bfcaa54b4f6250daf7789cb2ec831 Mon Sep 17 00:00:00 2001 From: frheault Date: Sat, 7 Oct 2023 09:19:46 -0400 Subject: [PATCH 15/17] Add OS --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 44217db..ad34443 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: python-version: ["3.8", "3.9", "3.10", "3.11"] - + os: [ubuntu-latest, windows-latest, macos-latest] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} From 6361a2ea98a02a749994797148d70c3d4ed68cfe Mon Sep 17 00:00:00 2001 From: frheault Date: Sat, 7 Oct 2023 09:24:11 -0400 Subject: [PATCH 16/17] Remove whitespace --- scripts/tff_manipulate_datatype.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/tff_manipulate_datatype.py b/scripts/tff_manipulate_datatype.py index 25b46f3..340b787 100644 --- a/scripts/tff_manipulate_datatype.py +++ b/scripts/tff_manipulate_datatype.py @@ -78,7 +78,6 @@ def main(): dtype_dict['positions'] = np.dtype(args.positions_dtype) if args.offsets_dtype: dtype_dict['offsets'] = np.dtype(args.offsets_dtype) - if args.dpv: dtype_dict['dpv'] = {} for name, dtype in args.dpv: From 99631da76edc3307ddc37dc14e58fa05170d49e5 Mon Sep 17 00:00:00 2001 From: frheault Date: Sat, 7 Oct 2023 09:27:21 -0400 Subject: [PATCH 17/17] Indentation error --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ad34443..822b770 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: python-version: ["3.8", "3.9", "3.10", "3.11"] - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest, windows-latest, macos-latest] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }}