Skip to content

Commit 9f3bd59

Browse files
authored
Merge pull request #2393 from emdupre/contributing-docs
[DOC] Update CONTRIBUTING [skip ci]
2 parents dd2fb79 + 6aaa85a commit 9f3bd59

File tree

2 files changed

+160
-62
lines changed

2 files changed

+160
-62
lines changed

CONTRIBUTING.md

Lines changed: 143 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,143 @@
1-
**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 Nipype and other Open Source projects. All the Nipype specific contributing instructions listed below will make much more sense after reading this guide.
2-
3-
## Contributing pull-requests (PRs)
4-
5-
* All work is submitted via Pull Requests.
6-
* Pull Requests can be submitted as soon as there is code worth discussing.
7-
Pull Requests track the branch, so you can continue to work after the PR is submitted.
8-
Review and discussion can begin well before the work is complete,
9-
and the more discussion the better.
10-
The worst case is that the PR is closed.
11-
* Pull Requests should generally be made against master
12-
* Pull Requests should be tested, if feasible:
13-
- bugfixes should include regression tests
14-
- new behavior should at least get minimal exercise
15-
* Use a descriptive prefix for your PR: ENH (enhancement), FIX, TST, DOC, STY, REF (refactor), WIP (Work in progress)
16-
* The person who accepts/merges your PR will include an update to the CHANGES file: prefix: description (URL of pull request)
17-
* Run `make check-before-commit` before submitting the PR.
18-
This will require you to either install or be in developer mode with: `python setup.py install/develop`.
19-
* In general, do not catch exceptions without good reason.
20-
* catching non-fatal exceptions.
21-
Log the exception as a warning.
22-
* adding more information about what may have caused the error.
23-
Raise a new exception using ``raise_from(NewException("message"), oldException)`` from ``future``.
24-
Do not log this, as it creates redundant/confusing logs.
25-
* **If you are new to the project don't forget to add your name and affiliation to the `.zenodo.json` file.**
26-
27-
## Contributing issues
28-
29-
When opening a new Issue, please take the following steps:
30-
31-
1. Search GitHub and/or [Neurostars](http://neurostars.org) for your issue to avoid duplicate reports.
32-
Keyword searches for your error messages are most helpful.
33-
2. If possible, try updating to master and reproducing your issue,
34-
because we may have already fixed it.
35-
3. OS and version
36-
4. Nipype version
37-
5. Output of: `import nipype; nipype.get_info()`
38-
6. Versions of underlying tools (e.g., ANTS, FSL, SPM, etc.,.)
39-
7. Any script, or output log, in a gist (gist.github.com)
40-
8. When applicable, and where possible, pointers to relevant data files.
1+
# Contributing to Nipype
2+
3+
Welcome to the Nipype repository! We're excited you're here and want to contribute.
4+
5+
These guidelines are designed to make it as easy as possible to get involved. If you have any questions that aren't discussed below, please let us know by opening an [issue][link_issues]!
6+
7+
Before you start you'll need to set up a free [GitHub][link_github] account and sign in. Here are some [instructions][link_signupinstructions].
8+
9+
Already know what you're looking for in this guide? Jump to the following sections:
10+
* [Understanding issue labels](#issue-labels)
11+
* [Making a change](#making-a-change)
12+
* [How to tag pull requests](#tagging-pull-requests)
13+
* [Notes for new code](#notes-for-new-code)
14+
* [Recognizing contributions](#recognizing-contributions)
15+
16+
## Issue labels
17+
18+
The current list of issue labels are [here][link_labels] and include:
19+
20+
* [![Bugs](https://img.shields.io/badge/-bugs-fc2929.svg)][link_bugs] *These issues point to problems in the project.*
21+
22+
If you find new a bug, please provide as much information as possible to recreate the error.
23+
The [issue template][link_issue_template] will automatically populate any new issue you open, and contains information we've found to be helpful in addressing bug reports.
24+
Please fill it out to the best of your ability!
25+
26+
If you experience the same bug as one already listed in an open issue, please add any additional information that you have as a comment.
27+
28+
* [![Help Wanted](https://img.shields.io/badge/-help%20wanted-c2e0c6.svg)][link_helpwanted] *These issues contain a task that a member of the team has determined we need additional help with.*
29+
30+
If you feel that you can contribute to one of these issues, we especially encourage you to do so!
31+
Issues that are also labelled as [good-first-issue][link_good_first_issue] are a great place to start if you're looking to make your first contribution.
32+
33+
* [![Enhancement](https://img.shields.io/badge/-enhancement-00FF09.svg)][link_enhancement] *These issues are asking for new features to be added to the project.*
34+
35+
Please try to make sure that your requested enhancement is distinct from any others that have already been requested or implemented.
36+
If you find one that's similar but there are subtle differences, please reference the other request in your issue.
37+
38+
## Making a change
39+
40+
We appreciate all contributions to Nipype, but those accepted fastest will follow a workflow similar to the following:
41+
42+
**1. Comment on an existing issue or open a new issue referencing your addition.**
43+
44+
This allows other members of the Nipype development team to confirm that you aren't overlapping with work that's currently underway and that everyone is on the same page with the goal of the work you're going to carry out.
45+
46+
[This blog][link_pushpullblog] is a nice explanation of why putting this work in up front is so useful to everyone involved.
47+
48+
**2. [Fork][link_fork] the [Nipype repository][link_nipype] to your profile.**
49+
50+
This is now your own unique copy of Nipype.
51+
Changes here won't affect anyone else's work, so it's a safe space to explore edits to the code!
52+
53+
Make sure to [keep your fork up to date][link_updateupstreamwiki] with the master repository.
54+
55+
**3. Make the changes you've discussed.**
56+
57+
If you're adding a new tool from an existing neuroimaging toolkit (e.g., 3dDeconvolve from AFNI), check out the [guide for adding new interfaces to Nipype][link_new_interfaces].
58+
59+
To confirm that your changes worked as intended, [clone your fork][link_cloning] to create a local directory.
60+
In this local directory, run `python setup.py develop`.
61+
This will add your version of nipype to your local python environment.
62+
63+
Then, in this local nipype directory, run `make check-before-commit`. If you get no errors, you're ready to submit your changes!
64+
65+
**4. Submit a [pull request][link_pullrequest].**
66+
67+
Submit a new pull request for your changes, using the tags outlined in the [tagging pull requests section](#tagging-pull-requests).
68+
69+
A member of the development team will review your changes to confirm that they can be merged into the main codebase.
70+
71+
## Tagging Pull Requests
72+
73+
Pull requests should be submitted early and often! When opening a pull request, please use one of the following prefixes:
74+
75+
76+
* **[ENH]** for enhancements
77+
* **[FIX]** for bug fixes
78+
* **[TST]** for new or updated tests
79+
* **[DOC]** for new or updated documentation
80+
* **[STY]** for stylistic changes
81+
* **[REF]** for refactoring existing code
82+
83+
<br>
84+
85+
If, when you submit, your pull request is not yet ready to be merged, please also include the **[WIP]** prefix. This tells the development team that your pull request is a "work-in-progress", and that you plan to continue working on it.
86+
87+
Review and discussion on new code can begin well before the work is complete, and the more discussion the better!
88+
In the worst case scenario, if the development team decides to pursue a different path than you've outlined, they'll close the pull request. That's really not so bad! :smile:
89+
90+
## Notes for New Code
91+
92+
#### Catching exceptions
93+
In general, do not catch exceptions without good reason.
94+
For non-fatal exceptions, log the exception as a warning and add more information about what may have caused the error.
95+
96+
If you do need to catch an exception, raise a new exception using ``raise_from(NewException("message"), oldException)`` from ``future``.
97+
Do not log this, as it creates redundant/confusing logs.
98+
99+
#### Testing
100+
New code should be tested, whenever feasible.
101+
Bug fixes should include regression tests, and any new behavior should at least get minimal exercise.
102+
If you're not sure what this means for your code, ask!
103+
104+
## Recognizing contributions
105+
106+
We welcome and recognize all contributions from documentation to testing to code development.
107+
108+
The development team member who accepts/merges your pull request will update the CHANGES file to reference your contribution.
109+
110+
You can see a list of current contributors in our [zenodo file][link_zenodo].
111+
If you are new to the project, don't forget to add your name and affiliation there!
112+
113+
## Thank you!
114+
115+
You're awesome. :wave::smiley:
116+
117+
<br>
118+
119+
*&mdash; Based on contributing guidelines from the [STEMMRoleModels][link_stemmrolemodels] project.*
120+
121+
[link_github]: https://github.com/
122+
[link_nipype]: https://github.com/nipy/nipype
123+
[link_signupinstructions]: https://help.github.com/articles/signing-up-for-a-new-github-account
124+
[link_react]: https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments
125+
[link_issues]: https://github.com/nipy/nipype/issues
126+
[link_labels]: https://github.com/nipy/nipype/labels
127+
[link_discussingissues]: https://help.github.com/articles/discussing-projects-in-issues-and-pull-requests
128+
129+
[link_bugs]: https://github.com/nipy/nipype/labels/bug
130+
[link_issue_template]: https://github.com/nipy/nipype/blob/master/.github/ISSUE_TEMPLATE.md
131+
[link_helpwanted]: https://github.com/nipy/nipype/labels/help-wanted
132+
[link_good_first_issue]: https://github.com/nipy/nipype/issues?q=is%3Aopen+is%3Aissue+label%3Agood-first-issue
133+
[link_enhancement]: https://github.com/nipy/nipype/labels/enhancement
134+
135+
[link_pullrequest]: https://help.github.com/articles/creating-a-pull-request/
136+
[link_fork]: https://help.github.com/articles/fork-a-repo/
137+
[link_pushpullblog]: https://www.igvita.com/2011/12/19/dont-push-your-pull-requests/
138+
[link_updateupstreamwiki]: https://help.github.com/articles/syncing-a-fork/
139+
140+
[link_new_interfaces]: http://nipype.readthedocs.io/en/latest/devel/interface_specs.html
141+
[link_cloning]: https://help.github.com/articles/cloning-a-repository/
142+
[link_stemmrolemodels]: https://github.com/KirstieJane/STEMMRoleModels
143+
[link_zenodo]: https://github.com/nipy/nipype/blob/master/.zenodo.json

doc/devel/interface_specs.rst

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,18 @@ Interface Specifications
77
Before you start
88
----------------
99

10-
Nipype is a young project maintained by an enthusiastic group of developers.
11-
Even though the documentation might be sparse or cryptic at times we strongly
12-
encourage you to contact us on the official nipype developers mailing list in
13-
case of any troubles: nipy-devel@neuroimaging.scipy.org (we are sharing a
14-
mailing list with the nipy community therefore please add ``[nipype]`` to the
15-
messsage title).
10+
Nipype is maintained by an enthusiastic group of developers, and we're excited to have you join us!
11+
In case of trouble, we encourage you to post on `NeuroStars <https://neurostars.org>`_ with the `nipype` tag.
12+
NeuroStars.org is a platform similar to StackOverflow but dedicated to neuroinformatics.
13+
You can also post on the nipype developers mailing list: http://mail.python.org/mailman/listinfo/neuroimaging.
14+
As we are sharing a mailing list with the nipy community, please add ``[nipype]`` to the message title.
1615

1716

1817
Overview
1918
--------
2019

21-
We're using the `Enthought Traits
22-
<http://code.enthought.com/projects/traits/>`_ package for all of our
20+
We're using the `Traits <http://docs.enthought.com/traits/traits_user_manual/intro.html>`_
21+
(formerly known as Enthought Traits) package for all of our
2322
inputs and outputs. Traits allows us to validate user inputs and
2423
provides a mechanism to handle all the *special cases* in a simple and
2524
concise way though metadata. With the metadata, each input/output can
@@ -37,36 +36,33 @@ Specification, you only need to learn a few of the basics of Traits.
3736
Here are a few starting points in the documentation:
3837

3938
* What are Traits? The `Introduction in the User Manual
40-
<http://code.enthought.com/projects/traits/docs/html/traits_user_manual/intro.html>`_
39+
<http://docs.enthought.com/traits/traits_user_manual/intro.html>`_
4140
gives a brief description of the functionality traits provides.
4241

4342
* Traits and metadata. The `second section of the User Manual
44-
<http://code.enthought.com/projects/traits/docs/html/traits_user_manual/defining.html>`_
43+
<http://docs.enthought.com/traits/traits_user_manual/defining.html>`_
4544
gives more details on traits and how to use them. Plus there a
4645
section describing metadata, including the metadata all traits have.
4746

4847
* If your interested in more of a *big picture* overview, `Gael wrote
4948
a good tutorial
50-
<http://code.enthought.com/projects/traits/docs/html/tutorials/traits_ui_scientific_app.html>`_
49+
<http://docs.enthought.com/traitsui/tutorials/traits_ui_scientific_app.html>`_
5150
that shows how to write a scientific application using traits for
5251
the benefit of the generated UI components. (For now, Nipype is not
5352
taking advantage of the generated UI feature of traits.)
5453

5554
Traits version
5655
^^^^^^^^^^^^^^
5756

58-
We're using Traits version 3.x which can be install as part of `EPD
59-
<http://enthought.com/products/epd.php>`_ or from `pypi
60-
<http://pypi.python.org/pypi/Traits/3.3.0>`_
57+
We're using Traits version 4.x which can be installed from `pypi
58+
<https://pypi.python.org/pypi/traits>`_
6159

6260
More documentation
6361
^^^^^^^^^^^^^^^^^^
6462

6563
Not everything is documented in the User Manual, in those cases the
66-
`enthought-dev mailing list
67-
<https://mail.enthought.com/mailman/listinfo/enthought-dev>`_ or the
68-
`API docs
69-
<http://code.enthought.com/projects/files/ETS32_API/enthought.traits.html>`_
64+
the `API docs
65+
<http://docs.enthought.com/traits/traits_api_reference/index.html>`_
7066
is your next place to look.
7167

7268
Nipype Interface Specifications
@@ -80,13 +76,12 @@ the interfaces. For example, Bet has these specs:
8076
- BETOutputSpec
8177

8278
Each of these Specs are classes, derived from a base TraitedSpec class
83-
(more on these below). The InputSpec consists of attributes which
79+
(more on these below). The InputSpec consists of attributes which
8480
correspond to different parameters for the tool they wrap/interface.
8581
In the case of a command-line tool like Bet, the InputSpec attributes
8682
correspond to the different command-line parameters that can be passed
87-
to Bet. If you are familiar with the Nipype 0.2 code-base, these
88-
attributes are the same as the keys in the opt_map dictionaries. When
89-
an interfaces class is instantiated, the InputSpec is bound to the
83+
to Bet.
84+
When an interfaces class is instantiated, the InputSpec is bound to the
9085
``inputs`` attribute of that object. Below is an example of how the
9186
``inputs`` appear to a user for Bet::
9287

0 commit comments

Comments
 (0)