Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Update CONTRIBUTING and README with developer installation, contributing and testing instructions #375

Merged
merged 6 commits into from
Aug 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 38 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,39 +116,57 @@ The current list of labels are [here][link_labels] and include:

## Making a change

We appreciate all contributions to tedana, but those accepted fastest will follow a workflow similar to the following:
We appreciate all contributions to `tedana`, but those accepted fastest will follow a workflow similar to the following:

**1. Comment on an existing issue or open a new issue referencing your addition.**
### 1. Comment on an existing issue or [open a new issue][link_createissue] referencing your addition

This allows other members of the tedana 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.
This allows other members of the `tedana` 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.

[This blog][link_pushpullblog] is a nice explanation of why putting this work in up front is so useful to everyone involved.

**2. [Fork][link_fork] the [tedana repository][link_tedana] to your profile.**
### 2. [Fork][link_fork] the [tedana repository][link_tedana] to your GitHub profile

This is now your own unique copy of tedana. Changes here won't effect anyone else's work, so it's a safe space to explore edits to the code!
This is now your own unique and online copy of `tedana`. Changes here won't affect anyone else's work, so it's a safe space to explore edits to the code!

Make sure to [keep your fork up to date][link_updateupstreamwiki] with the master repository.
Remember to [clone your fork][link_clonerepo] of `tedana` to your local machine, which will allow you to make local changes to `tedana`.

**3. Make the changes you've discussed.**
Make sure to always [keep your fork up to date][link_updateupstreamwiki] with the master repository before and after making changes.

Try to keep the changes focused. We've found that working on a [new branch][link_branches] makes it easier to keep your changes targeted.
### 3. Run the developer setup

When you're creating your pull request, please make sure to review the tedana [style conventions](#style-guide).

Note that to test a change, you may need to set up your local repository to run a tedana workflow.
To test a change, you may need to set up your local repository to run a `tedana` workflow.
To do so, run
```
python setup.py develop
pip install -e .
```
which should ensure all packages are correctly organized and linked on your user profile.
from within your local `tedana` repository. This should ensure all packages are correctly organized and linked on your user profile.

Once you've run this, your repository should be set for most changes (i.e., you do not have to re-run with every change).

**4. Submit a [pull request][link_pullrequest].**
### 4. Make the changes you've discussed

Try to keep the changes focused to the issue. We've found that working on a [new branch][link_branches] for each issue makes it easier to keep your changes targeted.

Using a new branch allows you to follow the standard "fork/branch/commit/pull-request/merge" GitHub workflow when making changes. [This guide][link_gitworkflow] provides a useful overview for this workflow.

Before creating your pull request, please make sure to review the `tedana` [style conventions](#style-guide).

### 5. Test your changes

For changes to documentation, we suggest rendering the HTML files locally in order to review the changes before submitting a pull request. This can be done by running
```
html make
```
from the `docs` directory in your local `tedana` repository. You should then be able to access the rendered files in the `docs/_build` directory, and view them in your browser.


### 6. Submit a [pull request][link_pullrequest]

When opening the pull request, we ask that you follow some [specific conventions](#pull-requests). We outline these below.

After you have submitted the pull request, a member of the development team will review your changes to confirm that they can be merged into the main code base.

A member of the development team will review your changes to confirm that they can be merged into the main code base.
When opening the pull request, we ask that you follow some [specific conventions](#pull-requests).
We outline these below.
After successful merging of the pull request, remember to [keep your fork up to date][link_updateupstreamwiki] with the master `tedana` repository and to delete the branch on your fork that was used for the merged pull request.

### Pull Requests

Expand Down Expand Up @@ -251,6 +269,9 @@ You're awesome. :wave::smiley:
[link_pushpullblog]: https://www.igvita.com/2011/12/19/dont-push-your-pull-requests/
[link_updateupstreamwiki]: https://help.github.com/articles/syncing-a-fork/
[link_branches]: https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/
[link_createissue]: https://help.github.com/articles/creating-an-issue/
[link_clonerepo]: https://help.github.com/articles/cloning-a-repository/
[link_gitworkflow]: https://guides.github.com/introduction/flow/

[link_numpydoc]: https://numpydoc.readthedocs.io/en/latest/format.html
[link_pep8]: https://www.python.org/dev/peps/pep-0008/
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ More information and documentation can be found at https://tedana.readthedocs.io

## Installation

### Use `tedana` with your local Python environment

You'll need to set up a working development environment to use `tedana`.
To set up a local environment, you will need Python >=3.5 and the following packages will need to be installed:

Expand Down Expand Up @@ -69,6 +71,10 @@ conda deactivate
NOTE: Conda < 4.6 users will need to use the soon-to-be-deprecated option `source` rather than `conda` for the activation and deactivation steps.
You can read more about managing conda environments and this discrepancy [here](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html).

### Use and contribute to `tedana` as a developer

If you aim to contribute to the `tedana` code base and/or documentation, please first read the developer installation instructions in [our contributing section](https://github.com/ME-ICA/tedana/blob/master/CONTRIBUTING.md). You can then continue to set up your preferred development environment.

## Getting involved

We :yellow_heart: new contributors!
Expand Down