Buckets:

download
raw
11 kB
"""Framework registry provider.
Registers shared infrastructure (connectors, code generators, ARIEL modules)
that all Osprey applications build upon.
.. seealso:: :class:`RegistryConfigProvider`, :class:`RegistryManager`
"""
from osprey.connectors.types import (
DOOCS,
DOOCS_ARCHIVER,
EPICS,
EPICS_ARCHIVER,
LIVE_STANDIN,
MOCK,
MOCK_ARCHIVER,
MONGODB_ARCHIVER,
TANGO,
VIRTUAL_ACCELERATOR,
)
from .base import (
ArielEnhancementModuleRegistration,
ArielIngestionAdapterRegistration,
ArielSearchModuleRegistration,
ConnectorRegistration,
RegistryConfig,
RegistryConfigProvider,
ServiceRegistration,
)
class FrameworkRegistryProvider(RegistryConfigProvider):
"""Provides the baseline framework registry configuration.
Loaded automatically during registry initialization before any application
registries. Applications can override framework components by name.
"""
def get_registry_config(self) -> RegistryConfig:
"""Return framework registry configuration.
:rtype: RegistryConfig
"""
return RegistryConfig(
services=[
ServiceRegistration(
name="channel_finder",
module_path="osprey.services.channel_finder",
class_name="ChannelFinderService",
description="Natural-language channel address resolution service",
provides=["CHANNEL_ADDRESSES"],
requires=[],
),
],
# Framework AI model providers — the built-in table lives in
# osprey.models.provider_registry (single source of truth).
# RegistryManager._initialize_providers() delegates to it.
providers=[],
# Framework connectors for control systems and archivers
connectors=[
# Control system connectors
ConnectorRegistration(
name=MOCK,
connector_type="control_system",
module_path="osprey.connectors.control_system.mock_connector",
class_name="MockConnector",
description="Mock control system connector for development and testing",
),
ConnectorRegistration(
name=EPICS,
connector_type="control_system",
module_path="osprey.connectors.control_system.epics_connector",
class_name="EPICSConnector",
description="EPICS Channel Access control system connector",
),
ConnectorRegistration(
name=VIRTUAL_ACCELERATOR,
connector_type="control_system",
module_path="osprey.connectors.control_system.va_connector",
class_name="VirtualAcceleratorConnector",
description="Virtual Accelerator connector for PyAT-backed soft-IOC simulations",
),
ConnectorRegistration(
name=DOOCS,
connector_type="control_system",
module_path="osprey.connectors.control_system.doocs_connector",
class_name="DOOCSConnector",
description="DOOCS control system connector (requires doocs4py)",
),
ConnectorRegistration(
name=TANGO,
connector_type="control_system",
module_path="osprey.connectors.control_system.tango_connector",
class_name="TangoConnector",
description="TANGO Controls control system connector (requires PyTango)",
),
# The live stand-in is a soft IOC, so the EPICS connector is
# what reaches it — but it is registered under its own name,
# exactly as ``register_builtin_connectors`` registers it. The
# registration name is what the factory stamps onto the
# instance as ``_connector_type``, and that stamp selects both
# the connector block the instance is configured from
# (``control_system.connector.live_standin``) and the write
# posture read out of it; sharing the ``epics`` name would hand
# the stand-in the facility's authored block and arming.
#
# Listed here and not only in the factory's built-in tuple
# because the two paths populate the registry independently:
# ``initialize_registry()`` registers what this provider lists
# and nothing else, and it is the setup step every python
# executor sandbox runs. A stand-in missing here is a sandbox
# stamped for ``standin`` dying on "Unknown control system type:
# 'live_standin'" before any posture is read.
ConnectorRegistration(
name=LIVE_STANDIN,
connector_type="control_system",
module_path="osprey.connectors.control_system.epics_connector",
class_name="EPICSConnector",
description=(
"Live stand-in connector: the facility-shaped soft IOC a "
"deployment runs for itself, served over Channel Access"
),
),
# Archiver connectors
ConnectorRegistration(
name=MOCK_ARCHIVER,
connector_type="archiver",
module_path="osprey.connectors.archiver.mock_archiver_connector",
class_name="MockArchiverConnector",
description="Mock archiver connector for development and testing",
),
ConnectorRegistration(
name=EPICS_ARCHIVER,
connector_type="archiver",
module_path="osprey.connectors.archiver.epics_archiver_connector",
class_name="EPICSArchiverConnector",
description="EPICS Archiver Appliance connector",
),
ConnectorRegistration(
name=MONGODB_ARCHIVER,
connector_type="archiver",
module_path="osprey.connectors.archiver.mongodb_archiver_connector",
class_name="MongoDBArchiverConnector",
description="MongoDB archiver connector for time-series PV data",
),
ConnectorRegistration(
name=DOOCS_ARCHIVER,
connector_type="archiver",
module_path="osprey.connectors.archiver.doocs_archiver_connector",
class_name="DOOCSArchiverConnector",
description="DOOCS local history connector (requires doocs4py)",
),
],
# ARIEL search modules
ariel_search_modules=[
ArielSearchModuleRegistration(
name="keyword",
module_path="osprey.services.ariel_search.search.keyword",
description="Full-text search with PostgreSQL FTS and fuzzy fallback",
),
ArielSearchModuleRegistration(
name="semantic",
module_path="osprey.services.ariel_search.search.semantic",
description="Embedding similarity search using vector cosine distance",
),
ArielSearchModuleRegistration(
name="hybrid",
module_path="osprey.services.ariel_search.search.qmd",
description="Hybrid keyword and semantic search via the qmd sidecar",
),
],
# ARIEL enhancement modules
ariel_enhancement_modules=[
ArielEnhancementModuleRegistration(
name="semantic_processor",
module_path="osprey.services.ariel_search.enhancement.semantic_processor.processor",
class_name="SemanticProcessorModule",
description="Extract keywords and summaries from logbook entries",
execution_order=10,
),
ArielEnhancementModuleRegistration(
name="text_embedding",
module_path="osprey.services.ariel_search.enhancement.text_embedding.embedder",
class_name="TextEmbeddingModule",
description="Generate vector embeddings for logbook entries",
execution_order=20,
),
ArielEnhancementModuleRegistration(
name="qmd_export",
module_path="osprey.services.ariel_search.enhancement.qmd_export.exporter",
class_name="QmdExportModule",
description="Mirror entries to the markdown tree the qmd sidecar indexes",
execution_order=30,
),
],
# ARIEL ingestion adapters
ariel_ingestion_adapters=[
ArielIngestionAdapterRegistration(
name="als_logbook",
module_path="osprey.services.ariel_search.ingestion.adapters.als",
class_name="ALSLogbookAdapter",
description="ALS eLog adapter with JSONL streaming and HTTP API support",
),
ArielIngestionAdapterRegistration(
name="jlab_logbook",
module_path="osprey.services.ariel_search.ingestion.adapters.jlab",
class_name="JLabLogbookAdapter",
description="Jefferson Lab logbook adapter",
),
ArielIngestionAdapterRegistration(
name="ornl_logbook",
module_path="osprey.services.ariel_search.ingestion.adapters.ornl",
class_name="ORNLLogbookAdapter",
description="Oak Ridge National Laboratory logbook adapter",
),
ArielIngestionAdapterRegistration(
name="generic_json",
module_path="osprey.services.ariel_search.ingestion.adapters.generic",
class_name="GenericJSONAdapter",
description="Generic JSON adapter for testing and facilities without custom APIs",
),
],
initialization_order=[
"providers",
"connectors",
"ariel_search_modules",
"ariel_enhancement_modules",
"ariel_ingestion_adapters",
],
)

Xet Storage Details

Size:
11 kB
·
Xet hash:
c943503e7d990ed015cd5fadcc6fc5f5e4110a1b901069245725c86903e8b40d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.