Skip to content

Commit

Permalink
Automatically fix code style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 17, 2025
1 parent 54e8298 commit 67b14e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/nanosaur/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@

def docker_start(platform, params: Params, args):
"""Start the docker container."""

if not docker.compose.is_installed():
print(TerminalFormatter.color_text("Please install Docker and Docker Compose before running the simulation.", color='red'))
return False

workspace_path = workspace.get_workspace_path(params['nanosaur_workspace_name'])
if workspace_path is not None:
# Create a DockerClient object with the docker-compose file
Expand All @@ -47,7 +47,6 @@ def docker_start(platform, params: Params, args):
else:
nanosaur_compose = docker
env_path = ".env"


uid = os.getuid()
gid = os.getgid()
Expand All @@ -58,18 +57,19 @@ def docker_start(platform, params: Params, args):
# Check which simulation tool is selected and save it in the .env file
simulation_tool = params['simulation_tool'].lower().replace(' ', '_')
env_file.write(f"SIMULATION={simulation_tool}\n")

print(TerminalFormatter.color_text(f"Starting the Docker container for {simulation_tool}", color='green'))

if args.build:
print(TerminalFormatter.color_text("Building the Docker container...", color='green'))
nanosaur_compose.compose.build()
# Start the container in detached mode
nanosaur_compose.compose.up(detach=True)


def docker_stop(platform, params: Params, args):
"""Stop the docker container."""

if not docker.compose.is_installed():
print(TerminalFormatter.color_text("Please install Docker and Docker Compose before running the simulation.", color='red'))
return False
Expand Down
1 change: 1 addition & 0 deletions src/nanosaur/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ def robot_stop(platform, params: Params, args):
print(TerminalFormatter.color_text("Unknown device type", color='red'))
return True


def robot_set_name(platform, params: Params, args):
"""Configure the robot name."""
# Check if the robot name is provided
Expand Down

0 comments on commit 67b14e7

Please sign in to comment.