Skip to content

Commit 2e578d1

Browse files
committed
docs: clarify provider identity and Python coverage
1 parent e3a0601 commit 2e578d1

3 files changed

Lines changed: 30 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
python-version: ["3.11", "3.12", "3.13"]
22+
python-version: ["3.11", "3.12", "3.13", "3.14"]
2323

2424
steps:
2525
- name: Check out repository

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,12 @@ If the named provider already exists, keep it and add only the plugin entry.
6161
Provider credentials remain in `~/.hermes/.env`; this plugin has no environment
6262
variables of its own.
6363

64-
The key under the plugin's `providers` mapping must exactly match Hermes'
65-
`model.provider` value. For example, if `model.provider` is
66-
`custom:thunder-forge`, use `custom:thunder-forge` as the key.
64+
The key under the plugin's `providers` mapping is the
65+
canonical `custom:<name>` identity returned by
66+
`hermes_cli.runtime_provider.find_custom_provider_identity()`. This is
67+
independent of how the provider is selected: `model.provider` may be
68+
`thunder-forge` or `custom:thunder-forge`, but the plugin key is
69+
`custom:thunder-forge` in both cases.
6770

6871
### 3. Restart Hermes
6972

tests/test_plugin.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,29 @@ def test_versions_and_manifest_are_consistent(monkeypatch: Any) -> None:
113113
assert "requires_env" not in manifest
114114

115115

116+
def test_ci_covers_every_declared_python_version() -> None:
117+
project = tomllib.loads((ROOT / "pyproject.toml").read_text())
118+
workflow = yaml.safe_load((ROOT / ".github" / "workflows" / "ci.yml").read_text())
119+
classifier_prefix = "Programming Language :: Python :: "
120+
declared_versions = set()
121+
for classifier in project["project"]["classifiers"]:
122+
version = classifier.removeprefix(classifier_prefix)
123+
if classifier.startswith(classifier_prefix) and re.fullmatch(r"\d+\.\d+", version):
124+
declared_versions.add(version)
125+
tested_versions = set(workflow["jobs"]["test"]["strategy"]["matrix"]["python-version"])
126+
127+
assert declared_versions <= tested_versions
128+
129+
130+
def test_readme_documents_the_canonical_plugin_provider_identity() -> None:
131+
readme = " ".join((ROOT / "README.md").read_text().split())
132+
133+
assert "canonical `custom:<name>` identity" in readme
134+
assert "`model.provider` may be `thunder-forge` or `custom:thunder-forge`" in readme
135+
assert "the plugin key is `custom:thunder-forge` in both cases" in readme
136+
assert "must exactly match Hermes' `model.provider` value" not in readme
137+
138+
116139
def test_matching_provider_injects_session_and_model_without_mutation(monkeypatch: Any) -> None:
117140
lookup_calls: list[str] = []
118141
module = load_plugin(monkeypatch, lambda base_url: lookup_calls.append(base_url) or "custom:thunder-forge")

0 commit comments

Comments
 (0)