commit 224672d8267e870d5a197b3a06276be6e901fdb1
parent 7ebc1e796461437d6b7a0d236d519ac8f49bdb20
Author: Henry Unite <unitehenry@gmail.com>
Date: Wed, 10 Jun 2026 16:13:33 +0000
chore: format
Diffstat:
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/compression.py b/compression.py
@@ -22,6 +22,7 @@ image = (
.run_commands(["chmod +x /scripts/nacrith", "/scripts/nacrith"])
)
+
def run(commands):
import subprocess
import tempfile
@@ -42,18 +43,24 @@ def run(commands):
finally:
os.unlink(path)
-@app.function(gpu="H100", image=image, volumes={ "/data": vol })
+
+@app.function(gpu="H100", image=image, volumes={"/data": vol})
def compress(file_name):
- run([
- "source /Nacrith-GPU/venv/bin/activate",
- f'python /Nacrith-GPU/cli.py compress "/data/{file_name}" "/data/{file_name}.nc"',
- ])
+ run(
+ [
+ "source /Nacrith-GPU/venv/bin/activate",
+ f'python /Nacrith-GPU/cli.py compress "/data/{file_name}" "/data/{file_name}.nc"',
+ ]
+ )
-@app.function(gpu="H100", image=image, volumes={ "/data": vol })
+
+@app.function(gpu="H100", image=image, volumes={"/data": vol})
def decompress(file_name):
outfile = "".join(file_name.rsplit(".nc", 1))
- run([
- "source /Nacrith-GPU/venv/bin/activate",
- f'python /Nacrith-GPU/cli.py decompress "/data/{file_name}" "/data/{outfile}"',
- ])
+ run(
+ [
+ "source /Nacrith-GPU/venv/bin/activate",
+ f'python /Nacrith-GPU/cli.py decompress "/data/{file_name}" "/data/{outfile}"',
+ ]
+ )
diff --git a/scripts/format b/scripts/format
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+uvx ruff format *.py