Release 1.0.0

The version lived in three places and only one was enforced: pyproject (which
the Registry publishes and the release workflow checks the tag against), the
User-Agent this client sends, and __init__'s fallback for when pyproject cannot
be read. The other two could drift silently, and API telemetry would then
attribute traffic to a version nobody is running. Bumped together, with a test
that fails when they disagree.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Behzad
2026-07-27 14:02:28 +02:00
co-authored by Claude Sonnet 5
parent fa4e214eb1
commit 37db16fa1b
5 changed files with 30 additions and 4 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ git clone https://github.com/StyleRef/styleref-comfyui
```
Restart ComfyUI. No dependencies to install — the pack uses only the Python
standard library. Look for `[StyleRef] v0.1.0 — 5 nodes registered` in the
standard library. Look for `[StyleRef] v1.0.0 — 5 nodes registered` in the
server console at startup.
## 60-second quickstart
+1 -1
View File
@@ -46,7 +46,7 @@ NODE_DISPLAY_NAME_MAPPINGS = {
# progressive enhancement. Nothing here is required for the nodes to work.
WEB_DIRECTORY = "./web"
_FALLBACK_VERSION = "0.1.0"
_FALLBACK_VERSION = "1.0.0"
def _pack_version() -> str:
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "styleref-comfyui"
version = "0.1.0"
version = "1.0.0"
description = "Load StyleRef creative styles as ComfyUI nodes — define a style once, reuse it across FLUX, SDXL, and SD1.5."
authors = [{ name = "StyleRef", email = "hello@styleref.io" }]
readme = "README.md"
+1 -1
View File
@@ -25,7 +25,7 @@ SITE_URL = "https://styleref.io"
# Identifies this surface in StyleRef's API telemetry (recordApiCall reads it).
CLIENT_TAG = "comfyui"
USER_AGENT = "styleref-comfyui/0.1.0 (+https://styleref.io)"
USER_AGENT = "styleref-comfyui/1.0.0 (+https://styleref.io)"
DEFAULT_TIMEOUT_S = 30
+26
View File
@@ -2,8 +2,11 @@
from __future__ import annotations
import importlib
import io
import json
import os
import re
import urllib.error
import pytest
@@ -359,3 +362,26 @@ def test_get_style_spec_returns_etag_on_200(monkeypatch):
spec, _url, etag = api.get_style_spec("abc")
assert spec["name"] == "Warm"
assert etag == 'W/"e2"'
# ── version strings stay in sync ─────────────────────────────────────────────
def test_version_strings_agree_with_pyproject():
"""
The version lives in three places: pyproject (which the Registry publishes
and the release workflow checks the tag against), the User-Agent this client
sends, and __init__'s fallback for when pyproject cannot be read. Only the
first is enforced by anything, so the other two drift silently and the
telemetry then attributes traffic to a version nobody is running.
"""
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
with open(os.path.join(root, "pyproject.toml"), encoding="utf-8") as fh:
declared = re.search(r'^version\s*=\s*"([^"]+)"', fh.read(), re.MULTILINE).group(1)
assert f"styleref-comfyui/{declared} " in api.USER_AGENT, (
f"USER_AGENT is {api.USER_AGENT!r}, pyproject says {declared}"
)
pack = importlib.import_module("__init__")
assert declared == pack._FALLBACK_VERSION