Skip to content

Commit feebc16

Browse files
authored
docs: fix broken links (#2561)
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.
1 parent 411d201 commit feebc16

File tree

4 files changed

+25
-23
lines changed

4 files changed

+25
-23
lines changed

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ the [USGS Code of Scientific Conduct][1].
66

77

88

9-
[1]: https://www2.usgs.gov/fsp/fsp_code_of_scientific_conduct.asp
9+
[1]: https://www.usgs.gov/media/files/usgs-code-scientific-conduct

DEVELOPER.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Developing MODFLOW 6
22

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).
44

55
To build and test an extended version of the program, first read the instructions below and then continue in [EXTENDED.md](./EXTENDED.md).
66

@@ -79,8 +79,7 @@ Some additional, optional tools are also discussed below.
7979

8080
### Git
8181

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.
8483

8584
Optionally, the [`git blame`](https://git-scm.com/docs/git-blame) tool can be configured to work locally using:
8685

@@ -150,7 +149,7 @@ While the current development version of MODFLOW 6 is broadly compatible with `i
150149

151150
##### Windows
152151

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.
154153

155154
**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:
156155

@@ -204,14 +203,13 @@ Visual Studio installers can be downloaded from the [official website](https://v
204203

205204
[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.
206205

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`).
209207

210208
## Get the MODFLOW 6 repository
211209

212210
Fork and clone the MODFLOW 6 repository:
213211

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).
215213
2. [Fork](http://help.github.com/forking) the [main MODFLOW 6](https://github.com/MODFLOW-ORG/modflow6).
216214
3. Clone your fork of the MODFLOW 6 repository and create an `upstream` remote pointing back to your fork.
217215

@@ -239,20 +237,20 @@ git remote add upstream https://github.com/MODFLOW-ORG/modflow6.git
239237

240238
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.
241239

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.
243241

244242
1. Open a terminal (command prompt) in the root directory of the repository.
245243
2. Use either Mamba or Conda to install the `modflow6` environment.
246244

247245
```shell
248-
mamba env create -f environment.yml
246+
mamba env create -f environment.yml
249247
```
250248

251249
```shell
252250
conda env create -f environment.yml
253251
```
254252

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.
256254

257255
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:
258256

@@ -288,7 +286,7 @@ These are each described briefly below. These and a number of other dependencies
288286

289287
#### `ruff`
290288

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.
292290

293291
#### `mfpymake`
294292

@@ -309,6 +307,7 @@ The tests use a set of shared fixtures and utilities provided by the [`modflow-d
309307
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.
310308

311309
### MODFLOW 6 and ZONEBUDGET
310+
312311
Meson build configuration files are provided for MODFLOW 6 and the ZONEBUDGET utility program, and for Fortran unit tests (see [Testing](#testing) section below).
313312

314313
- `meson.build`
@@ -325,6 +324,7 @@ To configure the build directory for a debug version:
325324
```shell
326325
meson setup --prefix=$(pwd) --libdir=bin builddir -Ddebug=true
327326
```
327+
328328
Or to configure the build directory for an optimized release version:
329329

330330
```shell
@@ -354,6 +354,7 @@ pixi run build builddir
354354
```
355355

356356
### MODFLOW 2005 to 6 converter
357+
357358
Meson build configuration files are provided for the MODFLOW 2005 to 6 converter utility program.
358359

359360
- `utils/mf5to6/meson.build`
@@ -369,6 +370,7 @@ To configure the build directory for a debug version from the `<project root>/ut
369370
```shell
370371
meson setup --prefix=$(pwd)/../../ builddir -Ddebug=true
371372
```
373+
372374
Or to configure the build directory for an optimized release version from the `<project root>/utils/mf5to6` directory:
373375

374376
```shell
@@ -449,7 +451,6 @@ To format all files, add the `--write-changes` flag to the end of the python or
449451

450452
**Note**: as `fprettify` may shift code in unexpected ways, it is a good idea to visually check source files afterwards.
451453

452-
453454
### Python formatting
454455

455456
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:
625626
```shell
626627
meson test -C builddir
627628
```
629+
628630
or using pixi:
629631

630632
```shell
@@ -732,7 +734,7 @@ module TestArithmetic
732734
private
733735
public :: collect_arithmetic
734736
contains
735-
737+
736738
subroutine collect_arithmetic(testsuite)
737739
type(unittest_type), allocatable, intent(out) :: testsuite(:)
738740
testsuite = [new_unittest("add", test_add)]
@@ -913,7 +915,7 @@ This project follows the [git flow](https://nvie.com/posts/a-successful-git-bran
913915

914916
### Managing long-lived branches
915917

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.
917919

918920
In the example below, the feature branch is assumed to be called `feat-xyz`.
919921

@@ -929,7 +931,7 @@ git checkout feat-xyz
929931

930932
#### Squash
931933

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.
933935

934936
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.
935937

@@ -938,7 +940,7 @@ git reset --soft <first new commit on the feature branch>
938940
git commit --amend -m "consolidated commit message"
939941
```
940942

941-
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.
942944

943945
```
944946
git push origin feat-xyz --force
@@ -948,7 +950,7 @@ The `--force` flag's short form is `-f`.
948950

949951
#### Rebase
950952

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.
952954

953955
To rebase with develop, make sure the feature branch is checked out and then type:
954956

@@ -958,7 +960,7 @@ git rebase develop
958960

959961
If anything goes wrong during a rebase, there is the `rebase --abort` command to unwind it.
960962

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.
962964

963965
At this point, you will want to force push the updated feature branch to origin using the same force push command as before.
964966

EXTENDED.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ in a terminal open in the root directory of your PETSc download
5555

5656
## Compiling NetCDF from source
5757

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.
5959

6060
## Using a package manager to install MPI and PETSc
6161

0 commit comments

Comments
 (0)