-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: explain cookbooks/check.mk #5273
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,43 @@ 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. | ||
|
||
:::{note} | ||
|
||
The `make` program has a peculiar format where the indented rows in | ||
the snippets above consist of exactly one tab character, rather than | ||
four spaces. This does not translate to what is shown above, but | ||
`make` will generate difficult-to-read error messages if you use | ||
spaces instead of the required tab. | ||
::: | ||
|
||
Finally, you will get bonus points if you also create a test (see | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice! |
||
{ref}`sec:extending:writing-tests`) that only runs the first time step (or a | ||
lower resolution version) of your cookbook. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.