Skip to content

Latest commit

 

History

History
35 lines (29 loc) · 1.81 KB

CONTRIBUTING.md

File metadata and controls

35 lines (29 loc) · 1.81 KB

Contribution Guidelines

Workflow

  1. Fork this repository;
  2. follow the project structure;
  3. commit frequently with clear messages;
  4. send a pull request to the master branch of this repository.

Coding

Style

Comply with PEP 8 and Wikimedia conventions:

  • 4 spaces for indentation;
  • snake-case style AKA underscore as a word separator (files, variables, functions);
  • UPPERCASE constants;
  • anything else is lowercase;
  • 2 empty lines to separate functions;
  • 80 characters per line, and up to 100 when suitable;
  • single-quoted strings, unless single-quotes are in a string.

Type Hints

Add type hints at least to public function signatures.

Documentation

Write Sphinx docstrings at least for public functions and classes:

Refactoring

  • Fix pylint errors: pylint -j 0 -E PATH_TO_YOUR_CONTRIBUTION;
  • look at pylint warnings: pylint -j 0 -d all -e W PATH_TO_YOUR_CONTRIBUTION;
  • reduce complexity: flake8 --select C90 --max-complexity 10 PATH_TO_YOUR_CONTRIBUTION;
  • apply relevant refactoring suggestions: pylint -j 0 -d all -e R PATH_TO_YOUR_CONTRIBUTION.