Skip to content

Commit

Permalink
Ref: Mostly reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
clemens-fricke committed Nov 23, 2023
1 parent 4b7a33e commit 015d680
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion releso/parser_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def step(self, action: Any) -> Tuple[Any, float, bool, Dict[str, Any]]:
if observations["geometry_observation"] is None:
del observations["geometry_observation"]
end = timer()
self.get_logger().debug(f"Step took {end-start} seconds.")
self.get_logger().debug(f"Step took {end - start} seconds.")

return self.check_observations(observations), reward, done, False, info

Expand Down
4 changes: 2 additions & 2 deletions releso/shape_parameterization.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def set_variable_to_current_position_if_not_given(

@validator("max_value", always=True)
@classmethod
def max_value_is_greater_than_current_value(
def check_max_value_is_greater_than_current_value(
cls, v, values, field
) -> float:
"""Validates that the max value is greater-equal to the current value.
Expand All @@ -114,7 +114,7 @@ def max_value_is_greater_than_current_value(

@validator("min_value", always=True)
@classmethod
def min_value_is_smaller_than_current_value(
def check_min_value_is_smaller_than_current_value(
cls, v, values, field
) -> float:
"""Validates that the min value is smaller-equal to the current value.
Expand Down
2 changes: 1 addition & 1 deletion releso/spline.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def validate_knot_vector(
else:
get_parser_logger().warning(
f"The knot vector is shorter {n_knots} than the length "
f"given by the open format {starting_ending*2}. Knot "
f"given by the open format {starting_ending * 2}. Knot "
"vector is created by adding the starting and ending "
"parts. The knot vector might be to long."
)
Expand Down
9 changes: 2 additions & 7 deletions releso/spor.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,6 @@ def validate_additional_observations(
Validates the the additional observations variable. This is a pre
validation function only used for back compatibility reasons.
See deprecation notice...
Deprecated functionality: Setting the value of the additional variable
to an int value. This is an old option and is not supported anymore.
Please define additional variable with the classes given.
Args:
v (str): See pydantic
Expand Down Expand Up @@ -1018,7 +1013,7 @@ def run(
) from err
else:
self._run_logger = set_up_logger(
f"spor_step_logger_{self.name.replace(' ','_')}",
f"spor_step_logger_{self.name.replace(' ', '_')}",
pathlib.Path(self.save_location / "logging"),
VerbosityLevel.INFO,
console_logging=False,
Expand Down Expand Up @@ -1428,6 +1423,6 @@ def run(
step_information = (observations, reward, done, info)
end = timer()
self.get_logger().debug(
f"SPOR Step {step.name} took {end-start} seconds."
f"SPOR Step {step.name} took {end - start} seconds."
)
return step_information

0 comments on commit 015d680

Please sign in to comment.