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

Work on fixing docstrings and splitting modules #210

Merged
merged 22 commits into from
Feb 20, 2023
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: 1 addition & 1 deletion aslprep/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Top-module metadata."""
"""ASLPrep: A Robust Preprocessing Pipeline for ASL Data."""

from aslprep.__about__ import __copyright__, __credits__, __packagename__, __version__

Expand Down
1 change: 1 addition & 0 deletions aslprep/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""A way to run the ASLPrep CLI with a Python call."""
from aslprep.cli.run import main

if __name__ == "__main__":
Expand Down
1 change: 1 addition & 0 deletions aslprep/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Command-line interfaces for ASLPrep."""
7 changes: 3 additions & 4 deletions aslprep/cli/aggregate_qc.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""aggregate qc of all the subjects"""
"""Aggregate QC measures across all subjects in dataset."""
import os
from pathlib import Path

import pandas as pd


def get_parser():
"""Build parser object"""
"""Build parser object."""
from argparse import ArgumentParser, RawTextHelpFormatter

parser = ArgumentParser(description=__doc__, formatter_class=RawTextHelpFormatter)
Expand All @@ -21,8 +21,7 @@ def get_parser():


def main():
"""Entry point"""

"""Run the workflow."""
opts = get_parser().parse_args()

allsubj_dir = os.path.abspath(opts.aslprep_dir)
Expand Down
4 changes: 1 addition & 3 deletions aslprep/cli/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ def build_boilerplate(config_file, workflow):
config.load(config_file)
logs_path = config.execution.output_dir / "aslprep" / "logs"
boilerplate = workflow.visit_desc()
citation_files = {
ext: logs_path / ("CITATION.%s" % ext) for ext in ("bib", "tex", "md", "html")
}
citation_files = {ext: logs_path / f"CITATION.{ext}" for ext in ("bib", "tex", "md", "html")}

if boilerplate:
# To please git-annex users and also to guarantee consistency
Expand Down
5 changes: 3 additions & 2 deletions aslprep/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def init(cls):


class seeds(_Config):
"""Initialize the PRNG and track random seed assignments"""
"""Initialize the PRNG and track random seed assignments."""

master = None
"""Master seed used to generate all other tracked seeds"""
Expand All @@ -528,6 +528,7 @@ class seeds(_Config):

@classmethod
def init(cls):
"""Initialize a seeds object."""
cls.master = workflow.random_seed
if cls.master is None:
cls.master = random.randint(1, 65536)
Expand All @@ -538,7 +539,7 @@ def init(cls):


def _set_ants_seed():
"""Fix random seed for antsRegistration, antsAI, antsMotionCorr"""
"""Fix random seed for antsRegistration, antsAI, antsMotionCorr."""
val = random.randint(1, 65536)
os.environ["ANTS_RANDOM_SEED"] = str(val)
return val
Expand Down
1 change: 0 additions & 1 deletion aslprep/data/boilerplate.bib
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ @article{score_dolui
year = {2017},
keywords = {ADNI, Aged, Algorithms, Alzheimer Disease, Alzheimer's disease, arterial spin labeling, Artifacts, Brain, cerebral blood flow, Cerebrovascular Circulation, Female, Humans, Image Enhancement, Image Interpretation, Computer-Assisted, Magnetic Resonance Angiography, Male, outlier rejection, Reproducibility of Results, Sensitivity and Specificity, Spin Labels},
pages = {1786--1797},
file = {Accepted Version:/Users/adebimpe/Zotero/storage/28WLPTXK/Dolui et al. - 2017 - Structural Correlation-based Outlier Rejection (SC.pdf:application/pdf;Accepted Version:/Users/adebimpe/Zotero/storage/QK82SC8R/Dolui et al. - 2017 - Structural Correlation-based Outlier Rejection (SC.pdf:application/pdf},
}

@misc{noauthor_ismrm_nodate,
Expand Down
Loading