From b6fdf36f5451d8d51d520bd04e3fd5d30a698be1 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 23 Oct 2017 14:26:53 -0400 Subject: [PATCH] Initial commit - boilerplate --- .gitignore | 72 +++++++++++++++++++++++++++++++++++++++++++++++++ .travis.yml | 16 +++++++++++ .zenodo.json | 29 ++++++++++++++++++++ CONTRIBUTING.md | 58 +++++++++++++++++++++++++++++++++++++++ LICENSE | 27 +++++++++++++++++++ fitlins/info.py | 57 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 259 insertions(+) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 .zenodo.json create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 fitlins/info.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..b6296e7e --- /dev/null +++ b/.gitignore @@ -0,0 +1,72 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so +*.c + +# Distribution / packaging +.Python +env/ +# build/ # commented due to some strangeness with Docker/circle setup +develop-eggs/ +dist/ +build/lib* +build/temp* +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ +build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints + +auth/ +secrets.py +local_settings.py + +*.swp diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..465db5d4 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +# vim ft=yaml +language: python +sudo: false +cache: + directories: + - $HOME/.cache/pip + +python: + - 3.6 + +before_install: + - python -m pip install --upgrade pip + - pip install "flake8<3.0" flake8-putty + +script: + - flake8 fmriprep wrapper diff --git a/.zenodo.json b/.zenodo.json new file mode 100644 index 00000000..9ea87fc1 --- /dev/null +++ b/.zenodo.json @@ -0,0 +1,29 @@ +{ + "creators": [ + { + "name": "Markiewicz, Christopher J.", + "affiliation": "Department of Psychology, Stanford University", + "orcid": "0000-0002-6533-164X" + }, + { + "name": "Poldrack, Russell A.", + "affiliation": "Department of Psychology, Stanford University", + "orcid": "0000-0001-6755-0259" + }, + { + "name": "Gorgolewski, Krzysztof J.", + "affiliation": "Department of Psychology, Stanford University", + "orcid": "0000-0003-3321-7583" + } + ], + "keywords": [ + "neuroimaging", + "workflow", + "pipeline", + "statistics", + "fMRI", + "BIDS" + ], + "license": "BSD-3-Clause", + "upload_type": "software" +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..093cc123 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,58 @@ +# Contributing + +**Are you new to open source and GitHub?** +If so, reading the "[How to submit a contribution]( +https://opensource.guide/how-to-contribute/#how-to-submit-a-contribution)" +guide will provide a great introduction to contributing to MODELFIT and other +Open Source projects. +All the MODELFIT-specific contributing instructions listed below will make much +more sense after reading this guide. + +If you are new to the project don't forget to add your name and affiliation to +the `.zenodo.json` file. + +## Code style guide + +### Function and variable names + +Whenever possible, instances of Nodes and Workflows should use the same names +as the variables they are assigned to. +This makes it easier to relate the content of the working directory to the code +that generated it when debugging. + +Workflow variables should end in `_wf` to indicate that they refer to Workflows +and not Nodes. +For instance, a workflow whose basename is `myworkflow` might be defined as +follows: + +```Python +from nipype.pipeline import engine as pe + +myworkflow_wf = pe.Workflow(name='myworkflow_wf') +``` + +If a workflow is generated by a function, the name of the function should take +the form `init__wf`: + +```Python +def init_myworkflow_wf(name='myworkflow_wf): + workflow = pe.Workflow(name=name) + ... + return workflow + +myworkflow_wf = init_workflow_wf(name='myworkflow_wf') +``` + +If multiple instances of the same workflow might be instantiated in the same +namespace, the workflow names and variables should include either a numeric +identifier or a one-word description, such as: + +```Python +myworkflow0_wf = init_workflow_wf(name='myworkflow0_wf') +myworkflow1_wf = init_workflow_wf(name='myworkflow1_wf') + +# or + +myworkflow_lh_wf = init_workflow_wf(name='myworkflow_lh_wf') +myworkflow_rh_wf = init_workflow_wf(name='myworkflow_rh_wf') +``` diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..27cc837f --- /dev/null +++ b/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2017, the CRN developers team. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of fmriprep nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/fitlins/info.py b/fitlins/info.py new file mode 100644 index 00000000..073835f3 --- /dev/null +++ b/fitlins/info.py @@ -0,0 +1,57 @@ +# -*- 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: +""" +Base module variables +""" + +__version__ = '0.0.1-dev' +__author__ = 'The CRN developers' +__copyright__ = 'Copyright 2017, Center for Reproducible Neuroscience, Stanford University' +__credits__ = ['Christopher J. Markiewicz', 'Chris Gorgolewski', 'Russell A. Poldrack'] +__license__ = '3-clause BSD' +__maintainer__ = 'Christopher J. Markiewicz' +__email__ = 'crn.poldracklab@gmail.com' +__status__ = 'Prototype' +__url__ = 'https://github.com/poldracklab/fitlins' +__packagename__ = 'fitlins' +__description__ = '' +__longdesc__ = '' + +DOWNLOAD_URL = ( + 'https://github.com/effigies/{name}/archive/{ver}.tar.gz'.format( + name=__packagename__, ver=__version__)) + + +SETUP_REQUIRES = [ + 'setuptools>=18.0', +] + +REQUIRES = [ + 'nistats', + 'pybids>=0.3', + 'niworkflows>=0.1.8', +] + +LINKS_REQUIRES = [ +] + +TESTS_REQUIRES = [ +] + +EXTRA_REQUIRES = { + 'doc': ['sphinx>=1.5.3', 'pydotplus', 'pydot>=1.2.3', 'sphinx_rtd_theme', 'sphinx-argparse'], + 'tests': TESTS_REQUIRES, + 'duecredit': ['duecredit'], +} + +# Enable a handle to install all extra dependencies at once +EXTRA_REQUIRES['all'] = [val for _, val in list(EXTRA_REQUIRES.items())] +CLASSIFIERS = [ + 'Development Status :: 2 - Pre-Alpha', + 'Intended Audience :: Science/Research', + 'Topic :: Scientific/Engineering', + 'License :: OSI Approved :: BSD License', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', +]