Skip to content

Commit 5129557

Browse files
committed
wip: first duecredit implementation suggestion
1 parent 61c9896 commit 5129557

File tree

4 files changed

+36
-9
lines changed

4 files changed

+36
-9
lines changed

nipype/__init__.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,15 @@
1616
from distutils.version import LooseVersion
1717

1818
from .fixes.numpy.testing import nosetester
19+
from .refs import due
1920

20-
# Use duecredit (duecredit.org) to provide a citation to relevant work to
21-
# be cited. This does nothing, unless the user has duecredit installed,
22-
# And calls this with duecredit (as in `python -m duecredit script.py`):
23-
from .due import due, Doi
24-
due.cite(Doi("10.3389/fninf.2011.00013"),
25-
description="A flexible, lightweight and extensible neuroimaging data"
26-
" processing framework in Python",
27-
tags=["nipype"],)
2821

2922
try:
3023
import faulthandler
3124
faulthandler.enable()
3225
except (ImportError,IOError) as e:
3326
pass
3427

35-
3628
class _NoseTester(nosetester.NoseTester):
3729
""" Subclass numpy's NoseTester to add doctests by default
3830
"""

nipype/interfaces/spm/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@
1212
PairedTTestDesign, MultipleRegressionDesign)
1313
from .utils import (Analyze2nii, CalcCoregAffine, ApplyTransform, Reslice,
1414
ApplyInverseDeformation, ResliceToReference, DicomImport)
15+
16+
from .refs import due

nipype/interfaces/spm/refs.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
"""References for this interface"""
4+
5+
from .due import due, Doi, BibTeX
6+
7+
# http://www.fil.ion.ucl.ac.uk/spm
8+
due.dcite(BibTeX("""book{FrackowiakFristonFrithDolanMazziotta1997,
9+
author={R.S.J. Frackowiak, K.J. Friston, C.D. Frith, R.J. Dolan, and J.C. Mazziotta},
10+
title={Human Brain Function},
11+
publisher={Academic Press USA}
12+
year={1997},
13+
}"""),
14+
description='The fundamental text on Statistical Parametric Mapping (SPM)',
15+
path="nipype.interfaces.spm",
16+
tags=['implementation'])

nipype/refs.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
# Use duecredit (duecredit.org) to provide a citation to relevant work to
3+
# be cited. This does nothing, unless the user has duecredit installed,
4+
# And calls this with duecredit (as in `python -m duecredit script.py`):
5+
from .due import due, Doi, BibTeX
6+
7+
due.cite(Doi("10.3389/fninf.2011.00013"),
8+
description="A flexible, lightweight and extensible neuroimaging data"
9+
" processing framework in Python",
10+
path="nipype",
11+
tags=["implementation"],)
12+
13+
due.cite(Doi("10.5281/zenodo.50186"),
14+
description="A flexible, lightweight and extensible neuroimaging data"
15+
" processing framework in Python",
16+
path="nipype",
17+
tags=["implementation"],)

0 commit comments

Comments
 (0)