diff --git a/.github/workflows/deploy-pages.yaml b/.github/workflows/deploy-pages.yaml index 58c38a2..7e60ea2 100644 --- a/.github/workflows/deploy-pages.yaml +++ b/.github/workflows/deploy-pages.yaml @@ -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 diff --git a/docs/index.md b/docs/index.md index 71afdd3..c313228 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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