diff --git a/src/lsst/cmservice/db/element_handler.py b/src/lsst/cmservice/db/element_handler.py index 2d377856..042cd0a4 100644 --- a/src/lsst/cmservice/db/element_handler.py +++ b/src/lsst/cmservice/db/element_handler.py @@ -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 @@ -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 @@ -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 diff --git a/src/lsst/cmservice/db/script_handler.py b/src/lsst/cmservice/db/script_handler.py index 10f0cd36..a705c356 100644 --- a/src/lsst/cmservice/db/script_handler.py +++ b/src/lsst/cmservice/db/script_handler.py @@ -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, @@ -276,7 +276,7 @@ async def _write_bash_script( command: str Main command line(s) in the script - + Keywords -------- prepend: str | None @@ -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, @@ -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 ---------- @@ -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], @@ -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 ---------- @@ -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) diff --git a/src/lsst/cmservice/handlers/common.py b/src/lsst/cmservice/handlers/common.py index e58b74d0..1f55ac1d 100644 --- a/src/lsst/cmservice/handlers/common.py +++ b/src/lsst/cmservice/handlers/common.py @@ -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,