-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add black flake8 and pylint, update setup.py
- Loading branch information
Showing
9 changed files
with
97 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
extend-ignore = E203 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[pylint] | ||
disable=bad-continuation, | ||
invalid-name, |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
ipython>=7.10.0 | ||
mkdocs>=1.0.4 | ||
pybids>=0.8.0 | ||
pytest>=4.3.0 | ||
pytest-cov>=2.6.1 | ||
tox>=3.7.0 | ||
tox>=3.14.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pybids>=0.9.5 | ||
pytest>=5.3.1 | ||
pytest-black>=0.3.7 | ||
pytest-cov>=2.8.1 | ||
pytest-flake8>=1.0.4 | ||
pytest-pylint>=0.14.1 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,86 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# type: ignore | ||
|
||
"""Setup file for the dcm2bids package""" | ||
|
||
import glob | ||
import os | ||
from setuptools import setup | ||
|
||
|
||
#Get __version__ from dcm2bids.version | ||
exec(open(os.path.join("dcm2bids", "version.py")).read()) | ||
def load_version(): | ||
"""Execute dcm2bids.version in a global dictionary""" | ||
global_dict = {} | ||
with open(os.path.join("dcm2bids", "version.py")) as _: | ||
exec(_.read(), global_dict) | ||
return global_dict | ||
|
||
|
||
description = """Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure""" | ||
|
||
|
||
try: | ||
with open('README.md', encoding='utf-8') as f: | ||
long_description = f.read() | ||
except: | ||
#python2 compatibility | ||
from io import open | ||
with open('README.md', encoding='utf-8') as f: | ||
long_description = f.read() | ||
def install_requires(): | ||
"""Get list of required modules""" | ||
required = [] | ||
for module, meta in _VERSION["REQUIRED_MODULE_METADATA"]: | ||
required.append(f"{module}>={meta['min_version']}") | ||
return required | ||
|
||
|
||
_VERSION = load_version() | ||
DISTNAME = "dcm2bids" | ||
DESCRIPTION = description | ||
VERSION = __version__ | ||
VERSION = _VERSION["__version__"] | ||
AUTHOR = "Christophe Bedetti" | ||
AUTHOR_EMAIL = "christophe.bedetti@umontreal.ca" | ||
URL = "https://github.com/cbedetti/Dcm2Bids" | ||
DOWNLOAD_URL = URL + "/archive/" + VERSION + ".tar.gz" | ||
DESCRIPTION = ( | ||
"Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure" | ||
) | ||
with open("README.md", encoding="utf-8") as _: | ||
LONG_DESCRIPTION = _.read() | ||
LICENSE = "GPLv3+" | ||
PROJECT_URLS = { | ||
"Documentation": "https://cbedetti.github.io/Dcm2Bids", | ||
"Source Code": "https://github.com/cbedetti/Dcm2Bids", | ||
} | ||
CLASSIFIERS = [ | ||
"Intended Audience :: Healthcare Industry", | ||
"Intended Audience :: Science/Research", | ||
# 'Operating System :: MacOS', | ||
# 'Operating System :: Microsoft :: Windows', | ||
# 'Operating System :: POSIX', | ||
# 'Operating System :: Unix', | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Bio-Informatics", | ||
"Topic :: Scientific/Engineering :: Medical Science Apps.", | ||
] | ||
|
||
|
||
if __name__ == "__main__": | ||
setup( | ||
name=DISTNAME, | ||
version=VERSION, | ||
description=description, | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
author=AUTHOR, | ||
author_email=AUTHOR_EMAIL, | ||
url=URL, | ||
download_url=DOWNLOAD_URL, | ||
packages=['dcm2bids'], | ||
scripts=glob.glob('scripts/dcm2bids*'), | ||
install_requires=['future'], | ||
) | ||
name=DISTNAME, | ||
version=VERSION, | ||
packages=[DISTNAME], | ||
scripts=glob.glob("scripts/dcm2bids*"), | ||
entry_points={ | ||
"console_scripts": [ | ||
"dcm2bids = dcm2bids.dcm2bids:main", | ||
"dcm2bids_helper = dcm2bids.helper:main", | ||
"dcm2bids_scaffold = dcm2bids.scaffold:main", | ||
], | ||
# "configurations": [], | ||
}, | ||
python_requires=">=3.5", | ||
install_requires=install_requires(), | ||
package_data={"": ["README.md", "LICENSE.txt"]}, | ||
author=AUTHOR, | ||
author_email=AUTHOR_EMAIL, | ||
description=DESCRIPTION, | ||
long_description=LONG_DESCRIPTION, | ||
long_description_content_type="text/markdown", | ||
# keywords="", | ||
license=LICENSE, | ||
project_urls=PROJECT_URLS, | ||
classifiers=CLASSIFIERS, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters