💬 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():
|
def main():
|
||||||
project_dir = Path(__file__).parent
|
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 = project_dir / "dist"
|
||||||
|
|
||||||
output_dir.mkdir(exist_ok=True)
|
output_dir.mkdir(exist_ok=True)
|
||||||
@@ -20,7 +20,7 @@ def main():
|
|||||||
"--standalone",
|
"--standalone",
|
||||||
"--onefile",
|
"--onefile",
|
||||||
f"--output-dir={output_dir}",
|
f"--output-dir={output_dir}",
|
||||||
"--output-filename=sft-get",
|
"--output-filename=sft",
|
||||||
"--assume-yes-for-downloads",
|
"--assume-yes-for-downloads",
|
||||||
"--remove-output",
|
"--remove-output",
|
||||||
# Include required packages
|
# Include required packages
|
||||||
@@ -32,7 +32,7 @@ def main():
|
|||||||
|
|
||||||
print(f"Building with command:\n{' '.join(cmd)}\n")
|
print(f"Building with command:\n{' '.join(cmd)}\n")
|
||||||
subprocess.run(cmd, check=True)
|
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__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ def main() -> int:
|
|||||||
["uv", "run", "ruff", "check", ".", *(["--fix"] if fix_mode else [])],
|
["uv", "run", "ruff", "check", ".", *(["--fix"] if fix_mode else [])],
|
||||||
"Ruff Lint",
|
"Ruff Lint",
|
||||||
),
|
),
|
||||||
(["uv", "run", "mypy", "sft_get.py"], "Mypy"),
|
(["uv", "run", "mypy", "tensors.py"], "Mypy"),
|
||||||
]
|
]
|
||||||
|
|
||||||
# Fix the format check command
|
# Fix the format check command
|
||||||
|
|||||||
+4
-4
@@ -1,5 +1,5 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "sft-get"
|
name = "tensors"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "Read safetensor metadata and fetch CivitAI model information"
|
description = "Read safetensor metadata and fetch CivitAI model information"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
@@ -11,14 +11,14 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
sft-get = "sft_get:main"
|
sft = "tensors:main"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["hatchling"]
|
requires = ["hatchling"]
|
||||||
build-backend = "hatchling.build"
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
[tool.hatch.build.targets.wheel]
|
[tool.hatch.build.targets.wheel]
|
||||||
packages = ["sft_get.py"]
|
packages = ["tensors.py"]
|
||||||
|
|
||||||
[dependency-groups]
|
[dependency-groups]
|
||||||
dev = [
|
dev = [
|
||||||
@@ -53,7 +53,7 @@ ignore = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[tool.ruff.lint.isort]
|
[tool.ruff.lint.isort]
|
||||||
known-first-party = ["sft_get"]
|
known-first-party = ["tensors"]
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
python_version = "3.12"
|
python_version = "3.12"
|
||||||
|
|||||||
Reference in New Issue
Block a user