fix(python): single-source mirror package version

This commit is contained in:
ZacharyZhang-NY committed 2026-07-19 15:57:50 -04:00
1 parent 82e5807752
commit 54a5778ec4
6 files changed
+30 -4

No files matched your search

+1
View File
@@ -48,6 +48,7 @@ This repository publishes the open-source server, console, integration catalog,
- Keep functions focused on one ownership boundary. - Keep functions focused on one ownership boundary.
- Propagate unexpected errors to the CLI or request boundary. - Propagate unexpected errors to the CLI or request boundary.
- Keep technical claims executable through tests or generated validation. - Keep technical claims executable through tests or generated validation.
- Keep the mirrored Python package, distribution, and CLI version in `sdks/python/elydora/_version.py`; Setuptools metadata must read that literal dynamically.
- Interpret Python SDK `max_retries` as retries after the initial attempt and reject negative or non-integer values. - Interpret Python SDK `max_retries` as retries after the initial attempt and reject negative or non-integer values.
- Retry RFC-idempotent Python SDK requests automatically; retry non-idempotent requests only when the transport proves the request was never sent. - Retry RFC-idempotent Python SDK requests automatically; retry non-idempotent requests only when the transport proves the request was never sent.
- Honor valid `Retry-After` delay-seconds and HTTP-date values, and release retryable responses before sleeping. - Honor valid `Retry-After` delay-seconds and HTTP-date values, and release retryable responses before sleeping.
+2 -2
View File
@@ -3,6 +3,7 @@
from .client import ElydoraClient from .client import ElydoraClient
from .async_client import AsyncElydoraClient from .async_client import AsyncElydoraClient
from .errors import ElydoraError from .errors import ElydoraError
from ._version import __version__
from .crypto import ( from .crypto import (
compute_chain_hash, compute_chain_hash,
compute_payload_hash, compute_payload_hash,
@@ -48,9 +49,8 @@ from .types import (
IntegrationType, IntegrationType,
) )
__version__ = "1.0.0"
__all__ = [ __all__ = [
"__version__",
"ElydoraClient", "ElydoraClient",
"AsyncElydoraClient", "AsyncElydoraClient",
"ElydoraError", "ElydoraError",
+3
View File
@@ -0,0 +1,3 @@
"""Canonical Elydora package version."""
__version__ = "1.2.1"
+2 -1
View File
@@ -14,6 +14,7 @@ import shutil
import sys import sys
from typing import Dict, Type from typing import Dict, Type
from ._version import __version__
from .crypto import get_public_key_base64url from .crypto import get_public_key_base64url
from .plugins.base import AgentPlugin, InstallConfig from .plugins.base import AgentPlugin, InstallConfig
from .plugins.registry import SUPPORTED_AGENTS, get_agent_names from .plugins.registry import SUPPORTED_AGENTS, get_agent_names
@@ -174,7 +175,7 @@ def build_parser() -> argparse.ArgumentParser:
description="Elydora — tamper-evident audit trail for AI agents", description="Elydora — tamper-evident audit trail for AI agents",
) )
parser.add_argument( parser.add_argument(
"--version", action="version", version="%(prog)s 1.0.0" "--version", action="version", version=f"%(prog)s {__version__}"
) )
subparsers = parser.add_subparsers(dest="command", help="Available commands") subparsers = parser.add_subparsers(dest="command", help="Available commands")
+4 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "elydora" name = "elydora"
version = "1.1.0" dynamic = ["version"]
description = "Python SDK for the Elydora tamper-evident audit platform" description = "Python SDK for the Elydora tamper-evident audit platform"
readme = "README.md" readme = "README.md"
license = {text = "MIT"} license = {text = "MIT"}
@@ -41,3 +41,6 @@ dev = [
[tool.setuptools.packages.find] [tool.setuptools.packages.find]
include = ["elydora*"] include = ["elydora*"]
[tool.setuptools.dynamic]
version = {attr = "elydora._version.__version__"}
@@ -0,0 +1,18 @@
from importlib.metadata import version
import pytest
from elydora import __version__
from elydora.cli import build_parser
def test_runtime_version_matches_distribution_metadata() -> None:
assert __version__ == version("elydora")
def test_cli_reports_the_canonical_version(capsys: pytest.CaptureFixture[str]) -> None:
with pytest.raises(SystemExit) as exc_info:
build_parser().parse_args(["--version"])
assert exc_info.value.code == 0
assert capsys.readouterr().out == f"elydora {__version__}\n"