Skip to content

Commit

Permalink
MNT: small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
juliomachad0 committed Jun 15, 2024
1 parent fee7b25 commit fefd1a3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rocketserializer/nb_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def build_imports(self, nb: nbf.v4.new_notebook) -> nbf.v4.new_notebook:
# import classes
text = (
"from rocketpy import Environment, SolidMotor, Rocket, Flight, "
+ "TrapezoidalFins, EllipticalFins, RailButtons, NoseCone, Tail, "
+ "TrapezoidalFins, EllipticalFins, RailButtons, NoseCone, Tail, "
+ "Parachute\n"
)
text += "import datetime\n"
Expand Down Expand Up @@ -449,7 +449,7 @@ def build_parachute(self, nb: nbf.v4.new_notebook) -> nbf.v4.new_notebook:
for i in range(len(self.parameters["parachutes"])):

parachute_i = self.parameters["parachutes"][str(i)]
cd_s = parachute_i["cd"]*parachute_i["area"]
cd_s = parachute_i["cd"] * parachute_i["area"]
deploy_event = parachute_i["deploy_event"]

# evaluating trigger
Expand All @@ -459,7 +459,7 @@ def build_parachute(self, nb: nbf.v4.new_notebook) -> nbf.v4.new_notebook:
trigger = float(parachute_i["deploy_altitude"])
else:
logger.warning("Invalid deploy event for parachute %d", i)
raise ValueError("Invalid deploy event for parachute %d", i)
raise ValueError(f"Invalid deploy event for parachute {i}")
# adding parameters
name = parachute_i["name"]
text = f"parachutes[{i}] = Parachute(\n"
Expand All @@ -471,10 +471,10 @@ def build_parachute(self, nb: nbf.v4.new_notebook) -> nbf.v4.new_notebook:
else:
text += f" trigger={trigger:.3f},\n"

text += f" sampling_rate=100, \n"
text += " sampling_rate=100, \n"
text += ")\n"
nb["cells"].append(nbf.v4.new_code_cell(text))

text = "Adding parachutes to the rocket\n"
nb["cells"].append(nbf.v4.new_markdown_cell(text))
text = "rocket.parachutes = parachutes\n"
Expand Down

0 comments on commit fefd1a3

Please sign in to comment.