Skip to content

Commit

Permalink
Ruff.
Browse files Browse the repository at this point in the history
  • Loading branch information
misi9170 committed May 7, 2024
1 parent b173cf1 commit 5d58a19
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
from hercules.py_sims import PySims
from hercules.utilities import load_yaml
from whoc.controllers import (
BatteryPassthroughController,
HybridSupervisoryControllerSkeleton,
SolarPassthroughController,
WindFarmPowerTrackingController,
BatteryPassthroughController,
SolarPassthroughController
)
from whoc.interfaces.hercules_hybrid_actuator_disk_interface import HerculesHybridADInterface

Expand Down
5 changes: 1 addition & 4 deletions tests/interface_library_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
# See https://nrel.github.io/wind-hybrid-open-controller for documentation

import pytest
from whoc.interfaces import (
HerculesADInterface,
HerculesWindBatteryInterface,
)
from whoc.interfaces import HerculesADInterface, HerculesWindBatteryInterface

test_hercules_dict = {
"dt": 1,
Expand Down
4 changes: 2 additions & 2 deletions whoc/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from whoc.controllers.battery_passthrough_controller import BatteryPassthroughController
from whoc.controllers.hybrid_supervisory_controller import HybridSupervisoryControllerSkeleton
from whoc.controllers.lookup_based_wake_steering_controller import LookupBasedWakeSteeringController
from whoc.controllers.solar_passthrough_controller import SolarPassthroughController
from whoc.controllers.wake_steering_rosco_standin import WakeSteeringROSCOStandin
from whoc.controllers.wind_battery_controller import WindBatteryController
from whoc.controllers.wind_farm_power_tracking_controller import (
WindFarmPowerDistributingController,
WindFarmPowerTrackingController,
)
from whoc.controllers.battery_passthrough_controller import BatteryPassthroughController
from whoc.controllers.solar_passthrough_controller import SolarPassthroughController
1 change: 0 additions & 1 deletion whoc/controllers/battery_passthrough_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

# See https://nrel.github.io/wind-hybrid-open-controller for documentation

import numpy as np

from whoc.controllers.controller_base import ControllerBase

Expand Down
2 changes: 1 addition & 1 deletion whoc/controllers/hybrid_supervisory_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import numpy as np

from whoc.controllers.controller_base import ControllerBase
from whoc.controllers.wind_farm_power_tracking_controller import WindFarmPowerTrackingController


class HybridSupervisoryControllerSkeleton(ControllerBase):
def __init__(
Expand Down
1 change: 0 additions & 1 deletion whoc/controllers/solar_passthrough_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

# See https://nrel.github.io/wind-hybrid-open-controller for documentation

import numpy as np

from whoc.controllers.controller_base import ControllerBase

Expand Down
4 changes: 3 additions & 1 deletion whoc/interfaces/hercules_hybrid_actuator_disk_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ def __init__(self, hercules_dict):
self.battery_name = [ps for ps in py_sims if "battery" in ps][0]

def get_measurements(self, hercules_dict):
turbine_powers = hercules_dict["hercules_comms"]["amr_wind"][self.wind_name]["turbine_powers"]
turbine_powers = (
hercules_dict["hercules_comms"]["amr_wind"][self.wind_name]["turbine_powers"]
)
time = hercules_dict["time"]

if ("external_signals" in hercules_dict
Expand Down

0 comments on commit 5d58a19

Please sign in to comment.