Skip to content
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

NAWEA update, patch edge cases, and fix typos #131

Merged
merged 12 commits into from
Nov 13, 2023
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ repos:
stages: [commit]

- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.11.0
hooks:
- id: black
name: black
stages: [commit]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.1.1' # Use the sha / tag you want to point at
rev: 'v1.7.0' # Use the sha / tag you want to point at
hooks:
- id: mypy
entry: mypy --install-types --non-interactive --config-file .mypy.ini
exclude: (^docs/|^tests/)
additional_dependencies: ["types-python-dateutil", "types-attrs", "types-PyYAML"]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -40,7 +40,7 @@ repos:


- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.255
rev: v0.1.5
hooks:
- id: ruff
args: [--fix]
Expand Down
75 changes: 43 additions & 32 deletions CHANGELOG.md

Large diffs are not rendered by default.

135 changes: 69 additions & 66 deletions docs/jupyter_execute/examples/how_to.ipynb

Large diffs are not rendered by default.

2,685 changes: 1,389 additions & 1,296 deletions docs/jupyter_execute/examples/metrics_demonstration.ipynb

Large diffs are not rendered by default.

136 changes: 70 additions & 66 deletions docs/jupyter_execute/examples/strategy_demonstration.ipynb

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion docs/source/API/core.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Simulation Core Classes

There are a variety of components that enable a simulation to be run, from the
environmen to the management of repairs to the servicing equipment. The below will show
environment to the management of repairs to the servicing equipment. The below will show
how each of the APIs are powered to enable the full flexibility of modeling.

```{image} ../images/simulation_tools.svg
Expand All @@ -11,13 +11,15 @@ how each of the APIs are powered to enable the full flexibility of modeling.
```

## Environment

```{eval-rst}
.. autoclass:: wombat.core.environment.WombatEnvironment
:members:
:undoc-members:
```

## Repair Management

```{eval-rst}
.. autoclass:: wombat.core.repair_management.RepairManager
:members:
Expand All @@ -26,6 +28,7 @@ how each of the APIs are powered to enable the full flexibility of modeling.
```

## Servicing Equipment

```{eval-rst}
.. automodule:: wombat.core.service_equipment
:members:
Expand All @@ -40,6 +43,7 @@ how each of the APIs are powered to enable the full flexibility of modeling.
```

## Port

```{eval-rst}
.. automodule:: wombat.core.port
:exclude-members: Port
Expand Down
2 changes: 1 addition & 1 deletion docs/source/API/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The WOMBAT framework relies on a set of base data classes powered by the attrs
library and a series of simulation classes and methods to perform all the operations.

To make a it easier for users, there is also a simulation interface provided.
To make it easier for users, there is also a simulation interface provided.

## Package Hierarchy

Expand Down
8 changes: 6 additions & 2 deletions docs/source/API/simulation_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
```

## Configuration

```{eval-rst}
.. autoclass:: wombat.core.simulation_api.Configuration
:members:
Expand All @@ -18,6 +19,7 @@
```

## Simulation Interface

```{eval-rst}
.. autoclass:: wombat.core.simulation_api.Simulation
:members:
Expand All @@ -27,9 +29,11 @@
random_generator
```


## Metrics Computation
For example usage of the Metrics class and its associated methods, please see the [examples documentation page](../examples/metrics_demonstration)

For example usage of the Metrics class and its associated methods, please see the
[examples documentation page](../examples/metrics_demonstration)

```{eval-rst}
.. autoclass:: wombat.core.post_processor.Metrics
:members: from_simulation_outputs, power_production, time_based_availability,
Expand Down
16 changes: 15 additions & 1 deletion docs/source/API/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ simulation.
:width: 2400px
```

## What is this FromDictMixin I keep seeing in the code diagrams?
## What is this `FromDictMixin` I keep seeing in the code diagrams?

The `FromDictMixin` class provides a standard method for providing dictionary definitions
to `attrs` dataclasses without worrying about overloading the definition. Plus, you get
Expand All @@ -27,6 +27,7 @@ hoping for the best.
## Scheduled and Unscheduled Maintenance

### Maintenance Tasks

```{eval-rst}
.. autoclass:: wombat.core.data_classes.Maintenance
:members:
Expand All @@ -36,6 +37,7 @@ hoping for the best.
```

### Failures

```{eval-rst}
.. autoclass:: wombat.core.data_classes.Failure
:members:
Expand All @@ -46,6 +48,7 @@ hoping for the best.
```

### Repair Requests

```{eval-rst}
.. autoclass:: wombat.core.data_classes.RepairRequest
:members:
Expand All @@ -57,6 +60,7 @@ hoping for the best.
## Servicing Equipment and Crews

### Service Equipment

```{eval-rst}
.. autoclass:: wombat.core.data_classes.ServiceEquipmentData
:members:
Expand All @@ -65,6 +69,7 @@ hoping for the best.
```

### ServiceCrew

```{eval-rst}
.. autoclass:: wombat.core.data_classes.ServiceCrew
:members:
Expand All @@ -73,6 +78,7 @@ hoping for the best.
```

### Scheduled Service Equipment

```{eval-rst}
.. autoclass:: wombat.core.data_classes.ScheduledServiceEquipmentData
:members:
Expand All @@ -88,6 +94,7 @@ hoping for the best.
```

### Unscheduled Service Equipment

```{eval-rst}
.. autoclass:: wombat.core.data_classes.UnscheduledServiceEquipmentData
:members:
Expand All @@ -104,6 +111,7 @@ hoping for the best.
```

### Port Configuration

```{eval-rst}
.. autoclass:: wombat.core.data_classes.PortConfig
:members:
Expand All @@ -117,6 +125,7 @@ hoping for the best.
## Wind Farm Support

### Subassembly Model

```{eval-rst}
.. autoclass:: wombat.core.data_classes.SubassemblyData
:members:
Expand All @@ -127,6 +136,7 @@ hoping for the best.
```

### Wind Farm Map

```{eval-rst}
.. autoclass:: wombat.core.data_classes.WindFarmMap
:members:
Expand All @@ -135,6 +145,7 @@ hoping for the best.
```

### Substation Map

```{eval-rst}
.. autoclass:: wombat.core.data_classes.SubstationMap
:members:
Expand All @@ -143,6 +154,7 @@ hoping for the best.
```

### String

```{eval-rst}
.. autoclass:: wombat.core.data_classes.String
:members:
Expand All @@ -151,6 +163,7 @@ hoping for the best.
```

### Sub String

```{eval-rst}
.. autoclass:: wombat.core.data_classes.SubString
:members:
Expand All @@ -161,6 +174,7 @@ hoping for the best.
## Miscellaneous

### Fixed Cost Model

```{eval-rst}
.. autoclass:: wombat.core.data_classes.FixedCosts
:members:
Expand Down
8 changes: 6 additions & 2 deletions docs/source/API/windfarm.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,32 @@ The wind farm classes define how the wind farm's graph model are created, and po
timing out of the failures and maintenance events within the simulation for the cables,
substations, and turbines.

## Windfarm
## Wind Farm

```{eval-rst}
.. automodule:: wombat.windfarm.windfarm
:members:
:undoc-members:
```

## System: Wind turbine or substation

```{eval-rst}
.. automodule:: wombat.windfarm.system.system
:members:
:undoc-members:
```

## Subassembly: The modeled componenents of a system
## Subassembly: The modeled components of a system

```{eval-rst}
.. automodule:: wombat.windfarm.system.subassembly
:members:
:undoc-members:
```

## Cable: Hybrid system and subassembly model

```{eval-rst}
.. automodule:: wombat.windfarm.system.cable
:members:
Expand Down
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
nb_execution_mode = "auto"
nb_execution_timeout = -1
nb_execution_allow_errors = True
nb_merge_streams = True
# nb_execution_excludepatterns.extend(
# [
# "how_to.md",
Expand Down
8 changes: 3 additions & 5 deletions docs/source/examples/examples_reference.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Examples Reference
==================
# Examples Reference

This page will provide a brief overview of the varying examples available in the
[examples folder on GitHub](https://github.com/WISDEM/WOMBAT/blob/main/examples).
Expand All @@ -17,8 +16,8 @@ to users.

### `how_to.ipynb`

This is a Jupyter Notebook version of the [*How To* section](./how_to.md) of the documentation that
allows users to interact with the walk through.
This is a Jupyter Notebook version of the [*How To* section](./how_to.md) of the
documentation that allows users to interact with the walk through.

### `strategy_demonstration.ipynb`

Expand All @@ -37,7 +36,6 @@ allows users to interact with the varying maintenance strategy models.
This is the notebook used for the NAWEA WindTech 2023 Workshop. See
[here](../workshops/nawea_wind_tech_2023.md) for details.


## Validation

### `dinwoodie_validation.ipynb`
Expand Down
Loading
Loading