Skip to content

Commit e52eac7

Browse files
Merge pull request #1372 from pboyd/20260206-2-main-sync
Sync from upstream
2 parents f1c96e1 + d0365ee commit e52eac7

File tree

14 files changed

+1835
-38
lines changed

14 files changed

+1835
-38
lines changed

clients/python/noxfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def mypy(session: Session) -> None:
5353
def tests(session: Session) -> None:
5454
"""Run the test suite."""
5555
session.install(
56-
".",
56+
".[signing]",
5757
"requests",
5858
"pytest",
5959
"pytest-asyncio",
@@ -73,7 +73,7 @@ def tests(session: Session) -> None:
7373
def e2e_tests(session: Session) -> None:
7474
"""Run the test suite."""
7575
packages = [
76-
".",
76+
".[signing]",
7777
"ray",
7878
"requests",
7979
"pytest",

clients/python/poetry.lock

Lines changed: 700 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/python/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ nest-asyncio = "^1.6.0"
2828
huggingface-hub = { version = ">=0.20.1,<1.4.0", optional = true }
2929
olot = { version = "^0.1.6", optional = true }
3030
boto3 = { version = "^1.37.34", optional = true }
31+
rh-model-signing = { version = "0.0.3", optional = true }
32+
platformdirs = { version = "^4.0.0", optional = true }
3133

3234
[tool.poetry.extras]
3335
hf = ["huggingface-hub"]
3436
boto3 = ["boto3"]
3537
olot = ["olot"]
38+
signing = ["rh-model-signing", "platformdirs"]
3639

3740
[tool.poetry.group.docs]
3841
optional = true
Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
"""Signing utilities for model registry."""
22

3-
from model_registry.signing.exceptions import InitializationError, SigningError, VerificationError
3+
from model_registry.signing.exceptions import (
4+
BaseSigningError,
5+
InitializationError,
6+
SigningError,
7+
VerificationError,
8+
)
49
from model_registry.signing.image_signer import CommandRunner, ImageSigner
10+
from model_registry.signing.model_signer import ModelSigner
11+
from model_registry.signing.token import decode_jwt_payload, extract_client_id
12+
from model_registry.signing.trust_manager import TrustManager
513

6-
__all__ = ["CommandRunner", "ImageSigner", "InitializationError", "SigningError", "VerificationError"]
14+
__all__ = [
15+
"CommandRunner",
16+
"ImageSigner",
17+
"ModelSigner",
18+
"TrustManager",
19+
"BaseSigningError",
20+
"InitializationError",
21+
"SigningError",
22+
"VerificationError",
23+
"decode_jwt_payload",
24+
"extract_client_id",
25+
]
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
"""Exceptions for signing operations."""
22

33

4-
class SigningError(Exception):
5-
"""Raised when image signing fails."""
4+
class BaseSigningError(Exception):
5+
"""Base exception for signing operations."""
66

77

8-
class VerificationError(Exception):
9-
"""Raised when image verification fails."""
8+
class SigningError(BaseSigningError):
9+
"""Raised when signing fails."""
1010

1111

12-
class InitializationError(Exception):
13-
"""Raised when sigstore initialization fails."""
12+
class VerificationError(BaseSigningError):
13+
"""Raised when verification fails."""
14+
15+
16+
class InitializationError(BaseSigningError):
17+
"""Raised when initialization fails."""

0 commit comments

Comments
 (0)