Skip to content

Commit

Permalink
doc: explain cookbooks/check.mk
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhei committed Jul 12, 2023
1 parent b7ca998 commit 1341b08
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion doc/sphinx/user/extending/write-a-cookbook/manual-section.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,34 @@ browse a preview of what the manual will look like once your additions are
merged. Navigate to your newly-added page and use this opportunity to ensure
all equations, citations, figures, etc. are formatted correctly and appear as you would like.

You will get bonus points if you also create a test (see
We also run automated checks of every cookbook and benchmark as part
of the pull request review. The script that does this might require
modifications for your new cookbook if your plugin is in a different
directory, changes are necessary to run your `.prm` files, or some
files can not be run directly. The rules are `GNU Make` rules
specified at the bottom of
[cookbooks/check.mk](https://github.com/geodynamics/aspect/blob/main/cookbooks/check.mk)
and
[benchmarks/check.mk](https://github.com/geodynamics/aspect/blob/main/benchmarks/check.mk),
respectively. The default rule is
```
%/: dummy
+@$(def); make_lib $@
@$(def); run_all_prms $@
```
which compiles the library in the directory and runs all prm
files. Assuming your cookbook is in a folder
`free_surface_with_crust/`, you can replace this rule by adding
```
free_surface_with_crust/: dummy
+@$(def); make_lib $@/plugin
@$(def); run_prm $@ test.prm
```
at the end of the document, which will compile a plugin found in
`free_surface_with_crust/plugin/` and then run `test.prm` in the
folder `free_surface_with_crust/`. Feel free to ask for help in your
pull request.

Finally, you will get bonus points if you also create a test (see
{ref}`sec:extending:writing-tests`) that only runs the first time step (or a
lower resolution version) of your cookbook.

0 comments on commit 1341b08

Please sign in to comment.