Skip to content

Commit f7ca4cf

Browse files
authored
Merge pull request #1343 from nipreps/maint/add-notice-banner
ENH: Add license NOTICE to start banner
2 parents 10cfa75 + ecb5615 commit f7ca4cf

File tree

7 files changed

+68
-18
lines changed

7 files changed

+68
-18
lines changed

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ recursive-exclude test/ *
99

1010
exclude .*
1111
exclude Dockerfile
12+
exclude Dockerfile_devel
13+
exclude Makefile
1214

1315
#data
1416
recursive-include mriqc/data *

NOTICE

Lines changed: 0 additions & 17 deletions
This file was deleted.

NOTICE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mriqc/data/NOTICE

mriqc/cli/parser.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ def parse_args(args=None, namespace=None):
494494

495495
from niworkflows.utils.bids import DEFAULT_BIDS_QUERIES, collect_data
496496

497-
from mriqc import __version__
497+
from mriqc import __version__, data
498498
from mriqc._warnings import DATE_FMT, LOGGER_FMT, _LogFormatter
499499
from mriqc.messages import PARTICIPANT_START
500500
from mriqc.utils.misc import initialize_meta_and_data
@@ -525,13 +525,17 @@ def parse_args(args=None, namespace=None):
525525
f' * BIDS filters-file: {opts.bids_filter_file.absolute()}.',
526526
)
527527

528+
notice_path = data.load.readable('NOTICE')
528529
config.loggers.cli.log(
529530
26,
530531
PARTICIPANT_START.format(
531532
version=__version__,
532533
bids_dir=opts.bids_dir,
533534
output_dir=opts.output_dir,
534535
analysis_level=opts.analysis_level,
536+
notice='\n '.join(
537+
['NOTICE'] + notice_path.read_text().splitlines(keepends=False)[1:]
538+
),
535539
extra_messages='\n'.join(extra_messages),
536540
),
537541
)

mriqc/data/NOTICE

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
MRIQC
2+
Copyright © The NiPreps Developers.
3+
4+
This product includes software developed by
5+
the NiPreps Community (https://nipreps.org/).
6+
7+
Portions of this software were developed at the Department of
8+
Psychology at Stanford University, Stanford, CA, US.
9+
10+
This software contains code ultimately derived from the
11+
PCP Quality Assessment Protocol (QAP;
12+
http://preprocessed-connectomes-project.org/quality-assessment-protocol)
13+
by C. Craddock, S. Giavasis, D. Clark, Z. Shezhad, and J. Pellman.
14+
15+
This software is also distributed as a Docker container image.
16+
The bootstrapping file for the image ("Dockerfile") is licensed
17+
under the MIT License.

mriqc/data/__init__.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
2+
# vi: set ft=python sts=4 ts=4 sw=4 et:
3+
#
4+
# Copyright 2024 The NiPreps Developers <[email protected]>
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
# We support and encourage derived works from this project, please read
19+
# about our expectations at
20+
#
21+
# https://www.nipreps.org/community/licensing/
22+
#
23+
"""
24+
MRIQC data files
25+
26+
.. autofunction:: load
27+
28+
.. automethod:: load.readable
29+
30+
.. automethod:: load.as_path
31+
32+
.. automethod:: load.cached
33+
"""
34+
35+
from acres import Loader
36+
37+
load = Loader(__package__)

mriqc/messages.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
------------------------------------------------------------------
3939
Running MRIQC version {version}
4040
----------------------------------------------------------------
41+
42+
{notice}
43+
44+
----------------------------------------------------------------
45+
4146
* BIDS dataset path: {bids_dir}.
4247
* Output folder: {output_dir}.
4348
* Analysis levels: {analysis_level}.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ classifiers = [
1717
"Programming Language :: Python :: 3.12",
1818
]
1919
dependencies = [
20+
"acres",
2021
"dipy",
2122
'importlib_resources; python_version < "3.9"', # jinja2 imports deprecated function removed in 2.1
2223
"markupsafe ~= 2.0.1",

0 commit comments

Comments
 (0)