Difference between revisions of "Contribute code"
(→Code Style Guide For Archivematica: pothole case instead of camel, updating import guidelines) |
(→Code Style Guide For Archivematica: Update to reference external guidelines mostly) |
||
Line 14: | Line 14: | ||
=== Code Style Guide For Archivematica === | === Code Style Guide For Archivematica === | ||
− | |||
− | |||
− | |||
− | * | + | Archivematica follows common Python coding standards, notably |
− | * | + | * [https://www.python.org/dev/peps/pep-0008/ PEP8] for styling |
− | * | + | ** Exception is line length, which should be wrapped at 79 characters or left long for the IDE to wrap. |
− | + | ** Imports are sorted alphabetically within their grouping to reduce duplicate imports | |
− | * | + | * [https://www.python.org/dev/peps/pep-0257/ PEP257] for docstring structure |
− | + | ** Parameters and return values should be specified in Sphinx-style. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | We encourage installing a Python linter to help with this. [https://pypi.python.org/pypi/flake8 flake8] is recommended because it wraps three common linters (pep8, pyflakes, mccabe). | |
− | |||
− | |||
− | |||
− | + | * Install instructions for [https://github.com/SublimeLinter/SublimeLinter-flake8 SublimeLinter-flake8] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== File Structure === | === File Structure === |
Revision as of 14:53, 11 August 2015
Main Page > Development > Contribute code
Patches
If you find a bug in this project or would like to make an enhancement, please be encouraged to contribute a patch by following these instructions.
Commit access
Anyone can contribute code patches to this project. Project collaborators and regular patch contributors will be given access to commit directly to the git code repository.
Contributor's Agreement
In order to accept any patches or code commits, contributors must first sign the Archivematica Contributor's Agreement.
Standards
Code Style Guide For Archivematica
Archivematica follows common Python coding standards, notably
- PEP8 for styling
- Exception is line length, which should be wrapped at 79 characters or left long for the IDE to wrap.
- Imports are sorted alphabetically within their grouping to reduce duplicate imports
- PEP257 for docstring structure
- Parameters and return values should be specified in Sphinx-style.
We encourage installing a Python linter to help with this. flake8 is recommended because it wraps three common linters (pep8, pyflakes, mccabe).
- Install instructions for SublimeLinter-flake8
File Structure
The file structure in Archivematica will comply with the Filesystem Hierarchy Standard (FHS).
More information on this standard is available at:
http://www.pathname.com/fhs/