Skip to content

Commit

Permalink
Generate class diagrams in docs CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rafmudaf committed Mar 8, 2024
1 parent d037cf8 commit e826e7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 172 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/deploy-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ jobs:
- name: Install dependencies
run: |
pip install -e ".[docs]"
pip install pylint
# Generate any required diagrams
- name: Make diagrams
working-directory: ${{runner.workspace}}/wcomp/wcomp
run: |
pyreverse base_interface.py -c WCompBase -o mmd
# Build the book
- name: Build the book
Expand Down
172 changes: 0 additions & 172 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,177 +67,5 @@ classDiagram
pywake_interface --> plotting
```




## Class
```{mermaid}
classDiagram
class WCompFloris {
LEGEND : str
LINE_PLOT_COLOR : str
LINE_PLOT_LINESTYLE : str
LINE_PLOT_MARKER : str
deflection_model_string : str
deflection_parameters : Optional[dict]
fi : FlorisInterface
floris_dict : dict
hub_height
rotor_diameter
velocity_deficit_model_string : str
velocity_deficit_parameters : dict
yaw_angles : ndarray
AEP()
horizontal_contour(wind_direction: float, resolution: tuple) WakePlane
streamwise_profile_plot(wind_direction: float, y_coordinate: float, xmin: float, xmax: float)
vertical_profile_plot(wind_direction: float, x_coordinate: float, y_coordinate: float, zmax: float)
xsection_contour(wind_direction: float, resolution: tuple, x_coordinate: float) WakePlane
xsection_profile_plot(wind_direction: float, x_coordinate: float, ymin: float, ymax: float)
}
```

## Abstract Class
```{mermaid}
classDiagram
class WCompBase {
LEGEND : str
LINE_PLOT_COLOR : str
hub_height
rotor_diameter
AEP()* float
horizontal_contour(wind_direction: float, resolution: tuple)* WakePlane
streamwise_profile_plot(wind_direction: float, y_coordinate: float, xmin: float, xmax: float)*
vertical_profile_plot(wind_direction: float, x_coordinate: float, y_coordinate: float, zmax: float)*
xsection_contour(wind_direction: float, resolution: tuple, x_coordinate: float)* WakePlane
xsection_profile_plot(wind_direction: float, x_coordinate: float, ymin: float, ymax: float)*
}
```

## Inheritance

**All the details**
```{mermaid}
classDiagram
class WCompBase {
LEGEND : str
LINE_PLOT_COLOR : str
hub_height
rotor_diameter
AEP()* float
horizontal_contour(wind_direction: float, resolution: tuple)* WakePlane
streamwise_profile_plot(wind_direction: float, y_coordinate: float, xmin: float, xmax: float)*
vertical_profile_plot(wind_direction: float, x_coordinate: float, y_coordinate: float, zmax: float)*
xsection_contour(wind_direction: float, resolution: tuple, x_coordinate: float)* WakePlane
xsection_profile_plot(wind_direction: float, x_coordinate: float, ymin: float, ymax: float)*
}
class WCompFloris {
LEGEND : str
LINE_PLOT_COLOR : str
LINE_PLOT_LINESTYLE : str
LINE_PLOT_MARKER : str
deflection_model_string : str
deflection_parameters : Optional[dict]
fi : FlorisInterface
floris_dict : dict
hub_height
rotor_diameter
velocity_deficit_model_string : str
velocity_deficit_parameters : dict
yaw_angles : ndarray
AEP()
horizontal_contour(wind_direction: float, resolution: tuple) WakePlane
streamwise_profile_plot(wind_direction: float, y_coordinate: float, xmin: float, xmax: float)
vertical_profile_plot(wind_direction: float, x_coordinate: float, y_coordinate: float, zmax: float)
xsection_contour(wind_direction: float, resolution: tuple, x_coordinate: float) WakePlane
xsection_profile_plot(wind_direction: float, x_coordinate: float, ymin: float, ymax: float)
}
WCompBase <|-- WCompFloris
```

**Only interface**
```{mermaid}
classDiagram
class WCompBase {
LEGEND : str
LINE_PLOT_COLOR : str
hub_height
rotor_diameter
AEP()* float
horizontal_contour(wind_direction: float, resolution: tuple)* WakePlane
streamwise_profile_plot(wind_direction: float, y_coordinate: float, xmin: float, xmax: float)*
vertical_profile_plot(wind_direction: float, x_coordinate: float, y_coordinate: float, zmax: float)*
xsection_contour(wind_direction: float, resolution: tuple, x_coordinate: float)* WakePlane
xsection_profile_plot(wind_direction: float, x_coordinate: float, ymin: float, ymax: float)*
}
class WCompFloris {
deflection_model_string : str
deflection_parameters : Optional[dict]
fi : FlorisInterface
floris_dict : dict
velocity_deficit_model_string : str
velocity_deficit_parameters : dict
yaw_angles : ndarray
}
WCompBase <|-- WCompFloris
```

## Aggregation and Composition

class WCompBase {
}
class WCompFloris {
}
class WCompFoxes {
}
class WCompPyWake {
}

```{mermaid}
classDiagram
class WakePlane {
normal_vector : str
resolution : Tuple
values
x1
x2
}
class WakeProfile {
values
x1
}
WCompBase <|-- WCompFloris
WCompBase <|-- WCompFoxes
WCompBase <|-- WCompPyWake
WakeProfile *-- WCompFloris
WakeProfile *-- WCompFoxes
WakeProfile *-- WCompPyWake
WakePlane *-- WCompFloris
WakePlane *-- WCompFoxes
WakePlane *-- WCompPyWake
```


## Package

```{mermaid}
classDiagram
wcomp --> floris_interface
wcomp --> foxes_interface
wcomp --> pywake_interface
base_interface --> output_struct
floris_interface --> base_interface
floris_interface --> output_struct
floris_interface --> plotting
foxes_interface --> base_interface
foxes_interface --> output_struct
foxes_interface --> plotting
plotting --> output_struct
pywake_interface --> base_interface
pywake_interface --> output_struct
pywake_interface --> plotting
```



# Getting started
Here's how to get started

0 comments on commit e826e7d

Please sign in to comment.