diff --git a/MANIFEST.in b/MANIFEST.in index a0aadf83..97911282 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -9,6 +9,8 @@ recursive-exclude test/ * exclude .* exclude Dockerfile +exclude Dockerfile_devel +exclude Makefile #data recursive-include mriqc/data * diff --git a/NOTICE b/NOTICE deleted file mode 100644 index a7e7c982..00000000 --- a/NOTICE +++ /dev/null @@ -1,17 +0,0 @@ -MRIQC -Copyright 2021 The NiPreps Developers. - -This product includes software developed by -the NiPreps Community (https://nipreps.org/). - -Portions of this software were developed at the Department of -Psychology at Stanford University, Stanford, CA, US. - -This software contains code ultimately derived from the -PCP Quality Assessment Protocol (QAP; -http://preprocessed-connectomes-project.org/quality-assessment-protocol) -by C. Craddock, S. Giavasis, D. Clark, Z. Shezhad, and J. Pellman. - -This software is also distributed as a Docker container image. -The bootstrapping file for the image ("Dockerfile") is licensed -under the MIT License. diff --git a/NOTICE b/NOTICE new file mode 120000 index 00000000..233b6c36 --- /dev/null +++ b/NOTICE @@ -0,0 +1 @@ +mriqc/data/NOTICE \ No newline at end of file diff --git a/mriqc/cli/parser.py b/mriqc/cli/parser.py index 7ef1fe4b..db0611a1 100644 --- a/mriqc/cli/parser.py +++ b/mriqc/cli/parser.py @@ -494,7 +494,7 @@ def parse_args(args=None, namespace=None): from niworkflows.utils.bids import DEFAULT_BIDS_QUERIES, collect_data - from mriqc import __version__ + from mriqc import __version__, data from mriqc._warnings import DATE_FMT, LOGGER_FMT, _LogFormatter from mriqc.messages import PARTICIPANT_START from mriqc.utils.misc import initialize_meta_and_data @@ -525,6 +525,7 @@ def parse_args(args=None, namespace=None): f' * BIDS filters-file: {opts.bids_filter_file.absolute()}.', ) + notice_path = data.load.readable('NOTICE') config.loggers.cli.log( 26, PARTICIPANT_START.format( @@ -532,6 +533,9 @@ def parse_args(args=None, namespace=None): bids_dir=opts.bids_dir, output_dir=opts.output_dir, analysis_level=opts.analysis_level, + notice='\n '.join( + ['NOTICE'] + notice_path.read_text().splitlines(keepends=False)[1:] + ), extra_messages='\n'.join(extra_messages), ), ) diff --git a/mriqc/data/NOTICE b/mriqc/data/NOTICE new file mode 100644 index 00000000..939b4ca4 --- /dev/null +++ b/mriqc/data/NOTICE @@ -0,0 +1,17 @@ +MRIQC +Copyright © The NiPreps Developers. + +This product includes software developed by +the NiPreps Community (https://nipreps.org/). + +Portions of this software were developed at the Department of +Psychology at Stanford University, Stanford, CA, US. + +This software contains code ultimately derived from the +PCP Quality Assessment Protocol (QAP; +http://preprocessed-connectomes-project.org/quality-assessment-protocol) +by C. Craddock, S. Giavasis, D. Clark, Z. Shezhad, and J. Pellman. + +This software is also distributed as a Docker container image. +The bootstrapping file for the image ("Dockerfile") is licensed +under the MIT License. diff --git a/mriqc/data/__init__.py b/mriqc/data/__init__.py index e69de29b..f4aed61d 100644 --- a/mriqc/data/__init__.py +++ b/mriqc/data/__init__.py @@ -0,0 +1,37 @@ +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: +# +# Copyright 2024 The NiPreps Developers +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# We support and encourage derived works from this project, please read +# about our expectations at +# +# https://www.nipreps.org/community/licensing/ +# +""" +MRIQC data files + +.. autofunction:: load + +.. automethod:: load.readable + +.. automethod:: load.as_path + +.. automethod:: load.cached +""" + +from acres import Loader + +load = Loader(__package__) diff --git a/mriqc/messages.py b/mriqc/messages.py index b9d05e65..f02d8c5d 100644 --- a/mriqc/messages.py +++ b/mriqc/messages.py @@ -38,6 +38,11 @@ ------------------------------------------------------------------ Running MRIQC version {version} ---------------------------------------------------------------- + + {notice} + + ---------------------------------------------------------------- + * BIDS dataset path: {bids_dir}. * Output folder: {output_dir}. * Analysis levels: {analysis_level}. diff --git a/pyproject.toml b/pyproject.toml index 1e3bf042..9ca5bdbf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", ] dependencies = [ + "acres", "dipy", 'importlib_resources; python_version < "3.9"', # jinja2 imports deprecated function removed in 2.1 "markupsafe ~= 2.0.1",