Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 5.15 KB

CONTRIBUTING.md

File metadata and controls

55 lines (41 loc) · 5.15 KB

Contributing

Contributions to the EMAworkbench are very welcome! In this document you will find some information how to do so, and some information for maintainers such as the release process.

Issues

Reporting issues, such as bugs or unclairties in the documentation can be done (as usual) via the Issues section. You can also request new features that you would like to see in the EMAworkbench. Please first search if your bug or request already exists.

In case of a bug, please give us as much useful information possible to work with, including your coding environment, code snippets and if necessary a model. Important are the exact steps to reproduce and what you already found out yourself.

PRs

Pull requests are very welcome, both to the code itself and the documentation. If you make a code change, make sure to document it well. This can be done inline, which will be picked up by Readthedocs, and in case of a larger feature, also in a tutorial and/or example.

When still working on something, you can also open a draft pull request. This way we can pitch in early and prevent double work.

All Python code follows Black formatting.

First time Git(Hub) contributor

If you have never contributed to a git project or specifically a project hosted on GitHub before, here are a few pointers on how to start.

GitHub Desktop also makes managing forks and branches easy by using a visual interface.

For a simple single-file code or docs change, you can also just edit any file in this repository from your webbrowser and it wil fork and branch automatically, after which you can open a PR.

Maintainers

This section is targeted at the maintainers

Merging Pull Requests

Pull requests should be merged in a way that only atomic commits make it in the main branch. This keeps the git commit history clean and tidy, and therefore useful. This means every commit only pertains one fix or feature, and can't be breaked into multiple commits without breaking things. It also means no merge commits are allowed. For more about atomic commits, see one and two.

There are two ways to do this:

  • For (reducing to) a single commit: Use the Squash and merge button in the GitHub UI. Make sure the commit message and description are properly formatted and contain all the improtant information from the PR when squashing.
  • For (keeping) multiple commits: Merge from the command line. First make sure all commits are atomic and contain proper commit messages. Us git amend, reset and rebase if nessesary. Then do a fast-forward merge, using:
    git fetch origin
    git checkout master
    git merge --ff-only -S origin/BRANCH-TO-MERGE
    git push origin
    
    In which BRANCH-TO-MERGE the branch is of the PR you want to merge, and -S makes sure you sign the commits.

Releases

The release process has been updated starting at the 2.2.0 release. To create a new release, follow the following steps:

  1. Make sure all PRs have a clear title and are labeled with at least one label. These will be used when drafting the changelog using the .github/release.yml configuration.
  2. Go to Releases in the GitHub UI and press the Draft a new release button
  3. Set the upcoming tag in the Choose a tag and Release title (i.e. 2.3.0) fields
  4. Use the Generate release notes button to auotmatically create release notes. Review them carefully.
  5. Write a Highlights section with the most important features or changes in this release.
  6. Copy the release notes and save them with the grey Save draft button.
  7. Open a new PR in which the version number in ema_workbench/init.py is updated and the copied release notes are added to the CHANGELOG.md.
  8. Once this PR is merged, go back to the Releases section and Publish the draft release.
  9. The release.yml CI workflow should now automatically create and upload the package to PyPI. Check if this happened on PyPI.org.
  10. Finally, open a new PR in which the version number in ema_workbench/init.py is updated towards the next release (i.e. "2.4.0-dev").