Skip to content

Conversation

@fordN
Copy link
Contributor

@fordN fordN commented Nov 21, 2025

This PR adds a registry client for interacting with the public registry.

Supported functionality:

  • list()
  • search()
  • ai_search()
  • get()
  • list_versions()
  • get_version()
  • get_manifest()
  • publish()
  • publish_version()
  • update()
  • update_visibility()
  • update_version_status()
  • delete_version()

Example usage:

client = RegistryClient()
results = client.datasets.search('ethereum blocks')
for dataset in results.datasets:
      print(f"[{dataset.score}{dataset.namespace}/{dataset.name}")

Add comprehensive Registry API client for dataset discovery, search,
and publishing. The Registry is an external service for storing and
sharing dataset manifests.

Components:
- RegistryClient: HTTP client with authentication support
- RegistryDatasetsClient: Dataset operations (read/write)
- Custom error handling with error code mapping
- Pydantic models generated from OpenAPI spec
- Custom datetime validators for API timestamp format

Key features:
- Dataset search (full-text and AI semantic)
- Dataset browsing and version management
- Manifest fetching
- Publishing capabilities (requires auth)
- Metadata management

The API returns timestamps in 'YYYY-MM-DD HH:MM:SS.ffffff UTC' format,
requiring custom validators for Pydantic datetime parsing.

Files:
- src/amp/registry/client.py: Main Registry client
- src/amp/registry/datasets.py: Dataset operations
- src/amp/registry/models.py: Auto-generated Pydantic models
- src/amp/registry/errors.py: Error handling
- src/amp/registry/validators.py: Custom datetime parsing
- pyproject.toml: Exclude generated models from linting
- AdminClient: Pass auth=True or auth_token directly (was duplicating
  the if/elif/else chain)
- RegistryClient: Use get_token() callable for current token value
Update RegistryClient to support the same auth patterns as AdminClient
@fordN fordN self-assigned this Nov 21, 2025
@fordN fordN added enhancement New feature or request registry labels Nov 21, 2025
@fordN fordN requested a review from JohnSwan1503 November 21, 2025 13:22
@fordN fordN merged commit 651bd29 into main Nov 21, 2025
9 checks passed
@fordN fordN deleted the ford/registry branch November 21, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request registry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants