Skip to content

Commit 9b7ec71

Browse files
authored
Merge pull request #269 from altheaden/omega/update-dev-env-instructions
Add `pre-commit install` instructions and fix minor issues with Quick Start The quick start was missing a line to explain how to initialize pre-commit the first time a newly-created dev environment is used, so I've added that. During the process, I also noticed some spelling errors and inconsistent line lengths. I've fixed those as I noticed them.
2 parents 4184c95 + 8e86833 commit 9b7ec71

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

components/omega/doc/devGuide/QuickStart.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
We ask developers to make their own fork of the E3SM to use for development
1010
branches. To do this, go to the page for the
11-
[E3SM-Project/E3SM](https://github.com/E3SM-Project/E3SM) respository and
11+
[E3SM-Project/E3SM](https://github.com/E3SM-Project/E3SM) repository and
1212
click on the `fork` button near the upper right corner. Set "owner" to your
1313
GitHub username (this should be the default) and click "Create fork".
1414

@@ -60,7 +60,14 @@ conda create -n omega_dev --file dev-conda.txt
6060
conda activate omega_dev
6161
```
6262
(You can reuse `omega_dev` for other branches as long as `dev-conda.txt` has
63-
not changed between branchs.)
63+
not changed between branches.)
64+
65+
The first time you set up the environment, you need to initiate `pre-commit`:
66+
```sh
67+
pre-commit install
68+
```
69+
This needs to be done once per environment, so re-run it as necessary if you
70+
re-create the development environment.
6471

6572
Please activate this environment each time you commit code. This will ensure
6673
that `pre-commit` and the associated linting utilities are available and that
@@ -133,8 +140,10 @@ script that you can run to build Omega:
133140
(omega-dev-quick-start-getting-meshes)=
134141
### Getting test meshes
135142

136-
Some tests require a valid Omega mesh file. Different tests require different meshes. At the moment, mesh files need
137-
to be copied or linked to specifically named files under the `test` directory. Appropriate mesh files can be downloaded from:
143+
Some tests require a valid Omega mesh file. Different tests require different
144+
meshes. At the moment, mesh files need to be copied or linked to specifically
145+
named files under the `test` directory. Appropriate mesh files can be
146+
downloaded from:
138147
- [Ocean Mesh](https://web.lcrc.anl.gov/public/e3sm/inputdata/ocn/mpas-o/oQU240/ocean.QU.240km.151209.nc)
139148
- [Global Mesh](https://web.lcrc.anl.gov/public/e3sm/polaris/ocean/polaris_cache/global_convergence/icos/cosine_bell/Icos480/init/initial_state.230220.nc)
140149
- [Planar Mesh](https://gist.github.com/mwarusz/f8caf260398dbe140d2102ec46a41268/raw/e3c29afbadc835797604369114321d93fd69886d/PlanarPeriodic48x48.nc)
@@ -151,7 +160,8 @@ cd ..
151160

152161
### Running CTests
153162

154-
Omega includes several unit tests that run through CTest. The unit tests need to be run on a compute node.
163+
Omega includes several unit tests that run through CTest. The unit tests need
164+
to be run on a compute node.
155165

156166
To run the tests:
157167
```sh
@@ -189,7 +199,7 @@ Total Test time (real) = 8.91 sec
189199

190200
If Omega CTests are failing or simulations are crashing, setting
191201
`OMEGA_BUILD_TYPE` to `Debug` can be helpful for debugging purposes. If you
192-
need to identify which test has failed, it may be useful to examin the CMake
202+
need to identify which test has failed, it may be useful to examine the CMake
193203
ctest log file located at `$BUILD_DIR/Testing/Temporary/LastTest.log`.
194204

195205
(omega-dev-parmetis-libs)=
@@ -246,7 +256,7 @@ used to but the hope is that it leads to a coherent code style in Omega.
246256

247257
### VS Code
248258

249-
You may wish to condier using an integrated development environment (IDE) to
259+
You may wish to consider using an integrated development environment (IDE) to
250260
develop your code. A convenient option for developing on HPC is
251261
[Visual Studio Code (VS Code)](https://code.visualstudio.com/). It has plugins
252262
for [c++](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),

0 commit comments

Comments
 (0)