add stats, versioning

This commit is contained in:
C committed 2026-01-05 16:23:44 -08:00
1 parent dfd2c2f07d
commit bcf625d2b0
6 files changed
+33 -6

No files matched your search

+11
View File
@@ -4,11 +4,22 @@ Queries Square catalog to collect metrics about LEGO inventory quality.
"""
import json
import git
from typing import Dict, Any
from square import AsyncSquare
from . import get_sq_env
from . import abricksetapi
def get_git_commit() -> str:
"""Get first 6 characters of current git commit hash"""
try:
repo = git.Repo(search_parent_directories=True)
return repo.head.commit.hexsha[:6]
except Exception:
return "unknown"
# Initialize Square client
client = AsyncSquare(token=get_sq_env.SQUARE_TOKEN, environment=get_sq_env.environment)