Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 15, 2024
1 parent 22b1df4 commit f04e06f
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 10 deletions.
9 changes: 6 additions & 3 deletions neodroid/entry_points/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def run(self, env_name: str) -> None:
@staticmethod
def fetch(env_name: str) -> Path:
"""
Fetches a remotely stored environment with the specified name to local storage"""
Fetches a remotely stored environment with the specified name to local storage
"""
exe_path = download_environment(
env_name, path_to_executables_directory=DEFAULT_ENVIRONMENTS_PATH
)
Expand All @@ -71,7 +72,8 @@ def fetch(env_name: str) -> Path:

def install(self, env_name: str) -> Path:
"""
Fetches a remotely stored environment with the specified name to local storage"""
Fetches a remotely stored environment with the specified name to local storage
"""
return self.fetch(env_name)

@staticmethod
Expand All @@ -85,7 +87,8 @@ def remove(env_name: str) -> None:

def update(self, env_name: str) -> None:
"""
Updates, fetches environment with the specified name again and replaces the previous version if present"""
Updates, fetches environment with the specified name again and replaces the previous version if present
"""
if os.path.exists(DEFAULT_ENVIRONMENTS_PATH):
self.remove(env_name)
exe_path = self.fetch(env_name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
============================================================
"""

import random

import numpy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
= Q(a;k) + 1/(k+1) * (R(a) - Q(a;k))
"""

import numpy
from matplotlib import pyplot

Expand Down
2 changes: 1 addition & 1 deletion neodroid/factories/configuration_reactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
def verify_configuration_reactions(
*,
input_reactions,
environment_descriptions
environment_descriptions,
#: Mapping[str, EnvironmentDescription]
):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ def __init__(self, actor_name: str, actuator_name: str, strength: float):
:param actor_name:
:param actuator_name:
:param strength: Strength has a possible direction given by the sign of the float"""
:param strength: Strength has a possible direction given by the sign of the float
"""
self._actor_name = actor_name
self._actuator_name = actuator_name
self._strength = strength
Expand Down
4 changes: 2 additions & 2 deletions neodroid/wrappers/curriculum_wrapper/curriculum_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def generate_trajectory_from_configuration(
configure_params = ReactionParameters(
reset=True,
terminable=False,
configure=True
configure=True,
# ,episode_count=False
)

Expand All @@ -63,7 +63,7 @@ def generate_trajectory_from_configuration(

non_terminable_params = ReactionParameters(
step=True,
terminable=False
terminable=False,
# ,
# episode_count=False
)
Expand Down
2 changes: 1 addition & 1 deletion samples/experimental/observation_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def main():
connect_to_running=True
) as env:
with tqdm(env, leave=False) as observation_session:
for (observation, reward, terminated, info) in observation_session:
for observation, reward, terminated, info in observation_session:
frame_i += 1

if not diverged and frame_i != info.frame_number:
Expand Down
5 changes: 4 additions & 1 deletion samples/gui_client/gui_components/reaction_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def on_step_button(self, value):
str(self.motor_1.motor_input.text),
float(self.motor_1.motor_slider.value),
),
(str(self.motor_2.motor_input.text), float(self.motor_2.motor_slider.value))
(
str(self.motor_2.motor_input.text),
float(self.motor_2.motor_slider.value),
),
# (str(self.motor_3.motor_input.text),
# float(self.motor_3.motor_slider.value)),
# (str(self.motor_4.motor_input.text),
Expand Down
2 changes: 1 addition & 1 deletion samples/gui_client/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def update_callback(state):
def on_step_callback(actor_name, slider_values):
motions = [
Motion(str(actor_name), str(slider_values[0][0]), slider_values[0][1]),
Motion(str(actor_name), str(slider_values[1][0]), slider_values[1][1])
Motion(str(actor_name), str(slider_values[1][0]), slider_values[1][1]),
# Motion(str(actor_name), str(slider_values[2][0]), slider_values[2][1]),
# Motion(str(actor_name), str(slider_values[3][0]), slider_values[3][1])
]
Expand Down

0 comments on commit f04e06f

Please sign in to comment.