Add metadata decorations to check_x functions in tests#9
Merged
ktras merged 5 commits intoBerkeleyLab:rag-metadatafrom Feb 25, 2026
Merged
Conversation
check_x functions in testscheck_x functions in tests
rouson
requested changes
Feb 25, 2026
| ! 1.0 everywhere, and reports a passing or failing test diagnosis based on whether the | ||
| ! computed values approximate the expected result within a tight tolerance. | ||
| ! KEYWORDS: divergence, gradient, div-grad, laplacian-equivalence, finite-difference, | ||
| ! operator-overloading, unit-test, scalar_1D, parabola, 4th-order, structured-grid, |
Contributor
There was a problem hiding this comment.
Suggested change
| ! operator-overloading, unit-test, scalar_1D, parabola, 4th-order, structured-grid, | |
| ! defined-operation unit-test, scalar_1D, parabola, 4th-order, structured-grid, |
| ! It verifies that both grids approximate the expected divergence within a rough tolerance | ||
| ! and that the observed convergence rate matches 2nd-order accuracy. | ||
| ! KEYWORDS: divergence, finite-difference, convergence-rate, 2nd-order, operator-overloading, | ||
| ! unit-test, vector_1D, sinusoid, structured-grid, test-diagnosis, differential-operator, |
Contributor
There was a problem hiding this comment.
Suggested change
| ! unit-test, vector_1D, sinusoid, structured-grid, test-diagnosis, differential-operator, | |
| ! unit-test, vector_1D, sinusoid, structured-grid, staggered-grid, test-diagnosis, differential-operator, |
| ! verification, grid-refinement, order-of-accuracy | ||
| ! CONTEXT: This function is part of the divergence operator test suite in the formal library, which | ||
| ! provides overloaded mathematical operators (.div., .grad., .laplacian., etc.) for | ||
| ! structured-grid scalar and vector fields. It constructs two vector_1D_t objects |
Contributor
There was a problem hiding this comment.
Suggested change
| ! structured-grid scalar and vector fields. It constructs two vector_1D_t objects | |
| ! staggered-grid scalar and vector fields. It constructs two vector_1D_t objects |
Co-authored-by: Damian Rouson <rouson@lbl.gov>
Collaborator
Author
|
Merging based on verbal approval from @rouson. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I added empty metadata comments to all of the
check_xtests in the test dir in the first commit in this PR. The second commit includes filled in meta data comments that were generated from prompts to Claude using the following type of prompt:Prompt:
Hello, I want to decorate some code with metadata comments that will be used in a python workflow that does prompt engineering through RAG techniques. Currently the code has the metadata comments but without the fields, "PURPOSE", "KEYWORDS", and "CONTEXT" filled in. Can you use the source code context from this branch of a public github repo, https://github.com/ktras/formal/tree/rag-metadata, to then fill in the "PURPOSE", "KEYWORDS", and "CONTEXT" fields for the following code chunk?