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

🥅 Guardrail BBR only #1815

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from
Draft
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
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ function-naming-style=snake_case
#function-rgx=

# Good variable names which should always be accepted, separated by a comma.
good-names=c,
good-names=by,
c,
e,
f,
i,
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added the ability to run AFNI 3dDespike on template-space BOLD data.
- Added the ability to ingress TotalReadoutTime from epi field map meta-data from the JSON sidecars.
- Added the ability to use TotalReadoutTime of epi field maps in the calculation of FSL topup distortion correction.
- Added ability to set minimum quality measure thresholds to boundary-based registration.
- Difference method (``-``) for ``CPAC.utils.configuration.Configuration`` instances
- Calculate reho and alff when timeseries in template space

Expand Down
7 changes: 5 additions & 2 deletions CPAC/pipeline/cpac_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from CPAC.pipeline import nipype_pipeline_engine as pe
from CPAC.pipeline.nipype_pipeline_engine.plugins import \
LegacyMultiProcPlugin, MultiProcPlugin
from CPAC.qc.globals import registration_guardrails
from nipype import config, logging

from indi_aws import aws_utils, fetch_creds
Expand Down Expand Up @@ -199,7 +200,7 @@
network_centrality
)

from CPAC.pipeline.random_state import set_up_random_state_logger
from CPAC.pipeline.random_state.seed import set_up_random_state_logger
from CPAC.pipeline.schema import valid_options
from CPAC.utils.trimmer import the_trimmer
from CPAC.utils import Configuration, set_subject
Expand Down Expand Up @@ -767,8 +768,10 @@ def initialize_nipype_wf(cfg, sub_data_dct, name=""):
if name:
name = f'_{name}'

workflow_name = f'cpac{name}_{sub_data_dct["subject_id"]}_{sub_data_dct["unique_id"]}'
workflow_name = (f'cpac{name}_{sub_data_dct["subject_id"]}_'
f'{sub_data_dct["unique_id"]}')
wf = pe.Workflow(name=workflow_name)
registration_guardrails.update(cfg['registration_workflows', 'guardrails'])
wf.base_dir = cfg.pipeline_setup['working_directory']['path']
wf.config['execution'] = {
'hash_method': 'timestamp',
Expand Down
42 changes: 21 additions & 21 deletions CPAC/pipeline/nipype_pipeline_engine/__init__.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
'''Module to import Nipype Pipeline engine and override some Classes.
See https://fcp-indi.github.io/docs/developer/nodes
for C-PAC-specific documentation.
See https://nipype.readthedocs.io/en/latest/api/generated/nipype.pipeline.engine.html
for Nipype's documentation.

Copyright (C) 2022 C-PAC Developers
# Copyright (C) 2022 C-PAC Developers

This file is part of C-PAC.
# This file is part of C-PAC.

C-PAC is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
# C-PAC is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.

C-PAC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
# C-PAC is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.

You should have received a copy of the GNU Lesser General Public
License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.''' # noqa: E501
# You should have received a copy of the GNU Lesser General Public
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
'''Module to import Nipype Pipeline engine and override some Classes.
See https://fcp-indi.github.io/docs/developer/nodes
for C-PAC-specific documentation.
See https://nipype.readthedocs.io/en/latest/api/generated/nipype.pipeline.engine.html
for Nipype's documentation.''' # noqa: E501 # pylint: disable=line-too-long
from nipype.pipeline import engine as pe
# import everything in nipype.pipeline.engine.__all__
from nipype.pipeline.engine import * # noqa: F401,F403
# import our DEFAULT_MEM_GB and override Node, MapNode
from .engine import DEFAULT_MEM_GB, get_data_size, Node, MapNode, \
UNDEFINED_SIZE, Workflow
registration_guardrail_node, UNDEFINED_SIZE, \
Workflow

__all__ = [
interface for interface in dir(pe) if not interface.startswith('_')
] + ['DEFAULT_MEM_GB', 'get_data_size', 'Node', 'MapNode', 'UNDEFINED_SIZE',
'Workflow']
] + ['DEFAULT_MEM_GB', 'get_data_size', 'Node', 'MapNode',
'registration_guardrail_node', 'UNDEFINED_SIZE', 'Workflow']

del pe
Loading