-
Notifications
You must be signed in to change notification settings - Fork 33
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
Create plugin documentation #565
Create plugin documentation #565
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #565 +/- ##
==========================================
+ Coverage 93.49% 93.55% +0.06%
==========================================
Files 92 92
Lines 6346 6346
==========================================
+ Hits 5933 5937 +4
+ Misses 413 409 -4 see 4 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.
Very nice, just two small comments.
doc/sphinx/developer_manual/developing_for_the_GWB/creating_new_plugins.md
Outdated
Show resolved
Hide resolved
doc/sphinx/developer_manual/developing_for_the_GWB/creating_new_plugins.md
Outdated
Show resolved
Hide resolved
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.
Great, thanks for writing this up!
I think it might also be useful to add here that you will need to change the Class names in both the header and source files, and change the headerguard in the header file. Furthermore, I think it would be useful to add what information you need to put in the register function (e.g. ClassName, name used in the input file). Could you add something like this?
Thank you for the review! I addressed your comments in the recent push. Let me know if we need more details. |
|
doc/sphinx/developer_manual/developing_for_the_GWB/creating_new_plugins.md
Outdated
Show resolved
Hide resolved
As an example, assume that you want to implement faults in your world that have compositional value that varies according to a hat function. In this case, the closest existing functionality is the `smooth` fault composition that varies following a hyperbolic tangent function. You can then rename the class to say Hat and modify the implementation of the relevant function, i.e., `get_composition()`, such that it now returns a compositional value based on the hat function. | ||
|
||
#### Write a plugin from scratch |
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.
same as above
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.
Got it, thank you !
This PR adds documentation on how to write a new plugin in GWB. It also fixes small typos that I came across while working on the write up.