These contributing rules largely follow Slicer's contributing documentation.
To contribute, you can :
- Ask a question on the Slicer forum
- Use Issues to submit a feature request or bug, or add to the discussion on an existing issue
- Submit a Pull Request to improve this plugin or its documentation
We encourage a range of Pull Requests, from patches that include passing tests and documentation, all the way down to half-baked ideas that launch discussions.
If you are new to Slicer plugin development and you don't have push access to the plugin repository, here are the steps:
- Fork and clone the repository.
- Create a branch.
- Push the branch to your GitHub fork.
- Create a Pull Request.
This corresponds to the Fork & Pull Model
mentioned in
the GitHub flow
guides.
When submitting a PR, the developers following the project will be notified. That said, to engage specific developers,
you can add Cc: @<username>
comment to notify them of your awesome contributions. Based on the comments posted by the
reviewers, you may have to revisit your patches.
This plugin follows Slicer's commit message standard :
FIX:
Fix for runtime crash or incorrect resultCOMP:
Compiler error or warning fixDOC:
Documentation changeENH:
New functionalityPERF:
Performance improvementSTYLE:
No logic impact (indentation, comments)WIP:
Work In Progress not ready for merge
The body of the message should clearly describe the motivation of the commit (what, why, and how). In order to ease the task of reviewing commits, the message body should follow the following guidelines:
- Leave a blank line between the subject and the body. This helps
git log
andgit rebase
work nicely, and allows to smooth generation of release notes. - Try to keep the subject line below 72 characters, ideally 50.
- Capitalize the subject line.
- Do not end the subject line with a period.
- Use the imperative mood in the subject line (e.g.
FIX: Fix spacing not being considered.
). - Wrap the body at 80 characters.
- Use semantic line feeds to separate different ideas, which improves the readability.
- Be concise, but honor the change: if significant alternative solutions were available, explain why they were discarded.
- If the commit refers to a topic discussed on the Slicer forum, or fixes a regression test, provide the link. If it fixes a compiler error, provide a minimal verbatim message of the compiler error. If the commit closes an issue, use the GitHub issue closing keywords.
Keep in mind that the significant time is invested in reviewing commits and pull requests, so following these guidelines will greatly help the people doing reviews.
How to Write a Commit Message post.
Examples:
- Bad:
FIX: Check pointer validity before dereferencing
-> implementation detail, self-explanatory (by looking at the code) - Good:
FIX: Fix crash in Module X when clicking Apply button
- Bad:
ENH: More work in qSlicerXModuleWidget
-> more work is too vague, qSlicerXModuleWidget is too low level - Good:
ENH: Add float image outputs in module X
- Bad:
COMP: Typo in cmake variable
-> implementation detail, self-explanatory - Good:
COMP: Fix compilation error with Numpy on Visual Studio
Getting your contributions integrated is relatively straightforward, here is the checklist:
- All tests pass
- At least one reviewer has approved the changes.
- The maintainer of the project will then merge the changes to the plugin.