-
Notifications
You must be signed in to change notification settings - Fork 21
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
[WIP] Integrating Doxygen/Breathe with TECA's rtd #505
base: develop
Are you sure you want to change the base?
Changes from all commits
01e8502
db3f3a5
3f151c4
bc6cea7
c704455
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
*.sw[a-z] | ||
*.patch | ||
_build | ||
html | ||
xml | ||
*.pt | ||
.DS_store |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,22 @@ stored in the output dataset metadata in the following keys: | |
background_id - the label used for cells outside of the segmentation, | ||
i.e. the background. This can be used to skip processing | ||
of the background when desirable. | ||
|
||
@rst | ||
.. table:: Algorithm Properties | ||
|
||
+----------------------------+------------------------------------------------------------+ | ||
| Property | Description | | ||
+============================+============================================================+ | ||
| component_variable | the component variable name containing the region labels. | | ||
+----------------------------+------------------------------------------------------------+ | ||
| contiguous_component_ids | the label used for cells inside the segmentation. | | ||
+----------------------------+------------------------------------------------------------+ | ||
| background_id | | the label used for cells outside of the segmentation, | | ||
| | | i.e. the background. This can be used to skip processing | | ||
| | | of the background when desirable. | | ||
+----------------------------+------------------------------------------------------------+ | ||
@endrst | ||
*/ | ||
class teca_2d_component_area : public teca_algorithm | ||
{ | ||
|
@@ -57,18 +73,23 @@ class teca_2d_component_area : public teca_algorithm | |
TECA_GET_ALGORITHM_PROPERTIES_DESCRIPTION() | ||
TECA_SET_ALGORITHM_PROPERTIES() | ||
|
||
// set the name of the input array | ||
// The component variable name containing the region labels. | ||
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. Use doxygen style comments and grouping here as well. The documentation should read something to the effect:
|
||
TECA_ALGORITHM_PROPERTY(std::string, component_variable) | ||
|
||
// set this only if you know for certain that label ids are contiguous and | ||
// start at 0. this enables use of a faster implementation. | ||
/** @fn set_contiguous_component_ids | ||
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. use of @fn might have been left over from a test to compare against the grouping approach? |
||
* @attention set this only if you know for certain that label ids | ||
* are contiguous and start at 0. this enables use of a | ||
* faster implementation. | ||
*/ | ||
TECA_ALGORITHM_PROPERTY(int, contiguous_component_ids) | ||
|
||
// set this to override the component label used for background. By default | ||
// this is set to -1 to indicate that the value should be obtained from the | ||
// metadata key `background_id`. Note that TECA's connected component | ||
// labeler uses the id 0 for the background and passes this in a metadata | ||
// key and as a result no action is required. | ||
|
||
/** @fn set_background_id | ||
* @note By default this is set to -1 to indicate that the value should | ||
* be obtained from the metadata key `background_id`. | ||
* TECA's connected component labeler uses the id 0 for the | ||
* background and passes this in a metadata key and as a result | ||
* no action is required. | ||
*/ | ||
TECA_ALGORITHM_PROPERTY(long, background_id) | ||
|
||
protected: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,28 +49,53 @@ class teca_bayesian_ar_detect : public teca_algorithm | |
TECA_GET_ALGORITHM_PROPERTIES_DESCRIPTION() | ||
TECA_SET_ALGORITHM_PROPERTIES() | ||
|
||
// set the name of the input array | ||
/** @anchor ivt_variable | ||
* @name ivt_variable | ||
* Set the name of the input array | ||
*/ | ||
///@{ | ||
TECA_ALGORITHM_PROPERTY(std::string, ivt_variable) | ||
|
||
// set the names of columns in the parameter table. | ||
/** @anchor min_ivt_variable | ||
* @name min_ivt_variable | ||
* Set the name of the min IVT column in the parameter table. | ||
*/ | ||
///@{ | ||
TECA_ALGORITHM_PROPERTY(std::string, min_ivt_variable) | ||
///@} | ||
|
||
/** @anchor min_component_area_variable | ||
* @name min_component_area_variable | ||
* Set the name of the component area column in the parameter table. | ||
*/ | ||
///@{ | ||
TECA_ALGORITHM_PROPERTY(std::string, min_component_area_variable) | ||
///@} | ||
|
||
/** @anchor hwhm_latitude_variable | ||
* @name hwhm_latitude_variable | ||
* Set the name of the HWHM lattitude column in the parameter table. | ||
*/ | ||
///@{ | ||
TECA_ALGORITHM_PROPERTY(std::string, hwhm_latitude_variable) | ||
///@} | ||
|
||
// flag indicating verbose terminal output is desired. | ||
// default is 0 | ||
TECA_ALGORITHM_PROPERTY(int, verbose) | ||
|
||
// set/get the number of threads in the pool. setting | ||
// to -1 results in a thread per core factoring in all MPI | ||
// ranks running on the node. the default is -1. | ||
/** set the number of threads in the pool. setting | ||
* to -1 results in a thread per core factoring in all MPI | ||
* ranks running on the node. the default is -1. | ||
*/ | ||
void set_thread_pool_size(int n_threads); | ||
|
||
/** get the number of threads in the pool. the default is -1. */ | ||
unsigned int get_thread_pool_size() const noexcept; | ||
Comment on lines
+85
to
92
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. document this as a group similar to the other algorithm properties. This is an algorithm property but the macro could not be used here. |
||
|
||
// override the input connections because we are going to | ||
// take the first input and use it to generate metadata. | ||
// the second input then becomes the only one the pipeline | ||
// knows about. | ||
/** override the input connections because we are going to | ||
* take the first input and use it to generate metadata. | ||
* the second input then becomes the only one the pipeline | ||
* knows about. | ||
*/ | ||
void set_input_connection(unsigned int id, | ||
const teca_algorithm_output_port &port) override; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,24 +30,65 @@ class teca_binary_segmentation : public teca_algorithm | |
TECA_ALGORITHM_CLASS_NAME(teca_binary_segmentation) | ||
~teca_binary_segmentation(); | ||
|
||
// set the name of the output array to store the resulting segmentation in | ||
/** @anchor segmentation_variable | ||
* @name segmentation_variable | ||
* Set the name of the output array to store the resulting segmentation in. | ||
*/ | ||
///@{ | ||
TECA_ALGORITHM_PROPERTY(std::string, segmentation_variable) | ||
///@} | ||
|
||
// set extra metadata for the segmentation variable | ||
/** @anchor segmentation_variable_attributes | ||
* @name segmentation_variable_attributes | ||
* Set extra metadata for the segmentation variable. | ||
*/ | ||
///@{ | ||
TECA_ALGORITHM_PROPERTY(teca_metadata, segmentation_variable_attributes) | ||
///@} | ||
|
||
// set the name of the input array to segment | ||
/** @anchor threshold_variable | ||
* @name threshold_variable | ||
* Set the name of the input array to segment. | ||
*/ | ||
///@{ | ||
TECA_ALGORITHM_PROPERTY(std::string, threshold_variable) | ||
///@} | ||
|
||
// Set the threshold range. The defaults are (-infinity, infinity]. | ||
/** @anchor low_threshold_value | ||
* @name low_threshold_value | ||
* Sets the low threshold value. default is -infinity. | ||
*/ | ||
///@{ | ||
TECA_ALGORITHM_PROPERTY(double, low_threshold_value) | ||
///@} | ||
/** @anchor high_threshold_value | ||
* @name high_threshold_value | ||
* Sets the high threshold value. default is infinity. | ||
*/ | ||
///@{ | ||
TECA_ALGORITHM_PROPERTY(double, high_threshold_value) | ||
|
||
// Set the threshold mode. In BY_PERCENTILE mode low and high thresholds | ||
// define the percentiles (0 to 100) between which data is in the | ||
// segmentation. default is BY_VALUE. | ||
enum {BY_VALUE=0, BY_PERCENTILE=1}; | ||
///@} | ||
|
||
/** list threshold modes. In BY_PERCENTILE mode low and high thresholds | ||
* define the percentiles (0 to 100) between which data is in the | ||
* segmentation. | ||
*/ | ||
Comment on lines
+73
to
+76
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. this is the documentation for the threshold_mode algorithm property, not the enum |
||
enum | ||
{ | ||
/** 0 */ | ||
BY_VALUE=0, | ||
/** 1 */ | ||
BY_PERCENTILE=1 | ||
Comment on lines
+79
to
+82
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. don't add comments unless it adds information. here we can see the values of the enum. when using enums it's best not to use a value, but rather then named member of the enum. |
||
}; | ||
|
||
/** @anchor threshold_mode | ||
* @name threshold_mode | ||
* Set the threshold mode. default is BY_VALUE | ||
*/ | ||
///@{ | ||
TECA_ALGORITHM_PROPERTY(int, threshold_mode); | ||
///@} | ||
|
||
void set_threshold_by_percentile() { set_threshold_mode(BY_PERCENTILE); } | ||
void set_threshold_by_value() { set_threshold_mode(BY_VALUE); } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,21 +37,45 @@ class teca_cartesian_mesh_regrid : public teca_algorithm | |
TECA_GET_ALGORITHM_PROPERTIES_DESCRIPTION() | ||
TECA_SET_ALGORITHM_PROPERTIES() | ||
|
||
// set the list of arrays to move from the source | ||
// to the target | ||
/** @anchor arrays | ||
* @name arrays | ||
* Set the list of arrays to move from the source to the target. | ||
*/ | ||
///@{ | ||
TECA_ALGORITHM_VECTOR_PROPERTY(std::string, array) | ||
|
||
// set the input connection from which metadata such as arrays | ||
// and time steps are taken from. | ||
///@} | ||
|
||
/** @anchor target_input | ||
* @name target_input | ||
* Set the input connection from which metadata such as arrays | ||
* and time steps are taken from. | ||
*/ | ||
///@{ | ||
TECA_ALGORITHM_PROPERTY(int, target_input) | ||
|
||
// set the interpolation mode used in transfering | ||
// data between meshes of differing resolution. | ||
// in nearest mode value at the nearest grid point | ||
// is used, in linear mode bi/tri linear interpolation | ||
// is used. | ||
enum {nearest=0, linear=1}; | ||
///@} | ||
|
||
/** list the interpolation modes used in transfering | ||
* data between meshes of differing resolution. | ||
* In nearest mode value at the nearest grid point | ||
* is used, in linear mode bi/tri linear interpolation | ||
* is used. | ||
*/ | ||
enum | ||
{ | ||
/** 0 */ | ||
nearest=0, | ||
/** 1 */ | ||
linear=1 | ||
}; | ||
|
||
/** @anchor interpolation_mode | ||
* @name interpolation_mode | ||
* Set the interpolation_mode mode. default is nearest | ||
*/ | ||
///@{ | ||
TECA_ALGORITHM_PROPERTY(int, interpolation_mode) | ||
Comment on lines
+57
to
76
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. see my comments about threshold_mode above, all the same applies here |
||
///@} | ||
|
||
void set_interpolation_mode_nearest(){ interpolation_mode = nearest; } | ||
void set_interpolation_mode_linear(){ interpolation_mode = linear; } | ||
|
||
|
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.
I'm not sold on the idea of using rst tables for this. What's the reason? Was it to test with Breathe?
Also, use @ref component_variable etc to make a link to the property's documentation