Welcome to the FitLins repository! We're excited you're here and want to contribute.
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!
Before you start you'll need to set up a free GitHub account and sign in. Here are some instructions.
Already know what you're looking for in this guide? Jump to the following sections:
- Joining the conversation
- Contributing through Github
- Understanding issues
- Making a change
- Structuring contributions
- Licensing
- Recognizing contributors
FitLins is maintained by a growing group of enthusiastic developers— and we're excited to have you join! Most of our discussions will take place on open issues.
We also encourage users to report any difficulties they encounter on NeuroStars, a community platform for discussing neuroimaging.
We actively monitor both spaces and look forward to hearing from you in either venue!
git is a really useful tool for version control. GitHub sits on top of git and supports collaborative and distributed working.
If you're not yet familiar with git
, there are lots of great resources to help you git started!
Some of our favorites include the git Handbook and
the Software Carpentry introduction to git.
On GitHub, You'll use Markdown to chat in issues and pull requests.
You can think of Markdown as a few little symbols around your text that will allow GitHub
to render the text with a little bit of formatting.
For example you could write words as bold (**bold**
), or in italics (*italics*
),
or as a link ([link](https://https://youtu.be/dQw4w9WgXcQ)
) to another webpage.
GitHub has a really helpful page for getting started with writing and formatting Markdown on GitHub.
Every project on GitHub uses issues slightly differently.
The following outlines how the FitLins developers think about these tools.
-
Issues are individual pieces of work that need to be completed to move the project forwards. A general guideline: if you find yourself tempted to write a great big issue that is difficult to describe as one unit of work, please consider splitting it into two or more issues.
Issues are assigned labels which explain how they relate to the overall project's goals and immediate next steps.
The current list of issue labels are here and include:
-
These issues contain a task that a member of the team has determined we need additional help with.
If you feel that you can contribute to one of these issues, we especially encourage you to do so!
-
These issues point to problems in the project.
If you find new a bug, please give as much detail as possible in your issue, including steps to recreate the error. If you experience the same bug as one already listed, please add any additional information that you have as a comment.
-
These issues are asking for new features to be added to the project.
Please try to make sure that your requested feature is distinct from any others that have already been requested or implemented. If you find one that's similar but there are subtle differences, please reference the other request in your issue.
We appreciate all contributions to FitLins, 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.
This allows other members of the FitLins 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 is a nice explanation of why putting this work in up front is so useful to everyone involved.
2. Fork the FitLins repository to your profile.
This is now your own unique copy of FitLins. Changes here won't effect 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 with the upstream repository.
3. Select a target branch.
FitLins has development and maintenance branches.
New features and significant changes should target the dev
branch.
This is the equivalent of master
or main
in other repositories, and is where most effort
is targeted.
Maintenance branches are named maint/X.Y.x
, and accept bug fixes in the corresponding versions
X.Y.* (e.g., for a bug in 0.10.1, target maint/0.10.x
).
If you are submitting a bug-fix, please target the maintenance branch that corresponds to the
version of FitLins that the bug has been found in.
Fixes for unreleased bugs should target dev
.
To target a branch use the following process:
$ git fetch upstream
$ git checkout upstream/<branch> -b my-branch
For example, a fix against maint/0.10.x
might look like:
$ git checkout upstream/maint/0.10.x -b fix/mybug
4. Make the changes you've discussed, following the FitLins coding style guide.
Try to keep the changes focused. If you feel tempted to "branch out" then please make a new branch.
5. Submit a pull request.
A member of the development team will review your changes to confirm that they can be merged into the main code base.
Pull requests titles should begin with a descriptive prefix:
ENH
: enhancements or new featuresFIX
: bug fixesTST
: new or updated testsDOC
: new or updated documentationSTY
: style changesREF
: refactoring existing codeCI
: updates to continous integration infrastructureMAINT
: general maintenance
For example: [ENH] Support for naive thresholding
For works-in-progress, add the WIP
tag in addition to the descriptive prefix.
Pull-requests tagged with [WIP]
will not be merged until the tag is removed.
Be sure to target the correct branch!
Whenever possible, instances of Nodes and Workflows should use the same names as the variables they are assigned to. This makes it easier to relate the content of the working directory to the code that generated it when debugging.
Workflow variables should end in _wf
to indicate that they refer to Workflows
and not Nodes.
For instance, a workflow whose basename is myworkflow
might be defined as
follows:
from nipype.pipeline import engine as pe
myworkflow_wf = pe.Workflow(name='myworkflow_wf')
If a workflow is generated by a function, the name of the function should take
the form init_<basename>_wf
:
def init_myworkflow_wf(name='myworkflow_wf):
workflow = pe.Workflow(name=name)
...
return workflow
myworkflow_wf = init_workflow_wf(name='myworkflow_wf')
If multiple instances of the same workflow might be instantiated in the same namespace, the workflow names and variables should include either a numeric identifier or a one-word description, such as:
myworkflow0_wf = init_workflow_wf(name='myworkflow0_wf')
myworkflow1_wf = init_workflow_wf(name='myworkflow1_wf')
# or
myworkflow_lh_wf = init_workflow_wf(name='myworkflow_lh_wf')
myworkflow_rh_wf = init_workflow_wf(name='myworkflow_rh_wf')
FitLins is licensed under the Apache License, 2.0. By contributing to FitLins, you acknowledge that any contributions will be licensed under the same terms.
We welcome and recognize all contributions from documentation to testing to code development. You can see a list of current contributors in our zenodo file. If you are new to the project, don't forget to add your name and affiliation there!
You're awesome. 👋😃
— Based on contributing guidelines from the STEMMRoleModels project.