Skip to content

Commit bb21275

Browse files
committed
fix: add pyproject.toml and minimized setup.py
1 parent 69c784f commit bb21275

File tree

4 files changed

+101
-78
lines changed

4 files changed

+101
-78
lines changed

README.rst

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
========
2+
dmriprep
3+
========
4+
5+
6+
.. image:: https://img.shields.io/pypi/v/dmriprep.svg
7+
:target: https://pypi.python.org/pypi/dmriprep
8+
9+
.. image:: https://img.shields.io/travis/akeshavan/dmriprep.svg
10+
:target: https://travis-ci.org/akeshavan/dmriprep
11+
12+
.. image:: https://readthedocs.org/projects/dmriprep/badge/?version=latest
13+
:target: https://dmriprep.readthedocs.io/en/latest/?badge=latest
14+
:alt: Documentation Status
15+
16+
17+
18+
19+
Preprocessing of neuroimaging data in preparation for AFQ analysis
20+
21+
22+
* Free software: BSD license
23+
* Documentation: https://dmriprep.readthedocs.io.
24+
25+
26+
Features
27+
--------
28+
29+
* TODO
30+
31+
32+
Contributing
33+
------------
34+
35+
We love contributions! dmriprep is open source, built on open source,
36+
and we'd love to have you hang out in our community.
37+
38+
We have developed some `guidelines`_ for contributing to dmriprep.
39+
40+
**Imposter syndrome disclaimer**: We want your help. No, really.
41+
42+
There may be a little voice inside your head that is telling you that
43+
you're not ready to be an open source contributor; that your skills
44+
aren't nearly good enough to contribute. What could you possibly offer a
45+
project like this one?
46+
47+
We assure you - the little voice in your head is wrong. If you can
48+
write code at all, you can contribute code to open source. Contributing
49+
to open source projects is a fantastic way to advance one's coding
50+
skills. Writing perfect code isn't the measure of a good developer (that
51+
would disqualify all of us!); it's trying to create something, making
52+
mistakes, and learning from those mistakes. That's how we all improve,
53+
and we are happy to help others learn.
54+
55+
Being an open source contributor doesn't just mean writing code, either.
56+
You can help out by writing documentation, tests, or even giving
57+
feedback about the project (and yes - that includes giving feedback
58+
about the contribution process). Some of these contributions may be the
59+
most valuable to the project as a whole, because you're coming to the
60+
project with fresh eyes, so you can see the errors and assumptions that
61+
seasoned contributors have glossed over.
62+
63+
64+
Credits
65+
-------
66+
67+
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
68+
69+
The imposter syndrome disclaimer was originally written by `Adrienne
70+
Lowe`_ for a `PyCon talk`_, and was adapted based on its use in the
71+
README file for the `MetPy project`_.
72+
73+
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
74+
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
75+
.. _`Adrienne Lowe`: https://github.com/adriennefriend
76+
.. _`Pycom talk`: https://www.youtube.com/watch?v=6Uj746j9Heo
77+
.. _`MetPy project`: https://github.com/Unidata/MetPy
78+
.. _`guidelines`: CONTRIBUTING.rst

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[build-system]
2+
requires = ["setuptools >= 40.8.0", "wheel", "numpy", "cython"]

setup.cfg

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ classifiers =
2121
python_requires = >=3.5
2222
install_requires =
2323
niworkflows ~= 0.10.1
24-
smriprep @ git+https://github.com/poldracklab/smriprep.git@9f58665830570835545ff83fea1dc91e89706591
24+
smriprep ~= 0.3.0
2525
templateflow ~= 0.4.1
2626
nibabel >=2.2.1
2727
indexed_gzip >=0.8.8
@@ -73,19 +73,11 @@ all =
7373

7474
[options.package_data]
7575
dmriprep =
76-
data/*.json
77-
data/*.nii.gz
78-
data/*.mat
79-
data/boilerplate.bib
80-
data/itkIdentityTransform.txt
81-
data/flirtsch/bbr.sch
8276
VERSION
8377

8478
[options.entry_points]
8579
console_scripts =
8680
dmriprep=dmriprep.cli.run:main
87-
dmriprep-boldmask=dmriprep.cli.dmriprep_bold_mask:main
88-
sample_openfmri=dmriprep.cli.sample_openfmri:main
8981

9082
[versioneer]
9183
VCS = git

setup.py

Lines changed: 20 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,20 @@
1-
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
3-
4-
"""The setup script."""
5-
6-
from setuptools import setup, find_packages
7-
8-
with open("README.md") as readme_file:
9-
readme = readme_file.read()
10-
11-
with open("HISTORY.rst") as history_file:
12-
history = history_file.read()
13-
14-
requirements = [
15-
"Click>=6.0",
16-
"dask",
17-
"dipy",
18-
"nipype",
19-
"pandas",
20-
"parse",
21-
"tqdm",
22-
"pybids",
23-
"matplotlib",
24-
"cytoolz",
25-
"numba",
26-
]
27-
28-
extras_require = {"dev": ["flake8", "pytest", "pytest-cov", "pre-commit"]}
29-
30-
setup_requirements = ["pytest-runner"]
31-
32-
test_requirements = ["pytest"]
33-
34-
setup(
35-
author="Anisha Keshavan",
36-
author_email="[email protected]",
37-
classifiers=[
38-
"Development Status :: 2 - Pre-Alpha",
39-
"Intended Audience :: Developers",
40-
"License :: OSI Approved :: BSD License",
41-
"Natural Language :: English",
42-
"Programming Language :: Python :: 3",
43-
"Programming Language :: Python :: 3.6",
44-
"Programming Language :: Python :: 3.7",
45-
],
46-
description="Preprocessing of neuroimaging data in preparation for AFQ analysis",
47-
entry_points={
48-
"console_scripts": [
49-
"dmriprep=dmriprep.cli:main",
50-
"dmriprep-data=dmriprep.cli:data",
51-
"dmriprep-upload=dmriprep.cli:upload",
52-
]
53-
},
54-
scripts=["./dmriprep-docker"],
55-
install_requires=requirements,
56-
extras_require=extras_require,
57-
license="BSD license",
58-
long_description=readme + "\n\n" + history,
59-
include_package_data=True,
60-
keywords="dmriprep",
61-
name="dmriprep",
62-
packages=find_packages(include=["dmriprep"]),
63-
setup_requires=setup_requirements,
64-
test_suite="tests",
65-
tests_require=test_requirements,
66-
url="https://github.com/nipy/dmriprep",
67-
version="0.1.0",
68-
zip_safe=False,
69-
)
1+
"""dMRIPrep's setup script."""
2+
import sys
3+
from setuptools import setup
4+
import versioneer
5+
6+
# Give setuptools a hint to complain if it's too old a version
7+
# 30.3.0 allows us to put most metadata in setup.cfg
8+
# Should match pyproject.toml
9+
# Not going to help us much without numpy or new pip, but gives us a shot
10+
SETUP_REQUIRES = ['setuptools >= 40.8']
11+
# This enables setuptools to install wheel on-the-fly
12+
SETUP_REQUIRES += ['wheel'] if 'bdist_wheel' in sys.argv else []
13+
14+
15+
if __name__ == '__main__':
16+
setup(name='dmriprep',
17+
version=versioneer.get_version(),
18+
cmdclass=versioneer.get_cmdclass(),
19+
setup_requires=SETUP_REQUIRES,
20+
)

0 commit comments

Comments
 (0)