Skip to content

Latest commit

 

History

History
68 lines (49 loc) · 2.83 KB

CONTRIBUTING.md

File metadata and controls

68 lines (49 loc) · 2.83 KB

Contribution Guide

Dependencies

pydicom (use the most recent development version)

How to contribute

  1. Fork the master branch of the project repository by clicking on the 'Fork' button near the top right of the page. This creates a copy of the repository under your GitHub user account. For more details on how to fork a repository see this guide.

  2. Clone your fork to your local disk:

    $ git clone [email protected]:YourLogin/pynetdicom3.git
    $ cd pynetdicom3
  3. Create a new branch to hold your development changes:

    $ git checkout -b my-branch
  4. Develop the feature on your branch. Files can be added using git add and changes committed using git commit. For more on using git see the Git documentation.

  5. When you're ready, push your changes to your GitHub account:

    $ git push -u origin my-branch
  6. You can then create a pull request using these instructions.

Pull Requests

  • Please prefix the title of your pull request with [WIP] if its in progress and [MRG] when you consider it complete and ready for review.

  • When fixing bugs your first commit should be the addition of tests that reproduce the original issue and any related issues.

  • When adding features you should have complete documentation and high coverage unit tests (95-100%) that cover not just the lines of code but ensure that the feature works as intended.

  • When writing documentation please reference the DICOM Standard where possible. When dealing with significant parts of the code base (DIMSEMessage.decode_msg() for example) you should have inline comments that reference both the DICOM Standard and explain in detail what the code is doing and why.

  • Docstrings should follow the numpy docstring style.

Code Style

PEP8 should be followed where it makes sense to do so. In addition there are a handful of project specific styles that should be used:

  • ae for an ApplicationEntity object
  • assoc for an Association object
  • Variable and function names should be lower_case_underscore, including acronyms such as context_id and uid.
  • Where a variable corresponds directly to a DICOM DataElement then use a name that is identical to the element keyword (i.e. the DIMSE command set elements such as MessageID and AffectedSOPClassUID correspond to the dimse_primitives attributes such as C_STORE.MessageID and C_STORE.AffectedSOPClassUID).

Testing

  • pylint
  • pytest

Documentation

Building the documentation requires:

  • sphinx
  • numpy
  • matplotlib
  • pillow
  • pydicom