|
# Code Development
|
|
# Code Development
|
|
|
|
|
|
## Repository Structure
|
|
## Repository Structure
|
|
There main branches are:
|
|
The main branches are:
|
|
- `release`: latest code release
|
|
- `master`: bugfix updates since the last release, should always be runnable/stable code, e.g. could be used in production
|
|
- `master`: code updates since the last release, should always be runnable/stable code, e.g. could be used in production
|
|
- `develop`: current developments, waiting to be pushed into the `master` prior to a new release.
|
|
- `develop`: current developments, waiting to be pushed into the `master`
|
|
The code in `develop` is generally quite stable, but occasional regressions may occur.
|
|
|
|
- `maintenance-v1806`, `maintenance-v1712`, *etc*: bugfix branches for
|
|
|
|
previous releases. When a new code version is released, `master`
|
|
|
|
is renamed `maintenance-{prevRelease}` and a new `master` is created at release.
|
|
|
|
|
|
## Prerequisites
|
|
## Prerequisites
|
|
If not already installed, download the OpenFOAM-plus and ThirdParty-plus repositories to your local OpenFOAM installation directory:
|
|
If not already installed, download the OpenFOAM-plus and ThirdParty-plus repositories to your local OpenFOAM installation directory:
|
|
|
|
|
|
```
|
|
```
|
|
cd ~/OpenFOAM
|
|
cd ~/OpenFOAM # Or any other directory
|
|
git clone https://develop.openfoam.com/Development/OpenFOAM-plus.git
|
|
git clone https://develop.openfoam.com/Development/OpenFOAM-plus.git
|
|
git clone https://develop.openfoam.com/Development/ThirdParty-plus.git
|
|
git clone https://develop.openfoam.com/Development/ThirdParty-plus.git
|
|
```
|
|
```
|
... | @@ -24,6 +27,9 @@ git checkout -b develop --track remotes/origin/develop |
... | @@ -24,6 +27,9 @@ git checkout -b develop --track remotes/origin/develop |
|
|
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
For ease of integration and long-term maintenance, developed code
|
|
|
|
should follow the [OpenFOAM coding style](Coding-Style-Guide).
|
|
|
|
|
|
|
|
|
|
## Workflow
|
|
## Workflow
|
|
All new code/features/bug-fixes should be created on their own branch, e.g. starting from the `develop` branch
|
|
All new code/features/bug-fixes should be created on their own branch, e.g. starting from the `develop` branch
|
... | @@ -38,7 +44,7 @@ or a bugfix branch `bugfix-ABC` |
... | @@ -38,7 +44,7 @@ or a bugfix branch `bugfix-ABC` |
|
```
|
|
```
|
|
git checkout -b bugfix-ABC
|
|
git checkout -b bugfix-ABC
|
|
```
|
|
```
|
|
Add functionality in the usual way, e.g. adding and committing code changes.
|
|
Add functionality in the usual way, e.g. adding and committing code changes.
|
|
|
|
|
|
|
|
|
|
### Submitting for code review
|
|
### Submitting for code review
|
... | | ... | |