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 Aug 13, 2024
1 parent 71b1dc5 commit 4bb50e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ USER root
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends bc && \
apt-get clean && rm -rf /var/lib/apt/lists/*

COPY ./before-notebook.d/* /usr/local/bin/before-notebook.d/

# Remove content of $HOME
Expand Down
1 change: 0 additions & 1 deletion before-notebook.d/42_start-hq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ fi
# Start hq server with a worker
run-one-constantly hq server start 1>$HOME/.hq-stdout 2>$HOME/.hq-stderr &
run-one-constantly hq worker start --cpus=${HQ_CPU_NUMBER} --resource "mem=sum(${LOCAL_MEM})" --no-detect-resources &

8 changes: 6 additions & 2 deletions src/aiidalab_qe/common/setup_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ def setup_codes(computer):
try:
subprocess.run(["python", "-c", python_code], capture_output=True, check=True)
except subprocess.CalledProcessError as err:
raise RuntimeError(f"Failed to setup codes, exit_code={err.returncode}, {err.stderr}") from None
raise RuntimeError(
f"Failed to setup codes, exit_code={err.returncode}, {err.stderr}"
) from None


def install_and_setup(computer="localhost", force=False):
Expand Down Expand Up @@ -236,7 +238,9 @@ def _setup(computer):
["python", "-c", python_code], capture_output=True, check=True
)
except subprocess.CalledProcessError as err:
raise RuntimeError(f"Failed to setup codes, exit_code={err.returncode}, {err.stderr}") from None
raise RuntimeError(
f"Failed to setup codes, exit_code={err.returncode}, {err.stderr}"
) from None

except Timeout:
# Assume that the installation was triggered by a different process.
Expand Down

0 comments on commit 4bb50e5

Please sign in to comment.