💬 Commit message: Update 2026-01-26 09:45:57, 5 files, 18 lines
📁 Files changed: 5 📝 Lines changed: 18 • build.py • check.py • pyproject.toml • tensors.py • uv.lock
This commit is contained in:
@@ -8,7 +8,7 @@ from pathlib import Path
|
||||
|
||||
def main():
|
||||
project_dir = Path(__file__).parent
|
||||
main_file = project_dir / "sft_get.py"
|
||||
main_file = project_dir / "tensors.py"
|
||||
output_dir = project_dir / "dist"
|
||||
|
||||
output_dir.mkdir(exist_ok=True)
|
||||
@@ -20,7 +20,7 @@ def main():
|
||||
"--standalone",
|
||||
"--onefile",
|
||||
f"--output-dir={output_dir}",
|
||||
"--output-filename=sft-get",
|
||||
"--output-filename=sft",
|
||||
"--assume-yes-for-downloads",
|
||||
"--remove-output",
|
||||
# Include required packages
|
||||
@@ -32,7 +32,7 @@ def main():
|
||||
|
||||
print(f"Building with command:\n{' '.join(cmd)}\n")
|
||||
subprocess.run(cmd, check=True)
|
||||
print(f"\nBuild complete! Binary at: {output_dir / 'sft-get'}")
|
||||
print(f"\nBuild complete! Binary at: {output_dir / 'sft'}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -28,7 +28,7 @@ def main() -> int:
|
||||
["uv", "run", "ruff", "check", ".", *(["--fix"] if fix_mode else [])],
|
||||
"Ruff Lint",
|
||||
),
|
||||
(["uv", "run", "mypy", "sft_get.py"], "Mypy"),
|
||||
(["uv", "run", "mypy", "tensors.py"], "Mypy"),
|
||||
]
|
||||
|
||||
# Fix the format check command
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
[project]
|
||||
name = "sft-get"
|
||||
name = "tensors"
|
||||
version = "0.1.0"
|
||||
description = "Read safetensor metadata and fetch CivitAI model information"
|
||||
readme = "README.md"
|
||||
@@ -11,14 +11,14 @@ dependencies = [
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
sft-get = "sft_get:main"
|
||||
sft = "tensors:main"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["sft_get.py"]
|
||||
packages = ["tensors.py"]
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
@@ -53,7 +53,7 @@ ignore = [
|
||||
]
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
known-first-party = ["sft_get"]
|
||||
known-first-party = ["tensors"]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.12"
|
||||
|
||||
Reference in New Issue
Block a user