You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR fixes some broken links in the documentation. It corrects URLs to external websites and updates paths to internal files that were moved. Also, some small formatting changes were included.
Copy file name to clipboardExpand all lines: DEVELOPER.md
+20-18Lines changed: 20 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Developing MODFLOW 6
2
2
3
-
This document describes how to set up a development environment to modify, build and test MODFLOW 6. Details on how to contribute your code to the repository are found in the separate document [CONTRIBUTING.md](./CONTRIBUTING.md).
3
+
This document describes how to set up a development environment to modify, build and test MODFLOW 6. Details on how to contribute your code to the repository are found in the separate document [CONTRIBUTING.md](./CONTRIBUTING.md).
4
4
5
5
To build and test an extended version of the program, first read the instructions below and then continue in [EXTENDED.md](./EXTENDED.md).
6
6
@@ -79,8 +79,7 @@ Some additional, optional tools are also discussed below.
79
79
80
80
### Git
81
81
82
-
[Git](https://git-scm.com) and/or the **GitHub app** (for [Mac](https://mac.github.com) or [Windows](https://windows.github.com)).
83
-
[GitHub's Guide to Installing Git](https://help.github.com/articles/set-up-git) is a good source of information.
82
+
[GitHub's Guide to Setting Up Git](https://help.github.com/articles/set-up-git) is a good source of information.
84
83
85
84
Optionally, the [`git blame`](https://git-scm.com/docs/git-blame) tool can be configured to work locally using:
86
85
@@ -150,7 +149,7 @@ While the current development version of MODFLOW 6 is broadly compatible with `i
150
149
151
150
##### Windows
152
151
153
-
On Windows, [Visual Studio](https://visualstudio.microsoft.com) and a number of libraries must be installed for `ifort` and `ifx` to work. The required libraries can be installed by ticking the "Desktop Development with C++" checkbox in the Visual Studio Installer's Workloads tab.
152
+
On Windows, [Visual Studio](https://visualstudio.microsoft.com) and a number of libraries must be installed for `ifort` and `ifx` to work. The required libraries can be installed by ticking the "Desktop Development with C++" checkbox in the Visual Studio Installer's Workloads tab.
154
153
155
154
**Note:** Invoking the `setvars.bat` scripts from a Powershell session will *not* put `ifort` or `ifx` on the path, since [batch script environments are local to their process](https://stackoverflow.com/a/49028002/6514033). To relaunch PowerShell with oneAPI variables configured:
156
155
@@ -204,14 +203,13 @@ Visual Studio installers can be downloaded from the [official website](https://v
204
203
205
204
[Doxygen](https://www.doxygen.nl/index.html) is used to generate the [MODFLOW 6 source code documentation](https://MODFLOW-ORG.github.io/modflow6/). [Graphviz](https://graphviz.org/) is used by doxygen to produce source code diagrams. [LaTeX](https://www.latex-project.org/) is used to generate the MODFLOW 6 release notes and Input/Output documents.
206
205
207
-
These programs can be installed from various sources, including by conda, macports, or from individual sources such as https://www.tug.org/. Details about USGS LaTeX libraries can be seen in addition to linux installs in the CI workflow for the docs (`.github/workflows/ci-docs.yml`).
208
-
206
+
These programs can be installed from various sources, including by conda, macports, or from individual sources such as https://www.tug.org/. Details about USGS LaTeX libraries can be seen in addition to linux installs in the CI workflow for the docs (`.github/workflows/docs.yml`).
209
207
210
208
## Get the MODFLOW 6 repository
211
209
212
210
Fork and clone the MODFLOW 6 repository:
213
211
214
-
1. Login to your GitHub account or create one by following the instructions given [here](https://github.com/signup/free).
212
+
1. Login to your GitHub account or create one by following the instructions given [here](https://github.com/signup).
215
213
2.[Fork](http://help.github.com/forking) the [main MODFLOW 6](https://github.com/MODFLOW-ORG/modflow6).
216
214
3. Clone your fork of the MODFLOW 6 repository and create an `upstream` remote pointing back to your fork.
Python 3.10+ is required to run MODFLOW 6 tests and in some cases to build MODFLOW 6. Miniforge is the recommended python distribution if you do not have an existing Conda or Mamba based python distribution.
241
239
242
-
The [environment file for MODFLOW 6](./environment.yml) includes all of the required [python dependencies](#python-dependencies). Install the `modflow6` environment using the Conda `environment.yml` file in the repository.
240
+
The [environment file for MODFLOW 6](./environment.yml) includes all of the required [python dependencies](#python-dependencies). Install the `modflow6` environment using the Conda `environment.yml` file in the repository.
243
241
244
242
1. Open a terminal (command prompt) in the root directory of the repository.
245
243
2. Use either Mamba or Conda to install the `modflow6` environment.
246
244
247
245
```shell
248
-
mamba env create -f environment.yml
246
+
mamba env create -f environment.yml
249
247
```
250
248
251
249
```shell
252
250
conda env create -f environment.yml
253
251
```
254
252
255
-
Python can also be installed via Pixi. Pixi is currently being used to install python on GitHub Actions continuous integration/continuous development (CI/CD) virtual machines. In the future, Pixi may be the preferred approach for installing python for MODFLOW 6. As a result it is recommended for developers to also install the Pixi python environment, which can coexist with the Mamba/Conda python installation and `modflow6` environment.
253
+
Python can also be installed via Pixi. Pixi is currently being used to install python on GitHub Actions continuous integration/continuous development (CI/CD) virtual machines. In the future, Pixi may be the preferred approach for installing python for MODFLOW 6. As a result it is recommended for developers to also install the Pixi python environment, which can coexist with the Mamba/Conda python installation and `modflow6` environment.
256
254
257
255
Pixi installation docs can be found [here](https://pixi.sh). After installing `pixi`, to set up an environment with all development dependencies, in the root directory of the MODFLOW 6 repository run:
258
256
@@ -288,7 +286,7 @@ These are each described briefly below. These and a number of other dependencies
288
286
289
287
#### `ruff`
290
288
291
-
[`ruff`](https://docs.astral.sh/ruff/) can be used to format and lint python code and scripts (for example, autotest scripts) and in combination with the [MODFLOW 6 ruff configuration](.github/common/ruff.toml) establishes a contribution standard for properly formatted python code and scripts. This tool can be used from the command line or integrated with a [VSCode](.vscode/README.md). See [python formatting guidelines](#python-formatting) and [python linting guidelines](#python-linting) for additional information.
289
+
[`ruff`](https://docs.astral.sh/ruff/) can be used to format and lint python code and scripts (for example, autotest scripts) and in combination with the [MODFLOW 6 ruff configuration](.github/common/ruff.toml) establishes a contribution standard for properly formatted python code and scripts. This tool can be used from the command line or integrated with a [VSCode](.vscode/README.md). See [python formatting guidelines](#python-formatting) and [python linting guidelines](#python-linting) for additional information.
292
290
293
291
#### `mfpymake`
294
292
@@ -309,6 +307,7 @@ The tests use a set of shared fixtures and utilities provided by the [`modflow-d
309
307
Meson is the recommended build tool for MODFLOW 6. [Meson](https://mesonbuild.com/Getting-meson.html) must be installed and on your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)). Creating and activating the provided Pixi or Conda environment should be sufficient for this.
310
308
311
309
### MODFLOW 6 and ZONEBUDGET
310
+
312
311
Meson build configuration files are provided for MODFLOW 6 and the ZONEBUDGET utility program, and for Fortran unit tests (see [Testing](#testing) section below).
313
312
314
313
-`meson.build`
@@ -325,6 +324,7 @@ To configure the build directory for a debug version:
Or to configure the build directory for an optimized release version from the `<project root>/utils/mf5to6` directory:
373
375
374
376
```shell
@@ -449,7 +451,6 @@ To format all files, add the `--write-changes` flag to the end of the python or
449
451
450
452
**Note**: as `fprettify` may shift code in unexpected ways, it is a good idea to visually check source files afterwards.
451
453
452
-
453
454
### Python formatting
454
455
455
456
Python code and scripts can be formatted with [ruff](https://docs.astral.sh/ruff/), specifying the [MODFLOW 6 ruff configuration](.github/common/ruff.toml). The `ruff` package is included in the Conda `environment.yml` and Pixi `pixi.toml` files and can be run directly, via Pixi, or via [VSCode](.vscode/README.md) tasks.
@@ -625,6 +626,7 @@ Unit tests must be run from the project root. To run unit tests in verbose mode:
@@ -913,7 +915,7 @@ This project follows the [git flow](https://nvie.com/posts/a-successful-git-bran
913
915
914
916
### Managing long-lived branches
915
917
916
-
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.
918
+
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.
917
919
918
920
In the example below, the feature branch is assumed to be called `feat-xyz`.
919
921
@@ -929,7 +931,7 @@ git checkout feat-xyz
929
931
930
932
#### Squash
931
933
932
-
Next, consider squashing commits on the feature branch. If there are many commits, it is beneficial to squash them before trying to rebase with develop. There is a nice article on [squashing commits into one using git](https://www.internalpointers.com/post/squash-commits-into-one-git), which has been very useful for consolidating commits on a long-lived modflow6 feature branch.
934
+
Next, consider squashing commits on the feature branch. If there are many commits, it is beneficial to squash them before trying to rebase with develop. There is a nice article on [squashing commits into one using git](https://www.internalpointers.com/post/squash-commits-into-one-git), which has been very useful for consolidating commits on a long-lived modflow6 feature branch.
933
935
934
936
A quick and dirty way to squash without interactive rebase (as an alternative to the approach described in the article mentioned in the preceding paragraph) is a soft reset followed by an amended commit. First making a backup of the feature branch is strongly recommended before using this approach, as accidentally typing `--hard` instead of `--soft` will wipe out all your work.
935
937
@@ -938,7 +940,7 @@ git reset --soft <first new commit on the feature branch>
Once the commits on the feature branch have been consolidated, a force push to origin is recommended. This is not strictly required, but it can serve as an intermediate backup/checkpoint so the squashed branch state can be retrieved if rebasing fails. The following command will push `feat-xyz` to origin.
943
+
Once the commits on the feature branch have been consolidated, a force push to origin is recommended. This is not strictly required, but it can serve as an intermediate backup/checkpoint so the squashed branch state can be retrieved if rebasing fails. The following command will push `feat-xyz` to origin.
942
944
943
945
```
944
946
git push origin feat-xyz --force
@@ -948,7 +950,7 @@ The `--force` flag's short form is `-f`.
948
950
949
951
#### Rebase
950
952
951
-
Now that the commits on `feat-xyz` have been consolidated, it is time to rebase with develop. If there are multiple commits in `feat-xyz` that make changes, undo them, rename files, and/or move things around in subsequent commits, then there may be multiple sets of merge conflicts that will need to be resolved as the rebase works its way through the commit change sets. This is why it is beneficial to squash the feature commits before rebasing with develop.
953
+
Now that the commits on `feat-xyz` have been consolidated, it is time to rebase with develop. If there are multiple commits in `feat-xyz` that make changes, undo them, rename files, and/or move things around in subsequent commits, then there may be multiple sets of merge conflicts that will need to be resolved as the rebase works its way through the commit change sets. This is why it is beneficial to squash the feature commits before rebasing with develop.
952
954
953
955
To rebase with develop, make sure the feature branch is checked out and then type:
954
956
@@ -958,7 +960,7 @@ git rebase develop
958
960
959
961
If anything goes wrong during a rebase, there is the `rebase --abort` command to unwind it.
960
962
961
-
If there are merge conflicts, they will need to be resolved before going forward. Once any conflicts are resolved, it may be worthwhile to rebuild the MODFLOW 6 program and run the smoke tests to ensure nothing is broken.
963
+
If there are merge conflicts, they will need to be resolved before going forward. Once any conflicts are resolved, it may be worthwhile to rebuild the MODFLOW 6 program and run the smoke tests to ensure nothing is broken.
962
964
963
965
At this point, you will want to force push the updated feature branch to origin using the same force push command as before.
Copy file name to clipboardExpand all lines: EXTENDED.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ in a terminal open in the root directory of your PETSc download
55
55
56
56
## Compiling NetCDF from source
57
57
58
-
See, for example, https://docs.unidata.ucar.edu/netcdf-c/4.9.2/building\_netcdf\_fortran.html and https://docs.unidata.ucar.edu/nug/current/getting\_and\_building\_netcdf.html#building for information related to building NetCDF-Fortran and prerequisites in a Unix/Linux environment.
58
+
See, for example, https://docs.unidata.ucar.edu/netcdf-c/4.9.2/building_netcdf_fortran.html and https://docs.unidata.ucar.edu/nug/current/getting_and_building_netcdf.html#building for information related to building NetCDF-Fortran and prerequisites in a Unix/Linux environment.
59
59
60
60
## Using a package manager to install MPI and PETSc
0 commit comments