Skip to content

Commit

Permalink
Merge pull request #74 from 3dem/pipeline-control
Browse files Browse the repository at this point in the history
Pipeline control
  • Loading branch information
jamaliki authored Sep 28, 2023
2 parents a59f7fb + 7c2d69f commit 7ed414d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion model_angelo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"""


__version__ = "1.0.3"
__version__ = "1.0.4"
3 changes: 2 additions & 1 deletion model_angelo/apps/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ def add_args(parser):
parser.add_argument(
"--pipeline-control",
"--pipeline_control",
action="store_true",
type=str,
default="",
help=argparse.SUPPRESS,
)

Expand Down
3 changes: 2 additions & 1 deletion model_angelo/apps/build_no_seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def add_args(parser):
parser.add_argument(
"--pipeline-control",
"--pipeline_control",
action="store_true",
type=str,
default="",
help=argparse.SUPPRESS,
)

Expand Down
3 changes: 2 additions & 1 deletion model_angelo/apps/hmm_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ def add_args(parser):
parser.add_argument(
"--pipeline-control",
"--pipeline_control",
action="store_true",
type=str,
default="",
help=argparse.SUPPRESS,
)

Expand Down
3 changes: 2 additions & 1 deletion model_angelo/apps/refine.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ def add_args(parser):
parser.add_argument(
"--pipeline-control",
"--pipeline_control",
action="store_true",
type=str,
default="",
help=argparse.SUPPRESS,
)

Expand Down
12 changes: 10 additions & 2 deletions model_angelo/utils/misc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ def setup_logger(log_path: str):
enqueue=True,
diagnose=True,
)
logger.add(
sys.stderr,
format="{time:YYYY-MM-DD at HH:mm:ss} | {level} | {message}",
enqueue=True,
level="ERROR",
backtrace=False,
diagnose=False,
)
return logger


Expand Down Expand Up @@ -129,9 +137,9 @@ def is_relion_abort(directory: str) -> bool:


def write_relion_job_exit_status(
directory: str, status: str, pipeline_control: bool = False,
directory: str, status: str, pipeline_control: str = "",
):
if pipeline_control:
if pipeline_control != "":
open(os.path.join(directory, f"RELION_JOB_EXIT_{status}"), "a").close()
elif status == "FAILURE":
sys.exit(1)
Expand Down

0 comments on commit 7ed414d

Please sign in to comment.