Skip to content

Commit

Permalink
oh look, I can run black
Browse files Browse the repository at this point in the history
  • Loading branch information
eacharles committed Sep 26, 2023
1 parent 37b541a commit 7df26c2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/lsst/cmservice/db/element_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def add_prerequisite(
----------
session : async_scoped_session
DB session manager
script_id: int
Id for the script that depends on the other
Expand Down Expand Up @@ -101,7 +101,7 @@ async def prepare(
) -> StatusEnum:
"""Prepare `Element` for processing
This means creating database entries for scripts and
This means creating database entries for scripts and
dependencies between them
Parameters
Expand Down Expand Up @@ -250,7 +250,7 @@ async def update_status(
element: ElementMixin,
**kwargs: Any,
) -> StatusEnum:
"""Update the status of this Element based on the
"""Update the status of this Element based on the
status of the associated scripts and jobs
Parameters
Expand Down
14 changes: 7 additions & 7 deletions src/lsst/cmservice/db/script_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ async def review(
status : StatusEnum
The status of the processing
"""
return script.status
return script.status

async def _write_bash_script(
self,
Expand All @@ -276,7 +276,7 @@ async def _write_bash_script(
command: str
Main command line(s) in the script
Keywords
--------
prepend: str | None
Expand Down Expand Up @@ -432,7 +432,7 @@ async def do_check(
The status of the processing
"""
raise NotImplementedError(f"{type(self)}.do_check()")

async def _check_stamp_file(
self,
session: async_scoped_session,
Expand Down Expand Up @@ -472,7 +472,7 @@ async def _submit_slurm_job(
script_url: str,
log_url: str,
) -> str:
"""Submit a `Script` to slurm
"""Submit a `Script` to slurm
Parameters
----------
Expand All @@ -489,7 +489,7 @@ async def _submit_slurm_job(
-------
job_id : str
Slurm job id
"""
"""
try:
with subprocess.Popen(
["sbatch", "-o", log_url, "--mem", "16448", "-p", "roma", "--parsable", script_url],
Expand All @@ -508,7 +508,7 @@ async def _check_slurm_job(
slurm_id: str | None,
script: Script,
) -> StatusEnum:
"""Check the status of a `Script` sent to slurm
"""Check the status of a `Script` sent to slurm
Parameters
----------
Expand All @@ -525,7 +525,7 @@ async def _check_slurm_job(
-------
status : StatusEnum
The status of the processing
"""
"""
if slurm_id is None:
status = StatusEnum.prepared
await Script.update_row(session, script.id, status=status)
Expand Down
9 changes: 5 additions & 4 deletions src/lsst/cmservice/handlers/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,16 @@ def parse_bps_stdout(url: str) -> dict[str, str]:

class AncillaryScriptHandler(ScriptHandler):
"""Write a script to chain together ancillary collections
This will take
`script.collections['inputs']`
and chain them into
and chain them into
`parent.collections['ancillary']`
"""

async def write_script(
self,
session: async_scoped_session,
Expand Down

0 comments on commit 7df26c2

Please sign in to comment.