@@ -279,6 +279,7 @@ def manifest_build(
279279 ef .write ("\n " )
280280
281281 import traceback
282+
282283 ef .write ("--- TRACEBACK ---\n " )
283284 ef .write (traceback .format_exc ())
284285
@@ -297,7 +298,9 @@ def manifest_build(
297298 eprint (f"Command: { ' ' .join (shlex .quote (c ) for c in srun_cmd )} " )
298299 if hasattr (exc , "stderr" ) and exc .stderr :
299300 eprint (f"stderr: { exc .stderr } " )
300- slurm_mem_vars = {k : v for k , v in os .environ .items () if "MEM" in k and k .startswith ("SLURM" )}
301+ slurm_mem_vars = {
302+ k : v for k , v in os .environ .items () if "MEM" in k and k .startswith ("SLURM" )
303+ }
301304 if slurm_mem_vars :
302305 eprint (f"SLURM memory env vars: { slurm_mem_vars } " )
303306 raise
@@ -548,7 +551,8 @@ def manifest_rebase(
548551 ),
549552 out : Path = typer .Option (..., help = "Output manifest JSONL path" , resolve_path = True ),
550553 source_root : Optional [str ] = typer .Option (
551- None , help = "New source root (rclone remote:path). If omitted, kept from manifest."
554+ None ,
555+ help = "New source root (rclone remote:path). If omitted, kept from manifest." ,
552556 ),
553557 dest_root : Optional [str ] = typer .Option (
554558 None , help = "New dest root (rclone remote:path). If omitted, kept from manifest."
@@ -570,7 +574,9 @@ def manifest_rebase(
570574 if not ln .strip ():
571575 continue
572576 rec = json .loads (ln )
573- new_src = source_root if source_root is not None else rec .get ("source_root" , "" )
577+ new_src = (
578+ source_root if source_root is not None else rec .get ("source_root" , "" )
579+ )
574580 new_dst = dest_root if dest_root is not None else rec .get ("dest_root" , "" )
575581 rel = rec .get ("path" , "" )
576582 rec ["source_root" ] = new_src
@@ -594,7 +600,10 @@ def manifest_combine(
594600 ),
595601 dest : str = typer .Option (..., help = "rclone dest root, e.g. s3dst:bucket/prefix" ),
596602 parts_dir : Path = typer .Option (
597- ..., exists = True , help = "Directory containing lsjson-*.json part files" , resolve_path = True
603+ ...,
604+ exists = True ,
605+ help = "Directory containing lsjson-*.json part files" ,
606+ resolve_path = True ,
598607 ),
599608 out : Path = typer .Option (..., help = "Output manifest JSONL path" , resolve_path = True ),
600609 run_id : Optional [str ] = typer .Option (
@@ -666,10 +675,16 @@ def _write_progress() -> None:
666675 bytes_total += size
667676
668677 mtime = item .get ("ModTime" )
669- hashes = item .get ("Hashes" ) if isinstance (item .get ("Hashes" ), dict ) else {}
678+ hashes = (
679+ item .get ("Hashes" ) if isinstance (item .get ("Hashes" ), dict ) else {}
680+ )
670681 etag = item .get ("ETag" ) or item .get ("etag" )
671682 storage_class = item .get ("StorageClass" )
672- meta = item .get ("Metadata" ) if isinstance (item .get ("Metadata" ), dict ) else {}
683+ meta = (
684+ item .get ("Metadata" )
685+ if isinstance (item .get ("Metadata" ), dict )
686+ else {}
687+ )
673688
674689 rec = {
675690 "schema" : SCHEMA ,
@@ -695,7 +710,9 @@ def _write_progress() -> None:
695710 last_progress_n = n
696711
697712 _write_progress ()
698- eprint (f"Combined { len (part_files )} parts -> { n } items, { bytes_total } bytes -> { out } " )
713+ eprint (
714+ f"Combined { len (part_files )} parts -> { n } items, { bytes_total } bytes -> { out } "
715+ )
699716
700717
701718# -----------------------------
@@ -1001,7 +1018,9 @@ def slurm_submit(
10011018 sbatch_script = run_dir / "sbatch_array.sh"
10021019 if not sbatch_script .exists ():
10031020 raise typer .BadParameter (f"Missing { sbatch_script } . Run `slurm render` first." )
1004- cp = run_cmd (["sbatch" , "--export=NONE" , str (sbatch_script )], capture = True , check = True )
1021+ cp = run_cmd (
1022+ ["sbatch" , "--export=NONE" , str (sbatch_script )], capture = True , check = True
1023+ )
10051024 print (cp .stdout .strip ())
10061025
10071026
0 commit comments