# Developer's guide ## How to submit an [issue](https://github.com/PMEAL/OpenPNM/issues) In case any of the following applies, go ahead and create an [issue](https://github.com/PMEAL/OpenPNM/issues) *. - You have a general question such as "how to do X in `OpenPNM`" ** - You have found a bug or even a typo in our documentation or in the dosctrings - You have a nice or essential feature in mind that's missing in `OpenPNM` \* When submitting a new issue, we ask that you use one of the three available templates. The templates have sections that give sufficient information and context to the developers to address your issue as quickly as possible. \** We also insist that you first go through our [examples](https://github.com/PMEAL/OpenPNM/tree/dev/examples). Our examples are fairly well organized, and there is a table of contents that you should be able to skim through fairly quickly. ## How to submit a [pull request](https://github.com/PMEAL/OpenPNM/pulls) When proposing a change of any sort (bug fix, new feature, typo in documentation, etc.), it is recommended that you first open up an [issue](https://github.com/PMEAL/OpenPNM/issues), explaining the bug, new feature, etc, and discussion with the developers can occur to help focus the issue. Once the issue and solution are well defined, you will hopefully proceed with creating the pull request to actually implement the code changes. The steps for creating a pull request are outlined in [this tutorial](https://github.com/PMEAL/OpenPNM/blob/dev/examples/tutorials/using_and_contributing_to_the_dev_version.md). GitHub has a way of associating issues with pull requests (see [here](https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) for more details). You can use the following keywords to do this: - `close` , `closes` , `closed` - `fix` , `fixes` , `fixed` - `resolve` , `resolves` , `resolved` For instance, if your pull request is addressing issues 15, 28, and 122, you can include the following message somewhere in the pull request: ``` Fixes #15, closes #28, resolves #122. ``` The important part is that you need to use multiple keywords for multiple issues (you can use the same keyword though, e.g. using `fixes` multiple times). ## Development workflow We use semantic versioning for versioning `OpenPNM`. In case you're not familiar, it's basically making version numbers sort of human-readable! A version number must be in form of three digits separated by a dot, for example `3.2.5`. You only change the first digit whenever you make a "major" change to your software, for instance changes that make your software backwards-incompatible. The second digit is changed when you make a "minor" change, and finally for bug fixes and other "patch"-type changes, you bump the third digit. The way we develop `OpenPNM` is as follows: - We always merge pull requests onto the `dev` branch. So, you can get the latest and greatest changes on the `dev` branch. Steps for cloning the repo using a git client are outlined in [this tutorial](https://github.com/PMEAL/OpenPNM/blob/dev/examples/tutorials/using_and_contributing_to_the_dev_version.md) - Once in a while (usually three to four times a year), we merge the `dev` branch onto the `release` branch. As the name suggests, the `release` branch is the one that is installed when using `pip` or `conda` (don't use `pip`, use `conda` instead :sunglasses:). Although we don't merge any broken pull request onto the `dev` branch we often tweak things before final release, so generally the `release` branch is more stable. - When merging the `dev` branch onto the `release` branch, our automated workflow is triggered, generating the changelog and publishing `OpenPNM` on `PyPI` and `conda`. Here's an overview of what's happening under the hood for those interested!