Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Add license NOTICE to start banner #1343

Merged
merged 1 commit into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ recursive-exclude test/ *

exclude .*
exclude Dockerfile
exclude Dockerfile_devel
exclude Makefile

#data
recursive-include mriqc/data *
17 changes: 0 additions & 17 deletions NOTICE

This file was deleted.

1 change: 1 addition & 0 deletions NOTICE
6 changes: 5 additions & 1 deletion mriqc/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -525,13 +525,17 @@ 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(
version=__version__,
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),
),
)
Expand Down
17 changes: 17 additions & 0 deletions mriqc/data/NOTICE
Original file line number Diff line number Diff line change
@@ -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.
37 changes: 37 additions & 0 deletions mriqc/data/__init__.py
Original file line number Diff line number Diff line change
@@ -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 <nipreps@gmail.com>
#
# 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__)
5 changes: 5 additions & 0 deletions mriqc/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
------------------------------------------------------------------
Running MRIQC version {version}
----------------------------------------------------------------
{notice}
----------------------------------------------------------------
* BIDS dataset path: {bids_dir}.
* Output folder: {output_dir}.
* Analysis levels: {analysis_level}.
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading