Skip to content

Commit

Permalink
docs: describe building and testing makefiles in DEVELOPER.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Jul 21, 2023
1 parent caf8ef5 commit 394addf
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ To build and test a parallel version of the program, first read the instructions
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Prerequisites](#prerequisites)
- [Git](#git)
- [Fortran compiler](#fortran-compiler)
Expand Down Expand Up @@ -43,11 +42,12 @@ To build and test a parallel version of the program, first read the instructions
- [Selecting tests with markers](#selecting-tests-with-markers)
- [External model tests](#external-model-tests)
- [Writing tests](#writing-tests)
- [Generating makefiles](#generating-makefiles)
- [Git Strategy for Managing Long-Lived Branches](#git-strategy-for-managing-long-lived-branches)
- [Create a Backup](#create-a-backup)
- [Squash Feature Branch Commits](#squash-feature-branch-commits)
- [Rebase Feature Branch with Develop](#rebase-feature-branch-with-develop)
- [Cleanup](#cleanup)
- [Create a Backup](#create-a-backup)
- [Squash Feature Branch Commits](#squash-feature-branch-commits)
- [Rebase Feature Branch with Develop](#rebase-feature-branch-with-develop)
- [Cleanup](#cleanup)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand Down Expand Up @@ -432,6 +432,24 @@ Tests should ideally follow a few conventions for easier maintenance:

**Note:** If all three external model repositories are not installed as described above, some tests will be skipped. The full test suite includes >750 cases. All must pass before changes can be merged into this repository.

## Generating makefiles

Run `build_makefiles.py` in the `distribution/` directory after adding, removing, or renaming source files.

If the utilities in `utils` require a new module from the modflow6 `src/` directory, add it to `make/extrafiles.txt`.

Module dependencies for features under development should be added to `make/excludefiles.txt`.

Makefile generation and usage can be tested from the `distribution` directory:

```shell
pytest -v build_makefiles.py
```

Note that `make` is required to test compiling MODFLOW 6 with makefiles. If `make` is not discovered on the system path, compile tests will be skipped.

On Windows, `make` is available by default in Git Bash. It is recommended to generate and test makefiles from a Unix-like shell like Git Bash rather than PowerShell or Command Prompt.

## Git Strategy for Managing Long-Lived Branches

When a feature branch takes a long time to develop, it is easy to become out of sync with the develop branch. Depending on the situation, it may be advisable to periodically squash the commits on the feature branch and rebase the change set with develop. The following approach for updating a long-lived feature branch has proven robust.
Expand Down

0 comments on commit 394addf

Please sign in to comment.