Commit 1e5e584f authored by Taylor Hanayik's avatar Taylor Hanayik
Browse files

Release prep

parent a01188dd
dist/
build/
get_dataset.egg-info/
......@@ -5,20 +5,22 @@ Download entire projects from openneuro.org. All you need is a dataset ID.
## Usage
```
usage: openneuro_dl [-h] [--savepath SAVEPATH] [--savename SAVENAME] [--w] id
usage: get_dataset [-h] [--id ID] [--savepath SAVEPATH] [--savename SAVENAME]
[--w] [--service {openneuro}]
download a dataset from openneuro.org
positional arguments:
id a dataset ID. Openneuro.org provides these in the form
of ds###### (e.g. ds002285)
optional arguments:
-h, --help show this help message and exit
--savepath SAVEPATH the output directory where you would like to download
the dataset (default is the current working directory)
--savename SAVENAME savename is an optional name to give the downloaded
dataset folder. The default is the dataset id.
--w re-sync existing dataset with the same ID if it already
exists in the savepath
-h, --help show this help message and exit
--id ID a dataset ID. Openneuro.org provides these in the form
of ds###### (e.g. ds002190)
--savepath SAVEPATH the output directory where you would like to download
the dataset (default is the current working directory)
--savename SAVENAME savename is an optional name to give the downloaded
dataset folder. The default is the dataset id.
--w re-sync existing dataset with the same ID if it
already exists in the savepath
--service {openneuro}
set the service provider that you want to download
data from
```
{% set data = load_setup_py_data() %}
package:
name: get_dataset
version: {{ data['version']}}
build:
noarch: python
script: python setup.py install --single-version-externally-managed --record=record.txt
source:
path: ../
requirements:
build:
- python >2
- setuptools
{% for package in data.get('setup_requires', {}) %}
- {{ package.lower() }}
{% endfor %}
run:
- python >2
{% for package in data.get('install_requires', {}) %}
- {{ package.lower() }}
{% endfor %}
run_constrained:
{% for name, pkgs in data.get('extras_require', dict()).items() %}
{% for package in pkgs %}
- {{ package.lower() }}
{% endfor %}
{% endfor %}
{% if 'test_suite' in data %}
test:
requires:
{% for package in data.get('setup_requires', {}) %}
- {{ package.lower() }}
{% endfor %}
source_files:
- {{ data['test_suite'] }}
commands:
- python -m pytest {{ data['test_suite'] }}
{% endif %}
if [ -e ${FSLDIR}/etc/fslconf/requestFSLpythonLink.sh ]; then
$FSLDIR/etc/fslconf/requestFSLpythonLink.sh get_dataset
fi
if [ -e ${FSLDIR}/etc/fslconf/requestFSLpythonUnlink.sh ]; then
$FSLDIR/etc/fslconf/requestFSLpythonUnlink.sh get_dataset
fi
......@@ -31,9 +31,10 @@ parser = argparse.ArgumentParser(
)
# id must be a string and is not optional
parser.add_argument(
'id',
'--id',
type=str,
help="a dataset ID. Openneuro.org provides these in the form of ds###### (e.g. ds002190)"
help="a dataset ID. Openneuro.org provides these in the form of ds###### (e.g. ds002190)",
default=''
)
# savepath must be a string and is optional. the default is the current working dir
parser.add_argument(
......@@ -56,6 +57,13 @@ parser.add_argument(
default=False,
action='store_true'
)
# specify an open data service to use
parser.add_argument(
'--service',
help="set the service provider that you want to download data from",
choices=['openneuro'],
default='openneuro'
)
def main():
args = parser.parse_args()
......
from setuptools import setup,find_packages
with open('requirements.txt', 'rt') as f:
install_requires = [l.strip() for l in f.readlines()]
setup(name='get_dataset',
version='1.0.0',
description='FSL dataset downloader. Useful for downloading open neuroimaging datasets from various online repos',
author='Taylor Hanayik',
install_requires=install_requires,
scripts=['get_dataset/get_dataset'],
packages=find_packages(),
include_package_data=True)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment