How to Contribute#

First of all, thanks for considering contributing to this project!! Your help is highly appreciated!!

TLDR#

So this document got quite long… here is the very short summary/checklist:

  • [ ] don’t commit on main - use pull requests only

  • [ ] use this branch naming convention: feature/#39_bring_the_unicorns_back

  • [ ] commits must adhere to the conventional commits spec.

  • [ ] add copyright header to new file or add yourself as author in existing files.

  • [ ] sign your commits with a developer certificate of origin (dco) - (git commit -s -m "MESSAGE") or use vscode which is configured for the repo to do this automatically.

  • [ ] only once: add yourself as a contributor to NOTICE.md.

Pull requests only#

Use pull requests to contribute to this repository.

Pushes to the main branch are automatically rejected.

Keep your PRs focussed on a single purpose. For example, do not implement multiple features or fix multiple bugs in a single PR unless they are interconnected. Simply create separate PRs instead.

Branch naming convention#

Branches should be named with this scheme:

group/short_description

The group denotes the purpose of the contribution:

  • feature: A new feature

  • fix: A bug fix

  • ci: GitHub workflow only changes

  • docs: Documentation only changes

The short description should describe the change/feature etc. If you have a bigger change please create an issue here in github and use the number as short description, e.g. feature/#39_bring_the_unicorns_back

Conventional Commits#

We use Conventional Commits to automatically calculate the semantic version, create the changelog, and publish the release via Python-Semantic-Release tooling.

The following is a slightly adapted version (to doxysphinx) of the excellent Angular commit style.

Commit message format#

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:

<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>

The header is mandatory and the scope of the header is optional.

Any line of the commit message should not be longer than 100 characters!. This allows the message to be easier to read on GitHub as well as in various git tools.

Type#

Must be one of the following:

  • feat: A new feature

  • fix: A bug fix

  • docs: Documentation only changes

  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)

  • refactor: A code change that neither fixes a bug nor adds a feature

  • perf: A code change that improves performance

  • test: Adding missing or correcting existing tests

  • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation

Scope#

The scope could be anything specifying place of the commit change. For example parser, writer, config, examples, cli etc…

You can use * when the change affects more than a single scope or just leave (<scope>) out completely.

Subject#

The subject contains succinct description of the change:

  • use the imperative, present tense: “change” not “changed” nor “changes”

  • don’t capitalize first letter

  • no dot (.) at the end

Body#

Just as in the subject, use the imperative, present tense: “change” not “changed” nor “changes”. The body should include the motivation for the change and contrast this with previous behavior.

Reverting a commit#

If the commit reverts a previous commit, it should begin with revert:, followed by the header of the reverted commit. In the body it should say: This reverts commit <hash>., where the hash is the SHA of the commit being reverted.

Examples#

  • a very short new feature commit message:

    feat: add button that brings the unicorns back
    
  • a multiple changes (just add a newline and repeat the pattern) + breaking change commit message:

    feat(config): config file support
    
    Now we established our own configuration file mechanism. The previous command line argument based
    mechanism forced the users to always create a script, use makefiles etc. With the new mechanism only a
    config file needs to be given. Config can be read from yml, toml and json files. As we're often dealing with
    python projects there is also special support for pyproject.toml.
    
    fixes #59
    
    BREAKING CHANGE: cli arguments aren't supported anymore.
    
    docs(config): document config mechanism
    
    The new config mechanism is documentation in our sphinx documentation.