The package rpms/python-nifti-mrs.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/python-nifti-mrs.git/commit/?id=ff40....
Change: +%ifarch s390x
Thanks.
Full change: ============
commit ff40e5957984de8b7f842d77e64d16c43ef7c809 Author: Benjamin A. Beasley code@musicinmybrain.net Date: Wed Jan 31 12:07:11 2024 -0500
Initial package (close RHBZ#2250532)
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8cc4cf7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/nifti_mrs_tools-1.1.1.tar.gz diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..8cb2e5e --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,12 @@ +upstream_project_url: https://github.com/wtclarke/nifti_mrs_tools +copy_upstream_release_description: false + +jobs: + - job: pull_from_upstream + trigger: release + dist_git_branches: + - fedora-rawhide + - job: koji_build + trigger: commit + dist_git_branches: + - fedora-all diff --git a/mrs_tools-conjugate.1 b/mrs_tools-conjugate.1 new file mode 100644 index 0000000..397917f --- /dev/null +++ b/mrs_tools-conjugate.1 @@ -0,0 +1,35 @@ +.TH MRS_TOOLS-CONJUGATE "1" "November 2023" "" "User Commands" +.SH NAME +.B mrs_tools\ conjugate +(en Conjugate data to correct phase/frequency convention in a NIfTI-MRS file +.SH SYNOPSIS +.B mrs_tools\ conjugate +.RB [ -h ] +.B --file\ \fIFILE +.RB [ --output\ \fIOUTPUT ] +.RB [ --filename\ \fIFILENAME ] +.SH OPTIONS +.SS "OPTIONAL\ ARGUMENTS" +.TP +.B -h\fR,\ \fB--help +Show a help message and exit. +.TP +.B --output\ \fIOUTPUT +Output folder (defaults to current directory). +.TP +.B --filename\ \fIFILENAME +Override output file names. +.SS "REQUIRED\ ARGUMENTS" +.TP +.B --file\ \fIFILE +File to conjugage. +.SH "SEE ALSO" +.BR mrs_tools (1) +.P +.BR mrs_tools-info (1), +.BR mrs_tools-vis (1), +.BR mrs_tools-merge (1), +.BR mrs_tools-split (1), +.BR mrs_tools-reorder (1), +.BR mrs_tools-reshape (1) +." .BR mrs_tools-conjugate (1) diff --git a/mrs_tools-info.1 b/mrs_tools-info.1 new file mode 100644 index 0000000..4f36a3c --- /dev/null +++ b/mrs_tools-info.1 @@ -0,0 +1,29 @@ +.TH MRS_TOOLS-INFO "1" "November 2023" "" "User Commands" +.SH NAME +.B mrs_tools\ info +(en Information about the NIfTI-MRS file +.SH SYNOPSIS +.B mrs_tools\ info +.RB [ -h ] +.I FILE\fR\ or\ list\ of\ \fIFILE\fRs +.RI [ FILE\fR\ or\ list\ of\ \fIFILE\fRs ...] +.SH OPTIONS +.SS "POSITIONAL\ ARGUMENTS" +.TP +.I FILE\fR\ or\ list\ of\ \fIFILE\fRs +NIfTI MRS file(s) +Information about the NIfTI-MRS file. +.SS "OPTIONAL\ ARGUMENTS" +.TP +.B -h\fR,\ \fB--help +Show a help message and exit. +.SH "SEE ALSO" +.BR mrs_tools (1) +.P +." .BR mrs_tools-info (1), +.BR mrs_tools-vis (1), +.BR mrs_tools-merge (1), +.BR mrs_tools-split (1), +.BR mrs_tools-reorder (1), +.BR mrs_tools-reshape (1), +.BR mrs_tools-conjugate (1) diff --git a/mrs_tools-merge.1 b/mrs_tools-merge.1 new file mode 100644 index 0000000..223bcbc --- /dev/null +++ b/mrs_tools-merge.1 @@ -0,0 +1,44 @@ +.TH MRS_TOOLS-MERGE "1" "November 2023" "" "User Commands" +.SH NAME +.B mrs_tools\ merge +(en Merge NIfTI-MRS along higher dimensions +.SH SYNOPSIS +.B mrs_tools\ merge +.RB [ -h ] +.B --files\ \fIFILES\ \fR[\fIFIELS\fR\ ...] +.B --dim\ \fIDIM +.RB [ --newaxis ] +.RB [ --output\ \fIOUTPUT ] +.RB [ --filename\ \fIFILENAME ] +.SH OPTIONS +.SS "OPTIONAL\ ARGUMENTS" +.TP +.B -h\fR,\ \fB--help +Show a help message and exit. +.TP +.B --newaxis +Join files along a new axis (tag specified by +.BR --dim ). +.TP +.B --output\ \fIOUTPUT +Output folder (defaults to current directory). +.TP +.B --filename\ \fIFILENAME +Override output file name. +.SS "REQUIRED\ ARGUMENTS" +.TP +.B --files\ \fIFILES\ \fR[\fIFIELS\fR\ ...] +List of files to merge. +.TP +.B --dim\ \fIDIM +NIFTI-MRS dimension tag to merge across. +.SH "SEE ALSO" +.BR mrs_tools (1) +.P +.BR mrs_tools-info (1), +.BR mrs_tools-vis (1), +." .BR mrs_tools-merge (1), +.BR mrs_tools-split (1), +.BR mrs_tools-reorder (1), +.BR mrs_tools-reshape (1), +.BR mrs_tools-conjugate (1) diff --git a/mrs_tools-reorder.1 b/mrs_tools-reorder.1 new file mode 100644 index 0000000..c25e2d9 --- /dev/null +++ b/mrs_tools-reorder.1 @@ -0,0 +1,43 @@ +.TH MRS_TOOLS-REORDER "1" "November 2023" "" "User Commands" +.SH NAME +.B mrs_tools\ reorder +(en Reorder higher dimensions of NIfTI-MRS +.SH SYNOPSIS +.B mrs_tools\ reorder +.RB [ -h ] +.B --file\ \fIFILE +.B --dim_order\ \fIDIM_ORDER\fR\ [\fIDIM_ORDER\fR\ ...] +.RB [ --output\ \fIOUTPUT ] +.RB [ --filename\ \fIFILENAME ] +.SH OPTIONS +.SS "OPTIONAL\ ARGUMENTS" +.TP +.B -h\fR,\ \fB--help +Show a help message and exit. +.TP +.B --output\ \fIOUTPUT +Output folder (defaults to current directory). +.TP +.B --filename\ \fIFILENAME +Override output file names. +.SS "REQUIRED\ ARGUMENTS" +.TP +.B --file\ \fIFILE +File to reorder. +.TP +.B --dim_order\ \fIDIM_ORDER\fR\ [\fIDIM_ORDER\fR\ ...] +NIFTI-MRS dimension tags in desired order. +Enter as strings +.RB (min: 1 , +.RB max: 3 ). +Can create singleton dimension at end. +.SH "SEE ALSO" +.BR mrs_tools (1) +.P +.BR mrs_tools-info (1), +.BR mrs_tools-vis (1), +.BR mrs_tools-merge (1), +.BR mrs_tools-split (1), +." .BR mrs_tools-reorder (1), +.BR mrs_tools-reshape (1), +.BR mrs_tools-conjugate (1) diff --git a/mrs_tools-reshape.1 b/mrs_tools-reshape.1 new file mode 100644 index 0000000..e35b02e --- /dev/null +++ b/mrs_tools-reshape.1 @@ -0,0 +1,58 @@ +.TH MRS_TOOLS-RESHAPE "1" "November 2023" "" "User Commands" +.SH NAME +.B mrs_tools\ reshape +(en Reorder higher dimensions of NIfTI-MRS +.SH SYNOPSIS +.B mrs_tools\ reshape +.RB [ -h ] +.B --file\ \fIFILE +.B --shape\ \fISHAPE\fR\ [\fISHAPE\fR\ ...] +.RB [ --d5\ \fID5 ] +.RB [ --d6\ \fID6 ] +.RB [ --d7\ \fID7 ] +.RB [ --output\ \fIOUTPUT ] +.RB [ --filename\ \fIFILENAME ] +.SH OPTIONS +.SS "OPTIONAL\ ARGUMENTS" +.TP +.B -h\fR,\ \fB--help +Show a help message and exit. +.TP +.B --d5\ \fID5 +5th dimension tag (e.g.: +.BR DIM_DYN ). +.TP +.B --d6\ \fID6 +6th dimension tag (e.g.: +.BR DIM_DYN ). +.TP +.B --d7\ \fID7 +7th dimension tag (e.g.: +.BR DIM_DYN ). +.TP +.B --output\ \fIOUTPUT +Output folder (defaults to current directory). +.TP +.B --filename\ \fIFILENAME +Override output file names. +.SS "REQUIRED\ ARGUMENTS" +.TP +.B --file\ \fIFILE +File to reshape. +.TP +.B --shape\ \fISHAPE\fR\ [\fISHAPE\fR\ ...] +Numpy-like target shape. +Enter as integers, +.B -1 +is used for any. +Only enter shape for higher (5th-7th) dimensions. +.SH "SEE ALSO" +.BR mrs_tools (1) +.P +.BR mrs_tools-info (1), +.BR mrs_tools-vis (1), +.BR mrs_tools-merge (1), +.BR mrs_tools-split (1), +.BR mrs_tools-reorder (1), +." .BR mrs_tools-reshape (1), +.BR mrs_tools-conjugate (1) diff --git a/mrs_tools-split.1 b/mrs_tools-split.1 new file mode 100644 index 0000000..140cd95 --- /dev/null +++ b/mrs_tools-split.1 @@ -0,0 +1,47 @@ +.TH MRS_TOOLS-SPLIT "1" "November 2023" "" "User Commands" +.SH NAME +.B mrs_tools\ split +(en Split NIfTI-MRS along higher dimensions +.SH SYNOPSIS +.B mrs_tools\ split +.RB [ -h ] +.B --file\ \fIFILE +.B --dim\ \fIDIM +(\fB--indices\ \fIINDICES\ \fR[\fIINDICES\fR\ ...]\ |\ \fB--index\ \fIINDEX\fR) +.RB [ --output\ \fIOUTPUT ] +.RB [ --filename\ \fIFILENAME ] +.SH OPTIONS +.SS "OPTIONAL\ ARGUMENTS" +.TP +.B -h\fR,\ \fB--help +Show a help message and exit. +.TP +.B --indices\ \fIINDICES\ \fR[\fIINDICES\fR\ ...] +List of indices to extract into second file. +All indices are zero-indexed. +.TP +.B --index\ \fIINDEX +Index to split at (split after index, zero-indexed). +.TP +.B --output\ \fIOUTPUT +Output folder (defaults to current directory). +.TP +.B --filename\ \fIFILENAME +Override output file name. +.SS "REQUIRED\ ARGUMENTS" +.TP +.B --file\ \fIFILE +File to split. +.TP +.B --dim\ \fIDIM +NIFTI-MRS dimension tag to merge across. +.SH "SEE ALSO" +.BR mrs_tools (1) +.P +.BR mrs_tools-info (1), +.BR mrs_tools-vis (1), +.BR mrs_tools-merge (1), +." .BR mrs_tools-split (1), +.BR mrs_tools-reorder (1), +.BR mrs_tools-reshape (1), +.BR mrs_tools-conjugate (1) diff --git a/mrs_tools-vis.1 b/mrs_tools-vis.1 new file mode 100644 index 0000000..a4d5ec3 --- /dev/null +++ b/mrs_tools-vis.1 @@ -0,0 +1,50 @@ +.TH MRS_TOOLS-VIS "1" "November 2023" "" "User Commands" +.SH NAME +.B mrs_tools\ vis +(en Quick visualisation of a NIfTI-MRS file or FSL-MRS basis set +.SH SYNOPSIS +.B mrs_tools\ vis +.RB [ -h ] +.RB [ --ppmlim\ \fILOW\fR\ \fIHIGH ] +.RB [ --mask\ \fIMASK ] +.RB [ --save\ \fISAVE ] +.RB [ --display_dim\ \fIDISPLAY_DIM ] +.RB [ --no_mean ] +.I FILE\fR\ or\ \fIDIR +.RI [ FILE\fR\ or\ list\ of\ \fIFILE\fRs ...] +.SH OPTIONS +.SS "POSITIONAL\ ARGUMENTS" +.TP +.I FILE\fR\ or\ \fIDIR +NIfTI file or directory of basis sets +.SS "OPTIONAL\ ARGUMENTS" +.TP +.B -h\fR,\ \fB--help +Show a help message and exit. +.TP +.B --ppmlim\ \fILOW\fR\ \fIHIGH +Limit the fit to a freq range +.RB (default= (.2,4.2) ). +.TP +.B --mask\ \fIMASK +Mask for MRSI. +.TP +.B --save\ \fISAVE +Save fig to path. +.TP +.B --display_dim\ \fIDISPLAY_DIM +NIFTI-MRS tag. +Do not average across this dimension. +.TP +.B --no_mean +Do not plot the mean signal line in the case of multiple spectra. +.SH "SEE ALSO" +.BR mrs_tools (1) +.P +.BR mrs_tools-info (1), +." .BR mrs_tools-vis (1), +.BR mrs_tools-merge (1), +.BR mrs_tools-split (1), +.BR mrs_tools-reorder (1), +.BR mrs_tools-reshape (1), +.BR mrs_tools-conjugate (1) diff --git a/mrs_tools.1 b/mrs_tools.1 new file mode 100644 index 0000000..b98af26 --- /dev/null +++ b/mrs_tools.1 @@ -0,0 +1,64 @@ +.TH MRS_TOOLS "1" "November 2023" "" "User Commands" +.SH NAME +.B mrs_tools +(en NIfTI-MRS (Magnetic Resonance Spectroscopy) tools +.SH SYNOPSIS +.B mrs_tools +.RB [ -h ] +.RB [ -v ] +.RB { info , vis , merge , split , reorder , reshape , conjugate }\ ...: +.RI [ OPTIONS ] +.I COMMAND +.RI [ ARGS ]... +.SH OPTIONS +.TP +.B -h\fR,\ \fB--help +Show a help message and exit. +.TP +.B -v\fR,\ \fB--version +Show the program(cqs version number and exit. +.SS "SUBCOMMANDS" +Available tools +.TP +.B info +Information about the NIfTI-MRS file. +See +.BR mrs_tools-info (1). +.TP +.B vis +Quick visualisation of a NIfTI-MRS file or FSL-MRS basis set. +See +.BR mrs_tools-vis (1). +.TP +.B merge +Merge NIfTI-MRS along higher dimensions. +See +.BR mrs_tools-merge (1). +.TP +.B split +Split NIfTI-MRS along higher dimensions. +See +.BR mrs_tools-split (1). +.TP +.B reorder +Reorder higher dimensions of NIfTI-MRS. +See +.BR mrs_tools-reorder (1). +.TP +.B reshape +Reorder higher dimensions of NIfTI-MRS. +See +.BR mrs_tools-reshape (1). +.TP +.B conjugage +Conjugate data to correct phase/frequency convention in a NIfTI-MRS file. +See +.BR mrs_tools-conjugate (1). +.SH "SEE ALSO" +.BR mrs_tools-info (1), +.BR mrs_tools-vis (1), +.BR mrs_tools-merge (1), +.BR mrs_tools-split (1), +.BR mrs_tools-reorder (1), +.BR mrs_tools-reshape (1), +.BR mrs_tools-conjugate (1) diff --git a/python-nifti-mrs.spec b/python-nifti-mrs.spec new file mode 100644 index 0000000..0afc28f --- /dev/null +++ b/python-nifti-mrs.spec @@ -0,0 +1,167 @@ +# Sphinx-generated HTML documentation is not suitable for packaging; see +# https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. +# +# We can generate PDF documentation as a substitute. +%bcond doc 1 + +Name: python-nifti-mrs +Version: 1.1.1 +Release: %autorelease +Summary: Software tools for the NIfTI-MRS data format + +# The entire package is BSD-3-Clause, except the generated +# %%{python3_sitelib}/nifti_mrs/_version.py in python3-nifti-mrs, which is +# Unlicense because it is generated by Versioneer (python-versioneer). +License: BSD-3-Clause +URL: https://github.com/wtclarke/nifti_mrs_tools +# The GitHub archive contains API documentation and a changelog file, which the +# PyPI sdists lack. +Source: %{url}/archive/%{version}/nifti_mrs_tools-%{version}.tar.gz + +# Man pages hand-written for Fedora in groff_man(7) format based on --help +Source10: mrs_tools.1 +Source11: mrs_tools-conjugate.1 +Source12: mrs_tools-info.1 +Source13: mrs_tools-merge.1 +Source14: mrs_tools-reorder.1 +Source15: mrs_tools-reshape.1 +Source16: mrs_tools-split.1 +Source17: mrs_tools-vis.1 + +# The base package is arched due to endian-dependent test failures, but the +# binary packages are noarch and contain no compiled code. +%global debug_package %{nil} + +BuildRequires: python3-devel + +BuildRequires: %{py3_dist pytest} + +%if %{with doc} +BuildRequires: make +BuildRequires: python3-sphinx-latex +BuildRequires: latexmk +%endif + +%global common_description %{expand: +This package contains python-based tools for representing, validating, and +manipulating the NIfTI-MRS format. NIfTI-MRS is a standardized format for +storing Magnetic Resonance Spectroscopy data. + +These tools are used extensively in the spec2nii format conversion program and +the FSL-MRS analysis software. However, this library can also be used as a +stand-alone set of tools. + +If you use these tools please cite: Clarke, WT, Bell, TK, Emir, UE, et al. +NIfTI-MRS: A standard data format for magnetic resonance spectroscopy. Magn +Reson Med. 2022; 88: 2358- 2370. doi:10.1002/mrm.29418} + +%description %{common_description} + + +%package -n python3-nifti-mrs +Summary: %{summary} +# The entire package is BSD-3-Clause, except the generated +# %%{python3_sitelib}/nifti_mrs/_version.py in python3-nifti-mrs, which is +# Unlicense because it is generated by Versioneer (python-versioneer). +License: BSD-3-Clause AND Unlicense + +BuildArch: noarch + +%description -n python3-nifti-mrs %{common_description} + + +%package -n mrs_tools +Summary: NIfTI-MRS (Magnetic Resonance Spectroscopy) tools + +BuildArch: noarch + +Requires: python3-nifti-mrs = %{version}-%{release} + +%py_provides python3-mrs-tools + +%description -n mrs_tools %{common_description} + + +# We don’t generate a metapackage for the “VIS” extra because it requires +# fsl-mrs, which (1) is not packaged, (2) is not on PyPI, (3) is non-free +# (non-commercial use only). + + +%if %{with doc} +%package doc +Summary: Documentation for python-nifti-mrs + +BuildArch: noarch + +%description doc %{common_description} +%endif + + +%prep +%autosetup -n nifti_mrs_tools-%{version} + + +%generate_buildrequires +%pyproject_buildrequires + + +%build +%pyproject_wheel +%if %{with doc} +PYTHONPATH="${PWD}/src" %make_build -C apidoc latex \ + SPHINXOPTS='-j%{?_smp_build_ncpus}' +%make_build -C apidoc/_build/latex LATEXMKOPTS='-quiet' +%endif + + +%install +%pyproject_install +%pyproject_save_files -l nifti_mrs mrs_tools +install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 \ + '%{SOURCE10}' '%{SOURCE11}' '%{SOURCE12}' '%{SOURCE13}' '%{SOURCE14}' \ + '%{SOURCE15}' '%{SOURCE16}' '%{SOURCE17}' + + +%check +%ifarch s390x +# Tests fail when file endianness does not match host endianness +# https://github.com/wtclarke/nifti_mrs_tools/issues/16 +# Nevertheless, the software may still be useful on this architecture for +# processing big-endian NIfTI files, so we skip the tests rather than adding +# ExcludeArch. +k="${k-}${k+ and }not test_nifti_mrs_save" +k="${k-}${k+ and }not test_merge" +k="${k-}${k+ and }not test_split" +k="${k-}${k+ and }not test_reorder" +k="${k-}${k+ and }not test_reshape" +k="${k-}${k+ and }not test_conjugate" +%endif + +%pytest -k "${k-}" -v + + +%files -n python3-nifti-mrs -f %{pyproject_files} +%if %{without doc} +%doc CHANGELOG.md +%doc README.md +%endif +%exclude %{python3_sitelib}/mrs_tools/ + + +%files -n mrs_tools +%{python3_sitelib}/mrs_tools/ +%{_bindir}/mrs_tools +%{_mandir}/man1/mrs_tools*.1* + + +%if %{with doc} +%files doc +%license LICENSE +%doc CHANGELOG.md +%doc README.md +%doc apidoc/_build/latex/nifti-mrs.pdf +%endif + + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..ef15ced --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (nifti_mrs_tools-1.1.1.tar.gz) = 1f1f8f5370629928859f868aed216e3b40a32a8dd44ce337abbf49101c34a2620df06696ba51a0aa91df66ddaa78cdccd4892808ad88b1dd457c5249ad73e06d
arch-excludes@lists.fedoraproject.org