Contributing - diverso-lab/core Wiki

I want to contribute to the project. What should I do?

  1. Find one issue you want to resolve. Make sure nobody else is working on such issue.
  2. Follow the Development guide to set up the project. Consider you will have to fork the project you want to contribute to.
  3. Create a new branch from develop in your forked project.
git branch new-branch develop
  1. Make an empty commit on this branch and push.
git commit -m 'message' --allow-empty
git push -u origin new-branch
  1. Create a PR with this empty commit, from your new branch, to base repository's develop branch. This PR's name must end with a keyword such as "solves" or "fixes" followed by the issue it solves (e.g., solves #115)
  2. From this, any change you commit and push to your branch will be added to the PR. Keep committing until you finish developing your contribution and mention a maintainer so they can revise it. Check this to know the requisites to get you request accepted.

What can I contribute to?

You can contribute to any of the issues in any project.

How should I name my branches?

As branches will be just locally created by collaborators, there is no need to follow a strict branch naming policy. However, try making them as descriptive as possible with a format such as (feature/bug/hotfix)-short-description.

How should I commit?

Commits should be as descriptive and atomic as possible. However, commits collaborators make on their PRs will not be logged, as they will always be squashed.

For this reason, you will not have to worry much about commit messages following strict guidelines. Just see your commit history as a log for both maintainers and you to know the progress of the work.

First commit

A first and mandatory commit has to be done, as mentioned before, to create the PR. This commit should contain a brief description of the remaining work.

I found an error while working in a project. What should I do?

The error found is outside the scope of my work.

  1. Make sure it is an actual error and not a bad interaction between your code and the rest of the project.
  2. Open an issue to keep track of the error.
  3. You can assign the issue yourself if you either want to fix the error or need to do so for your code to work. If you want to fix that new issue, you SHOULD do it from a different PR. If it is impossible or too hard to separately fix it, fix the error on your already open PR, but you MUST clarify which commits are part of this new issue so maintainers know it when squashing.

The error found comes from my own code.

How and when can I open a new issue?

You can open an issue any time you find a bug or an idea to implement in a project. Whatever the reason is, issues will keep track of the remaining and finished tasks in projects. To keep the issues environment as efficient as possible, please consider the following practices:

What do I have to do to get my request accepted?

Mandatory conditions

Recommendations and good practices

These practices are not mandatory, but consider that highly messy contributions can be rejected. They also make it easier for maintainers to revise your requests, allowing them to give you feedback instead of just rejecting your contribution.

Descriptive pull requests

Clean code