Skip to content

Commit 650c303

Browse files
committed
updated doc instructions
1 parent b64abc9 commit 650c303

File tree

1 file changed

+28
-34
lines changed

1 file changed

+28
-34
lines changed

_posts/2015-06-14-doc_instructions.md

+28-34
Original file line numberDiff line numberDiff line change
@@ -57,51 +57,45 @@ The source of any methods that have been implemented. Simple methods like basic
5757

5858
* Inputs
5959

60-
This should contain any variables or functions passed to the function. If the passed variable is a data structure, the components that are used should be listed. Each item should include a description if it is not obvious from the name, and any relevant units. It may
60+
This should contain any variables or functions passed to the function. If the passed variable is a data structure, the components that are used should be listed. Each item should include a description if it is not obvious from the name. It should also include any relevant units. In addition, information about the variable type or any other information that might be important can be added here.
6161

62-
### Example Case
62+
* Outputs
6363

64-
This is the docstring from [Supersonic_Nozzle]()
64+
This should contain the same information as in the inputs. It may also contain information on variables that are modified but not explicitly returned.
6565

66-
""" This computes the output values from the input values according to
67-
equations from the source.
66+
* Properties Used
67+
68+
This carries the same information as input and outputs. It typically contains variables that are properties of the parent class but are not modified. There is some overlap with inputs and outputs, but either category is acceptable as long as the variable is documented.
69+
70+
#### Function Docstring Template
71+
72+
This is a template docstring:
73+
74+
"""<Description>
6875
6976
Assumptions:
70-
Constant polytropic efficiency and pressure ratio
77+
<assumptions>
7178
7279
Source:
73-
https://web.stanford.edu/~cantwell/AA283_Course_Material/AA283_Course_Notes/
80+
<source>
7481
7582
Inputs:
76-
conditions data class with conditions.freestream.
77-
isentropic_expansion_factor [Unitless]
78-
specific_heat_at_constant_pressure [J/(kg K)]
79-
pressure [Pa]
80-
stagnation_pressure [Pa]
81-
stagnation_temperature [K]
82-
universal_gas_constant [J/(kg K)] (this is a bad name)
83-
mach_number [Unitless]
84-
85-
self.inputs.
86-
stagnation_temperature [K]
87-
stagnation_pressure [Pa]
83+
<inputs>
8884
8985
Outputs:
90-
self.outputs.
91-
stagnation_temperature [K]
92-
stagnation_pressure [Pa]
93-
stagnation_enthalpy [J/kg]
94-
mach_number [Unitless]
95-
static_temperature [K]
96-
static_enthalpy [J/kg]
97-
velocity [m/s]
98-
static_pressure [Pa]
99-
area_ratio [Unitless]
86+
<outputs>
10087
10188
Properties Used:
102-
self.
103-
pressure_ratio [Unitless]
104-
polytropic_efficiency [Unitless]
105-
"""
89+
<properties>
10690
107-
The docstring is broken into
91+
### Doxygen Grouping Tags
92+
93+
Tags are used to put files into groups that match the SUAVE file structure. `@defgroup` tags define a group and should be placed in the init file. An example is shown here:
94+
95+
## @defgroup Analyses-Aerodynamics Aerodynamics
96+
# These are the analyses that control aerodynamic evaluations.
97+
# @ingroup Analyses
98+
99+
In this example, `Analyses-Aerodynamics` is the doxygen tag for the group, while the group appears in the documentation as `Aerodynamics`, the next part of the string. The tag is based on the file structure (Analyses/Aerodynamics here). Since this is a subgroup of Analyses, `@ingroup Analyses` is used here, with `Analyses` as the doxygen tag for the next level up.
100+
101+
In files, the `@ingroup` tag should be inserted before all classes and stand-alone functions. The tag should match the tag in the folder init file's `@defgroup` string.

0 commit comments

Comments
 (0)