Skip to content

Latest commit

 

History

History
134 lines (84 loc) · 7.54 KB

CONTRIBUTING.md

File metadata and controls

134 lines (84 loc) · 7.54 KB

Contributing to estraces

Thank you for considering to contribute to estraces project! There are various ways to contribute to the project, and every contributions are welcomed.

This document lays out guidelines and advice for contributing to this project. If you’re thinking of contributing, please start by reading this document and getting a feel for how contributing to this project works.

If you have any questions, please feel free to reach to the core contributors at [email protected].

Code of conduct

All forms of contribution and discussions on this project must respect some basic behavioral rules:

  • be kind
  • be respectful

Contribution Suitability

The core project maintainers have the last word on whether or not a contribution is suitable. All contributions will be considered carefully, but from time to time, contributions will be rejected because they do not suit the current goals or needs of the project.

If your contribution is rejected, don’t despair! As long as you followed these guidelines, you will have a much better chance of getting your next contribution accepted.

Bug reports

Bug reports are hugely important! Before you raise one, though, please check through the Gitlab issues, both open and closed, to confirm that the bug hasn’t been reported before. Duplicate bug reports are a huge drain on the time of other contributors, and should be avoided as much as possible.

When filling a new bug report, please use the appropriate template on the bug tracker, and gives as much as possible a reproducible scenario with all context elements.

Feature Requests

If you believe there is a feature missing, feel free to raise a feature request. You should use create an issue in the Gitlab issue tracker, with the appropriate template. Gives as much as possible context elements and rationale around why the feature you wish should be implemented.

Please do be aware that the overwhelming likelihood is that your feature request will not be accepted, or will take time to be implemented.

Documentation contributions

Documentation improvements are always welcome! The documentation files live in the docs/ directory of the codebase. They’re written in Markdown, and use Sphinx to generate the full suite of documentation.

When contributing documentation, please do your best to follow the style of the documentation files. When presenting Python code, use single-quoted strings ('hello' instead of "hello").

Code contributions

Steps for Submitting Code

When contributing code, you’ll want to follow this checklist:

  • Fork the repository on Gitlab.
  • Run the tests to confirm they all pass on your system. If they don’t, you’ll need to investigate why they fail. If you’re unable to diagnose this yourself, raise it as a bug report by following the guidelines in this document: Bug Reports.
  • Write tests that demonstrate your bug or feature. Ensure that they fail.
  • Make your change. Add you to the AUTHORS file.
  • Run the entire test suite again, confirming that all tests pass including the ones you just added.
  • Send a Gitlab Merge Request to the main repository’s master branch. Gitlab Merge Requests are the expected method of code collaboration on this project.

The following sub-sections go into more detail on some of the points above.

Code Review

Contributions will not be merged until they’ve been code reviewed. You should implement any code review feedback unless you strongly object to it. In the event that you object to the code review feedback, you should make your case clearly and calmly. If, after doing so, the feedback is judged to still apply, you must either apply the feedback or withdraw your contribution.

New Contributors

If you are new or relatively new to Open Source, welcome! If you’re concerned about how best to contribute, please consider mailing a maintainer (listed above) and asking for help.

Please also check the Get Early Feedback section.

Get Early Feedback

If you are contributing, do not feel the need to sit on your contribution until it is perfectly polished and complete. It helps everyone involved for you to seek feedback as early as you possibly can. Submitting an early, unfinished version of your contribution for feedback in no way prejudices your chances of getting that contribution accepted, and can save you from putting a lot of work into a contribution that is not suitable for the project.

  • have an issue on Gitlab. No issue, no dev.
  • checkout the project
  • create a branch from the master or identify the branch you should be working on, be it a feature or a bug branch. Reference the issue number in the branch name
  • work on the branch
  • commit often small functionnal perimeter - some passing tests with it's working code. Typical commit frequency is several times each day - several begins at 2 …
  • push less often, but regularly. Typical push frequency is daily.
  • when work is finished, ask for final review and merge request to the upstream.

Python development guidelines

For code contributions, please follows these guidelines

Python version

All developments should be compatible with Python 3.6 and above.

Test suite

The project uses pytest. To run all the test suite, simply run from you directory:

pytest

Please refer to Pytest documentation. As far as possible, tests should reflects the organization of the source code. Create folders and keep everything as clean as possible.

Code style and formatting

The projects follow the Python standards defined by PEP8, with some exceptions. The maximum line length is 160 characters.

You should lint your code with flake8, pep8-namin and flake8-docstrings. The linter configuration is in .flake8 file.

Docstrings

Each public API should be documented following PEP257.

It is up to you to decide if a there is a value in a docstring. In some cases, there is no value in a docstring for trivial methods or functions, like getters and setters ( but, well, maybe you shouldn't do too much getters and setters).

We use the Google style guide conventions for docstrings, and the API documentation is generated by Sphinx.