Skip to content

Commit

Permalink
Drop python 3.8 support, add 3.12, deal with numpy 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wtclarke committed Jul 3, 2024
1 parent d3add68 commit 6f0f176
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: [ "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
with:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
This document contains the Spec2nii release history in reverse chronological order.

0.8.0 (Wednesday 3rd July 2024)
-------------------------------
- Dropped support for Python 3.8 (EOL imminent), added support and testing for 3.12.
- Compatibility with Numpy 2.0

0.7.4 (Thursday 18th April 2024)
--------------------------------
- Refinements and improvements to the GE SVS pipeline from Mark Mikkelsen.
Expand Down
8 changes: 4 additions & 4 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies:
- numpy
- numpy>=1.26
- nibabel
- pydicom
- pyMapVBVD>=0.5.2
- scipy
- pyMapVBVD>=0.6.0
- scipy==1.13.*
- brukerapi>=0.1.8
- pandas
- nifti-mrs>=1.1.1
- nifti-mrs>=1.3.0
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
install_requires=install_requires,
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent"],
python_requires='>=3.8',
python_requires='>=3.9',
entry_points={"console_scripts": [
"spec2nii = spec2nii.spec2nii:main"]},
package_data={'spec2nii': ['bruker_properties.json',
Expand Down
4 changes: 2 additions & 2 deletions spec2nii/Philips/philips_dcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def svs_or_CSI(img):
if img.image_shape is None \
and img.dcm_data.VolumeLocalizationTechnique == 'NONE':
return 'FID'
elif np.product(img.image_shape) > 1.0:
elif np.prod(img.image_shape) > 1.0:
return 'CSI'
else:
return 'SVS'
Expand All @@ -53,7 +53,7 @@ def svs_or_CSI(img):
if img.image_shape is None \
and img.dcm_data.VolumeLocalizationTechnique == 'NONE':
return 'FID'
elif np.product([columns, rows, slices]) > 1.0:
elif np.prod([columns, rows, slices]) > 1.0:
return 'CSI'
else:
return 'SVS'
Expand Down
2 changes: 1 addition & 1 deletion spec2nii/uih.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def svs_or_CSI(img):
"""Identify from the headers whether data is CSI or SVS."""
# Currently this only looks in-plane. I don't have examples of CSI from
# UIH.
if np.product(img.image_shape) > 1.0:
if np.prod(img.image_shape) > 1.0:
return 'CSI'
else:
return 'SVS'
Expand Down

0 comments on commit 6f0f176

Please sign in to comment.