id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
323,500 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/filedrop/adapter.py | csp_gateway.server.modules.filedrop.adapter._FileDropImpl | from csp.impl.pushadapter import PushInputAdapter
from watchdog.observers import Observer
from datetime import datetime
class _FileDropImpl(PushInputAdapter):
FILEREADER_MAP = {FileDropType.CSV: FileReaderCsv, FileDropType.JSON: FileReaderJson, FileDropType.PARQUET: FileReaderParquet, FileDropType.CUSTOM: FileRead... |
class _FileDropImpl(PushInputAdapter):
def __init__(self, config: FileDropAdapterConfiguration, ts_typ: T):
pass
def start(self, starttime: datetime, endtime: datetime):
pass
def stop(self):
pass | 4 | 0 | 5 | 0 | 5 | 0 | 1 | 0.05 | 1 | 3 | 2 | 0 | 3 | 4 | 3 | 3 | 25 | 3 | 21 | 11 | 17 | 1 | 16 | 11 | 12 | 2 | 1 | 1 | 4 |
323,501 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/filedrop/filedrop.py | csp_gateway.server.modules.filedrop.filedrop.ReadFileDrop | import os
from .adapter import FileDropAdapterConfiguration, FileDropType, filedrop_adapter_def
from csp.impl.types.tstype import isTsType
from csp.impl.types.container_type_normalizer import ContainerTypeNormalizer
import csp
from pydantic import Field, model_validator
from typing import Any, Callable, Dict, List, Opt... |
class ReadFileDrop(GatewayModule):
'''The module to read data from files dropped in specific directories and send them as structs to specific channels'''
@csp.node
def handle_list_basket(self, data: csp.ts[List[T]], list_size: int) -> csp.OutputBasket(List[csp.ts[T]], shape='list_size'):
pass
@... | 6 | 1 | 19 | 0 | 18 | 0 | 5 | 0.03 | 1 | 7 | 1 | 0 | 3 | 0 | 3 | 3 | 65 | 4 | 59 | 19 | 53 | 2 | 42 | 17 | 38 | 11 | 1 | 4 | 15 |
323,502 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/filedrop/filedrop.py | csp_gateway.server.modules.filedrop.filedrop.ReadFileDropConfiguration | from pydantic import Field, model_validator
from typing import Any, Callable, Dict, List, Optional, TypeVar, Union, get_args, get_origin
from ccflow import BaseModel
from .adapter import FileDropAdapterConfiguration, FileDropType, filedrop_adapter_def
from pathlib import Path
class ReadFileDropConfiguration(BaseModel)... |
class ReadFileDropConfiguration(BaseModel):
'''The configuration of a filedrop adapter for a directory and filetype'''
@model_validator(mode='after')
def check_filedrop_type(self) -> 'ReadFileDropConfiguration':
pass | 3 | 1 | 9 | 0 | 9 | 0 | 4 | 0.04 | 1 | 4 | 1 | 0 | 1 | 0 | 1 | 1 | 30 | 2 | 27 | 11 | 24 | 1 | 18 | 10 | 16 | 4 | 1 | 2 | 4 |
323,503 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/initializer.py | csp_gateway.server.modules.initializer.Initialize | from datetime import timedelta
import csp
from typing import Any, Dict
from csp_gateway.server.gateway.csp.channels import _CSP_ENGINE_CYCLE_TIMESTAMP_FIELD
from csp_gateway.server import ChannelsType, GatewayModule
from csp_gateway.server.shared.engine_replay import JSONConverter
class Initialize(GatewayModule):
... |
class Initialize(GatewayModule):
'''A generic initializer, uses pydantic to parse objects into the correct type for pushing into a Gateway at startup.'''
@csp.node
def tick_engine_cycle(self) -> csp.ts[Dict[str, object]]:
pass
def connect(self, channels: ChannelsType):
pass | 4 | 1 | 15 | 1 | 13 | 1 | 3 | 0.44 | 1 | 4 | 1 | 0 | 2 | 0 | 2 | 2 | 51 | 5 | 32 | 11 | 28 | 14 | 23 | 10 | 20 | 4 | 1 | 3 | 6 |
323,504 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/io/graph_output.py | csp_gateway.server.modules.io.graph_output.AddChannelsToGraphOutput | from pydantic import Field
from csp_gateway.server import ChannelSelection, ChannelsType, GatewayModule
import csp
from csp.impl.types.tstype import isTsType
from typing import Optional
from csp_gateway.utils import is_dict_basket
class AddChannelsToGraphOutput(GatewayModule):
selection: ChannelSelection = Field(d... |
class AddChannelsToGraphOutput(GatewayModule):
def connect(self, channels: ChannelsType):
pass | 2 | 0 | 11 | 0 | 10 | 1 | 5 | 0.08 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 15 | 1 | 13 | 8 | 11 | 1 | 12 | 8 | 10 | 5 | 1 | 3 | 5 |
323,505 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/io/json.py | csp_gateway.server.modules.io.json.JSONWriterThread | from threading import Thread
from queue import Queue
from pathlib import Path
class JSONWriterThread(Thread):
def __init__(self, file_path: str, write_queue: Queue, file_mode: str):
super().__init__()
self.file_path = file_path
self.write_queue = write_queue
self.file_mode = file_m... |
class JSONWriterThread(Thread):
def __init__(self, file_path: str, write_queue: Queue, file_mode: str):
pass
def run(self):
pass | 3 | 0 | 8 | 0 | 8 | 0 | 2 | 0 | 1 | 4 | 0 | 0 | 2 | 4 | 2 | 27 | 17 | 1 | 16 | 10 | 13 | 0 | 16 | 9 | 13 | 2 | 1 | 2 | 3 |
323,506 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/io/json.py | csp_gateway.server.modules.io.json.ReplayEngineJSON | from csp import ts
from csp_gateway.server.shared.engine_replay import EngineReplay
from .json_pull_adapter import JSONPullAdapter
import csp
from typing import Any, Dict, Union
from csp_gateway.server import EncodedEngineCycle
from queue import Queue
class ReplayEngineJSON(EngineReplay):
overwrite_if_writing: boo... |
class ReplayEngineJSON(EngineReplay):
@csp.node
def _dump_to_json(self, to_store: ts[EncodedEngineCycle]):
pass
def subscribe(self) -> Union[ts[str], ts[Dict[str, Any]]]:
pass
def publish(self, encoded_channels: ts[EncodedEngineCycle]) -> None:
pass | 5 | 0 | 7 | 1 | 6 | 0 | 2 | 0 | 1 | 4 | 1 | 0 | 3 | 0 | 3 | 39 | 27 | 6 | 21 | 9 | 16 | 0 | 20 | 8 | 16 | 3 | 7 | 1 | 5 |
323,507 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/io/json_pull_adapter.py | csp_gateway.server.modules.io.json_pull_adapter.JSONPullAdapterImpl | from csp_gateway.server.gateway.csp.channels import _CSP_ENGINE_CYCLE_TIMESTAMP_FIELD
from csp.impl.pulladapter import PullInputAdapter
from datetime import datetime
import orjson
class JSONPullAdapterImpl(PullInputAdapter):
def __init__(self, filename: str):
self._filename = filename
self._file =... |
class JSONPullAdapterImpl(PullInputAdapter):
def __init__(self, filename: str):
pass
def start(self, start_time, end_time):
pass
def stop(self):
pass
def next(self):
pass | 5 | 0 | 8 | 1 | 7 | 1 | 2 | 0.07 | 1 | 4 | 0 | 0 | 4 | 3 | 4 | 4 | 37 | 5 | 30 | 15 | 25 | 2 | 30 | 15 | 25 | 4 | 1 | 2 | 9 |
323,508 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/kafka/kafka.py | csp_gateway.server.modules.kafka.kafka.KafkaConfiguration | from ccflow import BaseModel
from pydantic import Field, FilePath, PrivateAttr, field_validator, model_validator
from datetime import datetime, timedelta
from csp.adapters.kafka import DateTimeType, JSONTextMessageMapper, KafkaStartOffset, RawTextMessageMapper
from typing import Any, Dict, Optional, Union, get_args, ge... |
class KafkaConfiguration(BaseModel):
'''
For more information regarding Kafka, see here:
https://kafka.apache.org/documentation/#introduction
'''
@field_validator('start_offset', mode='before')
@classmethod
def _coerce_start_offset(cls, value):
pass | 4 | 1 | 5 | 0 | 4 | 1 | 2 | 0.07 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 77 | 5 | 67 | 18 | 63 | 5 | 20 | 17 | 18 | 2 | 1 | 1 | 2 |
323,509 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/kafka/kafka.py | csp_gateway.server.modules.kafka.kafka.ReadWriteKafka | from csp_gateway.server import ChannelSelection, EncodedEngineCycle, GatewayChannels, GatewayModule
from csp_gateway.server.shared.json_converter import _convert_orjson_compatible
from csp import ts
import csp
from csp.adapters.status import Status
from csp.impl.types.container_type_normalizer import ContainerTypeNorma... |
class ReadWriteKafka(GatewayModule):
'''
This class is designed to:
1. Publish Gateway channel ticks to Kafka.
2. Read Gateway channel ticks from Kafka to instantiate
those ticks on the corresponding channel.
Custom serialization and deserialization logic can be provided by
inheriting fr... | 19 | 8 | 11 | 1 | 10 | 1 | 2 | 0.18 | 1 | 6 | 0 | 0 | 13 | 0 | 13 | 13 | 238 | 32 | 176 | 54 | 157 | 31 | 89 | 49 | 75 | 10 | 1 | 3 | 27 |
323,510 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/kafka/kafka.py | csp_gateway.server.modules.kafka.kafka.ReplayEngineKafka | from csp_gateway.server import ChannelSelection, EncodedEngineCycle, GatewayChannels, GatewayModule
from typing_extensions import override
from csp.adapters.kafka import DateTimeType, JSONTextMessageMapper, KafkaStartOffset, RawTextMessageMapper
import csp
from csp.adapters.status import Status
from typing import Any, ... |
class ReplayEngineKafka(EngineReplay):
@model_validator(mode='before')
@classmethod
def validate_kafka(cls, values):
pass
def __init__(self, *a, **kw):
pass
@override
def subscribe(self):
pass
@override
def publish(self, encoded_channels: ts[EncodedEngineCycle]... | 11 | 1 | 14 | 0 | 13 | 1 | 2 | 0.06 | 1 | 3 | 0 | 0 | 4 | 0 | 5 | 41 | 91 | 5 | 82 | 17 | 71 | 5 | 25 | 12 | 19 | 5 | 7 | 3 | 9 |
323,511 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/kafka/utils.py | csp_gateway.server.modules.kafka.utils.KafkaChannelProcessor | import csp
from csp_gateway.utils import GatewayStruct
from csp import ts
from typing import Any, List, Union, get_args, get_origin
from ccflow import BaseModel
import abc
class KafkaChannelProcessor(BaseModel, abc.ABC):
"""
Process channel inputs before sending to Kafka, or before propagating into the graph.
... |
class KafkaChannelProcessor(BaseModel, abc.ABC):
'''
Process channel inputs before sending to Kafka, or before propagating into the graph.
'''
@abc.abstractmethod
def process(self, obj: Union[List[GatewayStruct], GatewayStruct], topic: str, key: str) -> Any:
pass
def apply_process(self... | 4 | 2 | 14 | 3 | 6 | 6 | 2 | 1.08 | 2 | 6 | 0 | 0 | 2 | 0 | 2 | 22 | 34 | 7 | 13 | 9 | 9 | 14 | 12 | 8 | 9 | 2 | 4 | 1 | 3 |
323,512 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/logging/datadog.py | csp_gateway.server.modules.logging.datadog.PublishDatadog | from threading import Thread
from csp_gateway.server import ChannelSelection, GatewayModule
from csp import ts
from queue import Queue
import csp
from pydantic import Field
from csp_gateway.server.modules.logging.util import MonitoringEvent, MonitoringMetric
from csp_gateway.utils import get_thread
from typing import D... |
class PublishDatadog(GatewayModule):
'''
Gateway Module for emiting Datadog API events and/or metrics
'''
def connect(self, channels):
'''
Channels to be connected to graph
'''
pass
@staticmethod
@csp.node
def _publish_datadog(events: ts[List[MonitoringEvent... | 5 | 2 | 29 | 5 | 22 | 2 | 4 | 0.15 | 1 | 6 | 2 | 0 | 1 | 0 | 2 | 2 | 76 | 13 | 55 | 22 | 44 | 8 | 34 | 15 | 31 | 4 | 1 | 1 | 8 |
323,513 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/logging/logging.py | csp_gateway.server.modules.logging.logging.LogChannels | import logging
from typing import Optional
from pydantic import Field
from csp_gateway.server import ChannelSelection, ChannelsType, GatewayModule
import csp
class LogChannels(GatewayModule):
selection: ChannelSelection = Field(default_factory=ChannelSelection)
log_states: bool = False
log_level: int = log... |
class LogChannels(GatewayModule):
def connect(self, channels: ChannelsType):
pass | 2 | 0 | 12 | 1 | 10 | 1 | 4 | 0.06 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 19 | 2 | 16 | 12 | 14 | 1 | 15 | 12 | 13 | 4 | 1 | 3 | 4 |
323,514 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/logging/opsgenie.py | csp_gateway.server.modules.logging.opsgenie.PublishOpsGenie | from csp_gateway.server.modules.logging.util import MonitoringEvent, MonitoringLevelMapping, MonitoringMetric, OpsGenieLevel
from datetime import timedelta
import opsgenie_sdk
import csp
from pydantic import Field, PrivateAttr, model_validator
from csp_gateway.server import ChannelSelection, GatewayModule
import json
f... |
class PublishOpsGenie(GatewayModule):
'''
PublishOpsGenie class is responsible for interfacing with OpsGenie to send alerts and
manage heartbeats and heartbeat lags. It includes configurations for API keys, tags,
delays, and heartbeat settings.
'''
@model_validator(mode='before')
def check_... | 9 | 3 | 46 | 2 | 40 | 5 | 5 | 0.13 | 1 | 7 | 3 | 0 | 5 | 0 | 5 | 5 | 274 | 18 | 226 | 52 | 217 | 30 | 120 | 46 | 114 | 10 | 1 | 5 | 27 |
323,515 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/logging/printing.py | csp_gateway.server.modules.logging.printing.PrintChannels | import csp
from typing import Optional
from csp_gateway.server import ChannelSelection, ChannelsType, GatewayModule
from pydantic import Field
class PrintChannels(GatewayModule):
"""
Gateway Module for printing channels, which could be useful for debugging.
There exists a designated logging node class `Log... |
class PrintChannels(GatewayModule):
'''
Gateway Module for printing channels, which could be useful for debugging.
There exists a designated logging node class `LogChannels` which is preferred
and can specify a logger to use by name.
'''
def connect(self, channels: ChannelsType):
pass | 2 | 1 | 3 | 0 | 3 | 0 | 2 | 0.83 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 13 | 2 | 6 | 5 | 4 | 5 | 6 | 5 | 4 | 2 | 1 | 1 | 2 |
323,516 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/logging/symphony.py | csp_gateway.server.modules.logging.symphony.PublishSymphony | import json
from csp_adapter_symphony import SymphonyAdapter, SymphonyMessage
from csp_gateway.server import GatewayChannels, GatewayModule
from typing import List, Tuple, TypeVar
import csp
from csp import ts
class PublishSymphony(GatewayModule):
"""
Takes a set of channels (selections) and turns them into sy... |
class PublishSymphony(GatewayModule):
'''
Takes a set of channels (selections) and turns them into symphony messages.
To get setup with symphony:
1. Email 'Tech - Symphony Admin' to create a new symphony account for your bot and for them to generate a pfx keyc.
You should include the following ... | 5 | 1 | 12 | 0 | 12 | 0 | 2 | 0.95 | 1 | 2 | 0 | 0 | 3 | 0 | 3 | 3 | 94 | 12 | 42 | 14 | 37 | 40 | 25 | 12 | 21 | 3 | 1 | 2 | 6 |
323,517 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/logging/util.py | csp_gateway.server.modules.logging.util.DatadogLevel | from enum import Enum
class DatadogLevel(Enum):
"""Datadog alert levels."""
error = 'error'
warning = 'warning'
info = 'info'
success = 'success' |
class DatadogLevel(Enum):
'''Datadog alert levels.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 7 | 1 | 5 | 5 | 4 | 1 | 5 | 5 | 4 | 0 | 4 | 0 | 0 |
323,518 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/logging/util.py | csp_gateway.server.modules.logging.util.MonitoringBase | import orjson
from abc import abstractmethod
from typing_extensions import override
from datetime import timezone
from typing import Dict, List, Tuple, Union
from csp_gateway.utils.struct.base import GatewayStruct
class MonitoringBase(GatewayStruct):
"""
Monitoring base class.
Attributes:
tags (Di... |
class MonitoringBase(GatewayStruct):
'''
Monitoring base class.
Attributes:
tags (Dict[str, str]): Monitoring tags.
tag_str (str): String representation of tags.
'''
def __init__(self, **kwargs):
pass
def get_tags(self, extra_tags: Dict[str, str]=None) -> List[str]:
... | 12 | 7 | 13 | 2 | 4 | 8 | 2 | 1.84 | 1 | 6 | 0 | 2 | 7 | 0 | 7 | 18 | 111 | 21 | 32 | 17 | 20 | 59 | 28 | 13 | 20 | 3 | 3 | 2 | 11 |
323,519 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/logging/util.py | csp_gateway.server.modules.logging.util.MonitoringEvent | from typing import Dict, List, Tuple, Union
class MonitoringEvent(MonitoringBase):
"""
Monitoring event for Datadog.
Attributes:
title (str): Datadog event title.
text (str): Datadog event text.
event_type (str): Datadog key by which to group events in the event stream.
ale... |
class MonitoringEvent(MonitoringBase):
'''
Monitoring event for Datadog.
Attributes:
title (str): Datadog event title.
text (str): Datadog event text.
event_type (str): Datadog key by which to group events in the event stream.
alert_type (DatadogLevel): Datadog alert type, e... | 5 | 5 | 28 | 2 | 17 | 9 | 3 | 0.61 | 1 | 2 | 1 | 0 | 4 | 1 | 4 | 22 | 136 | 15 | 76 | 29 | 58 | 46 | 34 | 16 | 28 | 7 | 4 | 4 | 11 |
323,520 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/logging/util.py | csp_gateway.server.modules.logging.util.MonitoringLevel | import logging
from pydantic import BaseModel
class MonitoringLevel(BaseModel):
"""Dataclass used for level mapping accross systems"""
level: str
datadog: DatadogLevel
opsgenie: OpsGenieLevel
logging: int |
class MonitoringLevel(BaseModel):
'''Dataclass used for level mapping accross systems'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 7 | 1 | 5 | 1 | 4 | 1 | 5 | 1 | 4 | 0 | 5 | 0 | 0 |
323,521 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/logging/util.py | csp_gateway.server.modules.logging.util.MonitoringLevelMapping | from enum import Enum
from typing import Dict, List, Tuple, Union
class MonitoringLevelMapping(Enum):
"""
MonitoringLevelMapping provides mapping between Datadog, OpsGenie, and logging levels.
Attributes:
critical (MonitoringLevel): Critical level mapping.
error (MonitoringLevel): Error le... |
class MonitoringLevelMapping(Enum):
'''
MonitoringLevelMapping provides mapping between Datadog, OpsGenie, and logging levels.
Attributes:
critical (MonitoringLevel): Critical level mapping.
error (MonitoringLevel): Error level mapping.
warning (MonitoringLevel): Warning level mappi... | 17 | 9 | 11 | 1 | 5 | 5 | 3 | 0.66 | 1 | 8 | 4 | 0 | 3 | 0 | 8 | 57 | 135 | 19 | 70 | 24 | 53 | 46 | 45 | 16 | 36 | 14 | 4 | 3 | 22 |
323,522 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/logging/util.py | csp_gateway.server.modules.logging.util.MonitoringMetric | from typing import Dict, List, Tuple, Union
from enum import Enum
class MonitoringMetric(MonitoringBase):
"""
Monitoring metric for Datadog.
Attributes:
metric (str): Datadog metric name.
metric_type (MetricType): Datadog metric type, i.e., count, rate, gauge.
value (Union[int, flo... |
class MonitoringMetric(MonitoringBase):
'''
Monitoring metric for Datadog.
Attributes:
metric (str): Datadog metric name.
metric_type (MetricType): Datadog metric type, i.e., count, rate, gauge.
value (Union[int, float]): Numeric metric value.
'''
class MetricType(Enum):
... | 5 | 5 | 21 | 2 | 10 | 9 | 1 | 0.92 | 1 | 3 | 2 | 0 | 3 | 1 | 3 | 21 | 88 | 14 | 39 | 17 | 26 | 36 | 17 | 9 | 11 | 2 | 4 | 1 | 4 |
323,523 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/logging/util.py | csp_gateway.server.modules.logging.util.MonitoringSystem | from enum import Enum
class MonitoringSystem(Enum):
"""List of monitoring systems."""
DATADOG = 'datadog'
OPSGENIE = 'opsgenie'
LOGGING = 'logging' |
class MonitoringSystem(Enum):
'''List of monitoring systems.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 6 | 1 | 4 | 4 | 3 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
323,524 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/logging/util.py | csp_gateway.server.modules.logging.util.OpsGenieLevel | from enum import Enum
class OpsGenieLevel(Enum):
"""OpsGenie alert levels."""
P1 = 'P1'
P2 = 'P2'
P3 = 'P3'
P4 = 'P4'
P5 = 'P5' |
class OpsGenieLevel(Enum):
'''OpsGenie alert levels.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.17 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 8 | 1 | 6 | 6 | 5 | 1 | 6 | 6 | 5 | 0 | 4 | 0 | 0 |
323,525 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/mirror.py | csp_gateway.server.modules.mirror.Mirror | from typing import Dict, Optional, Tuple
from csp_gateway.utils import ReadWriteMode
from csp_gateway.server import ChannelSelection, ChannelsType, GatewayModule
from csp_gateway.server.shared.engine_replay import EngineReplay
from pydantic import Field, field_validator
class Mirror(GatewayModule):
"""
Designe... |
class Mirror(GatewayModule):
'''
Designed to mirror the ticks of a gateway instance from a given source.
Wires in the state channels to allow state queries.
'''
@field_validator('state_channels', mode='before')
def validate_state_channels_for_replay(cls, v):
pass
@field_validator('m... | 6 | 1 | 5 | 0 | 4 | 1 | 2 | 0.23 | 1 | 2 | 0 | 0 | 3 | 0 | 3 | 3 | 42 | 4 | 31 | 12 | 25 | 7 | 20 | 10 | 16 | 2 | 1 | 1 | 5 |
323,526 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/sql.py | csp_gateway.server.modules.sql.ChannelSchemaConfig | from typing import TYPE_CHECKING, Any, Dict, List, TypeVar
from pydantic import BaseModel
class ChannelSchemaConfig(BaseModel):
"""
channel_name: str
name of channel to check for ticks
table: str
name of table to write to
fields: List[str] = []
specific of list of fields to chec... |
class ChannelSchemaConfig(BaseModel):
'''
channel_name: str
name of channel to check for ticks
table: str
name of table to write to
fields: List[str] = []
specific of list of fields to check the channel underlying attribute for
if empty, will use all known attributes fro... | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 20 | 1 | 6 | 4 | 5 | 15 | 6 | 4 | 5 | 0 | 5 | 0 | 0 |
323,527 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/sql.py | csp_gateway.server.modules.sql.PublishSQLA | import csp
from csp_gateway import GatewayChannels, GatewayModule
import json
from typing import TYPE_CHECKING, Any, Dict, List, TypeVar
from datetime import datetime
from csp import ts
class PublishSQLA(GatewayModule):
"""
The PublishSQLA module allows for formatted writing of items to tables.
Note: requ... |
class PublishSQLA(GatewayModule):
'''
The PublishSQLA module allows for formatted writing of items to tables.
Note: requires sqlalchemy
...
Kwargs
------
cnx_details: SQLACnxDetails
the struct detailing how to create the connection string
schema_configs: List[ChannelSchemaConfig... | 7 | 1 | 13 | 2 | 11 | 1 | 4 | 0.64 | 1 | 9 | 0 | 0 | 5 | 0 | 5 | 5 | 125 | 23 | 64 | 30 | 54 | 41 | 59 | 27 | 50 | 8 | 1 | 3 | 20 |
323,528 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/sql.py | csp_gateway.server.modules.sql.SQLACnxDetails | from pydantic import BaseModel
class SQLACnxDetails(BaseModel):
username: str = ''
password: str = ''
host: str = ''
db: str = ''
port: int = 5432
engine: str = 'postgresql'
driver: str = 'ODBC Driver 17 for SQL Server'
def get_cnx_string(self) -> str:
if self.engine == 'mssql+... |
class SQLACnxDetails(BaseModel):
def get_cnx_string(self) -> str:
pass | 2 | 0 | 7 | 0 | 7 | 1 | 3 | 0.2 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 83 | 16 | 1 | 15 | 9 | 13 | 3 | 13 | 9 | 11 | 3 | 5 | 1 | 3 |
323,529 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/web/channels_graph.py | csp_gateway.server.modules.web.channels_graph.MountChannelsGraph | from typing import Dict, List
from json import dumps
from fastapi.responses import HTMLResponse
from csp_gateway.server import GatewayChannels, GatewayModule
from fastapi import Request
from csp_gateway.server.web import GatewayWebApp
class MountChannelsGraph(GatewayModule):
route: str = '/channels_graph'
def... |
class MountChannelsGraph(GatewayModule):
def connect(self, channels: GatewayChannels) -> None:
pass
def rest(self, app: GatewayWebApp) -> None:
pass
@api_router.get(self.route, response_model=Dict[str, Dict[str, List[str]]], tags=['Utility'])
def channels_graph_data(request: R... | 7 | 2 | 17 | 2 | 7 | 9 | 1 | 0.9 | 1 | 2 | 1 | 0 | 2 | 0 | 2 | 2 | 46 | 6 | 21 | 15 | 10 | 19 | 12 | 9 | 7 | 1 | 1 | 0 | 4 |
323,530 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/web/mount.py | csp_gateway.server.modules.web.mount.MountRestRoutes | from csp_gateway.server import ChannelSelection, GatewayChannels, GatewayModule
from csp_gateway.server.web import GatewayWebApp
from pydantic import Field, model_validator
class MountRestRoutes(GatewayModule):
force_mount_all: bool = Field(False, description='For debugging, will mount all rest routes for every ch... |
class MountRestRoutes(GatewayModule):
@model_validator(mode='before')
@classmethod
def _deprecate_mount_all(cls, values):
pass
def connect(self, channels: GatewayChannels) -> None:
pass
def rest(self, app: GatewayWebApp) -> None:
pass
def _mount_last(self, app: Gatew... | 11 | 0 | 12 | 2 | 9 | 1 | 4 | 0.14 | 1 | 3 | 1 | 0 | 7 | 0 | 8 | 8 | 114 | 23 | 80 | 38 | 69 | 11 | 73 | 36 | 64 | 7 | 1 | 3 | 28 |
323,531 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/web/mount_fields.py | csp_gateway.server.modules.web.mount_fields.MountFieldRestRoutes | from fastapi import APIRouter, HTTPException, Request
from typing import List, Optional, Type, Union
from csp_gateway.server.web import GatewayWebApp, get_default_responses
from csp_gateway.server import ChannelSelection, GatewayChannels, GatewayModule
from pydantic import BaseModel, Field
class MountFieldRestRoutes(G... |
class MountFieldRestRoutes(GatewayModule):
'''Mount rest routes for specific non-csp fields of the GatewayChannels.
This is not done generically across all static fields as they may not always be serializable.
'''
def connect(self, channels: GatewayChannels) -> None:
pass
def rest(self, a... | 5 | 2 | 9 | 1 | 6 | 3 | 1 | 0.42 | 1 | 2 | 1 | 0 | 2 | 0 | 2 | 2 | 33 | 6 | 19 | 16 | 9 | 8 | 13 | 10 | 9 | 2 | 1 | 1 | 4 |
323,532 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/web/outputs.py | csp_gateway.server.modules.web.outputs.MountOutputsFolder | from fastapi import HTTPException, Request
from hydra.core.hydra_config import HydraConfig
from typing import Optional
from csp_gateway.server.web import GatewayWebApp
import os.path
from csp_gateway.server import GatewayChannels, GatewayModule
import os
from fastapi.responses import HTMLResponse, StreamingResponse
cl... |
class MountOutputsFolder(GatewayModule):
def connect(self, channels: GatewayChannels) -> None:
pass
def rest(self, app: GatewayWebApp) -> None:
pass
@app_router.get('/outputs/{full_path:path}', response_class=HTMLResponse, tags=['Utility'])
def browse_logs(full_path: str, requ... | 6 | 1 | 19 | 2 | 14 | 4 | 3 | 0.21 | 1 | 2 | 1 | 0 | 2 | 1 | 2 | 2 | 46 | 6 | 34 | 14 | 28 | 7 | 28 | 12 | 23 | 6 | 1 | 2 | 12 |
323,533 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/web/perspective.py | csp_gateway.server.modules.web.perspective.MountPerspectiveTables | from datetime import date, datetime, timedelta
from csp_gateway.utils import PickleableQueue, get_args, get_origin, get_thread
from starlette.websockets import WebSocketDisconnect
from pydantic import Field, PrivateAttr
from csp_gateway.server import ChannelSelection, GatewayChannels, GatewayModule
from typing import D... |
class MountPerspectiveTables(GatewayModule):
def _connect_all_tables(self, channels: GatewayChannels) -> None:
pass
def get_schema_from_field(self, channels: GatewayChannels, field: str):
pass
def add_table(self, field: str, schema, limit: int=None, index: str=None):
pass
de... | 14 | 3 | 21 | 2 | 15 | 3 | 3 | 0.13 | 1 | 10 | 1 | 0 | 7 | 0 | 7 | 7 | 226 | 31 | 174 | 70 | 145 | 22 | 114 | 52 | 103 | 9 | 1 | 3 | 30 |
323,534 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/modules/web/websocket.py | csp_gateway.server.modules.web.websocket.MountWebSocketRoutes | from csp import ts
from typing import Any, Dict, List, Optional, Set, Tuple, TypeVar, get_args, get_origin
from csp.impl.genericpushadapter import GenericPushAdapter
from csp_gateway.server.web import GatewayWebApp, get_default_responses, prepare_response
from pydantic import Field, PrivateAttr, TypeAdapter
from uvicor... |
class MountWebSocketRoutes(GatewayModule):
def connect(self, channels: GatewayChannels) -> None:
pass
def start_app(self):
'''Start the app, needs to be called with event loop from main thread running.'''
pass
async def process_queue(self):
pass
@csp.node
def hand... | 16 | 3 | 34 | 5 | 20 | 9 | 6 | 0.3 | 1 | 16 | 1 | 0 | 11 | 0 | 11 | 11 | 392 | 65 | 254 | 81 | 226 | 75 | 212 | 64 | 199 | 21 | 1 | 5 | 70 |
323,535 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/settings.py | csp_gateway.server.settings.Settings | from csp_gateway import __version__
from pydantic import AnyHttpUrl, Field
from typing import List
from socket import gethostname
from secrets import token_urlsafe
class Settings(BaseSettings):
"""Generic settings for the CSP Gateway."""
model_config = dict(case_sensitive=True)
API_STR: str = '/api/v1'
... |
class Settings(BaseSettings):
'''Generic settings for the CSP Gateway.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.11 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 24 | 5 | 18 | 15 | 17 | 2 | 15 | 15 | 14 | 0 | 5 | 0 | 0 |
323,536 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/shared/adapters.py | csp_gateway.server.shared.adapters.PollingSQLAdapterImpl | from datetime import timedelta
from csp.impl.pushadapter import PushInputAdapter
import time
from csp_gateway.utils import get_thread
import logging
from typing import Any, Callable, Optional
class PollingSQLAdapterImpl(PushInputAdapter):
def __init__(self, interval: timedelta, connection: str, query: str, poll: ... |
class PollingSQLAdapterImpl(PushInputAdapter):
def __init__(self, interval: timedelta, connection: str, query: str, poll: Callable[[str, str, logging.Logger], Any], callback: Optional[Callable[[Any], Any]]=None, logger_name: str=__name__, failed_poll_msg: str='Failed to poll sql database', connection_timeout_seco... | 5 | 2 | 18 | 1 | 14 | 4 | 3 | 0.25 | 1 | 6 | 0 | 0 | 4 | 11 | 4 | 4 | 76 | 8 | 55 | 30 | 39 | 14 | 43 | 19 | 38 | 4 | 1 | 3 | 11 |
323,537 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/shared/channel_selection.py | csp_gateway.server.shared.channel_selection.ChannelSelection | from csp_gateway.utils import is_dict_basket
from csp.impl.types.tstype import isTsType
from typing import List, Optional, Set, Union
from pydantic import Field, model_validator
from csp_gateway.server.gateway.csp import Channels, ChannelsType
from ccflow import BaseModel
class ChannelSelection(BaseModel):
"""
... |
class ChannelSelection(BaseModel):
'''
A class to represent channel selection options for filtering channels based on inclusion and exclusion criteria.
Attributes:
`include` (Optional[List[str]]): A list of channel names to include in the selection.
The order here matters
De... | 4 | 2 | 37 | 6 | 23 | 10 | 9 | 0.72 | 1 | 6 | 0 | 0 | 2 | 0 | 2 | 2 | 99 | 16 | 50 | 19 | 39 | 36 | 40 | 9 | 37 | 15 | 1 | 3 | 18 |
323,538 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/shared/engine_replay.py | csp_gateway.server.shared.engine_replay.EngineReplay | from datetime import datetime, timedelta
import abc
from csp_gateway.server.gateway.gateway import GatewayModule
from csp import ts
from csp_gateway.server.gateway.csp import ChannelsType
from typing import Any, Dict, List, Optional, Tuple, Union
from csp_gateway.utils import ReadWriteMode, set_alarm_and_fetch_alarm_ti... |
class EngineReplay(GatewayModule, abc.ABC):
'''
This module defines an abstract class that allows reading and writing
csp engine cycle ticks of the channels within a gateway.
**WRITE**
When writing, every tick of the specified channels are encoded and written to some source.
**READ**
From a... | 7 | 5 | 12 | 2 | 9 | 2 | 3 | 0.19 | 2 | 7 | 2 | 2 | 4 | 0 | 4 | 36 | 105 | 13 | 77 | 25 | 70 | 15 | 38 | 23 | 33 | 7 | 6 | 1 | 10 |
323,539 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/shared/json_converter.py | csp_gateway.server.shared.json_converter.ChannelValueModel | from datetime import datetime, timedelta, timezone
from typing import Any, Dict, List, Optional, Set, Tuple, TypeVar, Union
from ccflow import BaseModel
class ChannelValueModel(BaseModel):
"""Pydantic model representing a tick on a specific channel."""
channel: str
value: Any
dict_basket_key: Optional[... |
class ChannelValueModel(BaseModel):
'''Pydantic model representing a tick on a specific channel.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 1 | 5 | 2 | 4 | 1 | 5 | 2 | 4 | 0 | 1 | 0 | 0 |
323,540 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/shared/json_converter.py | csp_gateway.server.shared.json_converter.EncodedEngineCycle | import csp
from datetime import datetime, timedelta, timezone
class EncodedEngineCycle(csp.Struct):
"""This is a csp struct representing a single engine cycle."""
encoding: str
csp_timestamp: datetime |
class EncodedEngineCycle(csp.Struct):
'''This is a csp struct representing a single engine cycle.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.33 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 1 | 3 | 1 | 2 | 1 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
323,541 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/shared/json_converter.py | csp_gateway.server.shared.json_converter.JSONConverter | from csp.impl.types.tstype import isTsType
from csp_gateway.utils import get_dict_basket_value_tstype, is_dict_basket, is_list_basket
from pydantic import Field, PrivateAttr, TypeAdapter
from ccflow import BaseModel
from typing import Any, Dict, List, Optional, Set, Tuple, TypeVar, Union
from collections import default... |
class JSONConverter(BaseModel):
'''
This class is instantiated within a Gateway Module to wire the channel for
json encoding/decoding. The encode/decode functions are called to perform the
respective wirings. Only channels in the snapshot model of the channels class
are included.
'''
def _... | 12 | 3 | 17 | 1 | 13 | 3 | 5 | 0.23 | 1 | 15 | 1 | 0 | 8 | 0 | 8 | 8 | 177 | 19 | 131 | 58 | 102 | 30 | 83 | 36 | 74 | 12 | 1 | 5 | 36 |
323,542 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/web/app.py | csp_gateway.server.web.app.GatewayWebApp | from .static import CacheControlledStaticFiles
from typing import Any, Callable, Dict, List, Optional, Set
from uvicorn.config import Config
from .routes import add_controls_available_channels, add_controls_routes, add_last_available_channels, add_last_routes, add_lookup_available_channels, add_lookup_routes, add_next_... |
class GatewayWebApp(object):
def __init__(self, gateway: 'Gateway', csp_thread: Any, settings: Settings, ui: bool=True, logger: Logger=None, _in_test: bool=False):
pass
def get_fastapi(self) -> FastAPI:
pass
@asynccontextmanager
async def _lifespan(self, app: FastAPI):
pass
... | 45 | 4 | 11 | 1 | 9 | 1 | 2 | 0.15 | 1 | 13 | 2 | 0 | 28 | 7 | 28 | 28 | 431 | 73 | 315 | 103 | 255 | 48 | 187 | 80 | 149 | 5 | 1 | 2 | 57 |
323,543 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/web/static.py | csp_gateway.server.web.static.CacheControlledStaticFiles | from starlette.types import Scope
from starlette.responses import Response
from starlette.staticfiles import StaticFiles
class CacheControlledStaticFiles(StaticFiles):
async def get_response(self, path: str, scope: Scope) -> Response:
response = await super().get_response(path, scope)
response.hea... |
class CacheControlledStaticFiles(StaticFiles):
async def get_response(self, path: str, scope: Scope) -> Response:
pass | 2 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 0 | 5 | 3 | 3 | 0 | 5 | 3 | 3 | 1 | 1 | 0 | 1 |
323,544 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/server/web/utils.py | csp_gateway.server.web.utils.Error404 | from fastapi.exceptions import RequestErrorModel
class Error404(RequestErrorModel):
detail: str = '' |
class Error404(RequestErrorModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 1 | 1 | 2 | 2 | 1 | 0 | 1 | 0 | 0 |
323,545 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/enums.py | csp_gateway.utils.enums.ReadWriteMode | from enum import Enum
class ReadWriteMode(str, Enum):
"""Enum representing whether a component is set to read, write, or both."""
READ = 'READ'
WRITE = 'WRITE'
READ_AND_WRITE = 'READ_AND_WRITE' |
class ReadWriteMode(str, Enum):
'''Enum representing whether a component is set to read, write, or both.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 6 | 1 | 4 | 4 | 3 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
323,546 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/exceptions.py | csp_gateway.utils.exceptions.GatewayException | class GatewayException(Exception):
... | class GatewayException(Exception):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 | 0 | 0 | 0 | 10 | 1 | 0 | 1 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
323,547 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/exceptions.py | csp_gateway.utils.exceptions.NoProviderException | class NoProviderException(GatewayException):
... | class NoProviderException(GatewayException):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 1 | 0 | 1 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
323,548 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/exceptions.py | csp_gateway.utils.exceptions.ServerException | class ServerException(GatewayException):
... | class ServerException(GatewayException):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 4 | 0 | 0 | 0 | 10 | 1 | 0 | 1 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
323,549 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/exceptions.py | csp_gateway.utils.exceptions.ServerRouteNotFoundException | class ServerRouteNotFoundException(ServerException):
... | class ServerRouteNotFoundException(ServerException):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 1 | 0 | 1 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
323,550 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/exceptions.py | csp_gateway.utils.exceptions.ServerRouteNotMountedException | class ServerRouteNotMountedException(ServerException):
... | class ServerRouteNotMountedException(ServerException):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 1 | 0 | 1 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
323,551 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/exceptions.py | csp_gateway.utils.exceptions.ServerUnknownException | class ServerUnknownException(ServerException):
... | class ServerUnknownException(ServerException):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 1 | 0 | 1 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
323,552 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/exceptions.py | csp_gateway.utils.exceptions.ServerUnprocessableException | class ServerUnprocessableException(ServerException):
... | class ServerUnprocessableException(ServerException):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 1 | 0 | 1 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
323,553 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/exceptions.py | csp_gateway.utils.exceptions._Controls | class _Controls(GatewayException):
def __init__(self, control: str):
super().__init__('Control: {}'.format(control)) | class _Controls(GatewayException):
def __init__(self, control: str):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 11 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 4 | 0 | 1 |
323,554 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/picklable_queue.py | csp_gateway.utils.picklable_queue.PickleableQueue | from queue import Queue
class PickleableQueue(Queue):
"""
An extension of the base Queue to allow it to be pickled
NOTE: Pickled queues will not retain the contents of their queues
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def __getstate__(self):
... |
class PickleableQueue(Queue):
'''
An extension of the base Queue to allow it to be pickled
NOTE: Pickled queues will not retain the contents of their queues
'''
def __init__(self, *args, **kwargs):
pass
def __getstate__(self):
pass
def __setstate__(self, state):
p... | 4 | 1 | 2 | 0 | 2 | 0 | 1 | 0.57 | 1 | 1 | 0 | 0 | 3 | 0 | 3 | 17 | 15 | 4 | 7 | 4 | 3 | 4 | 7 | 4 | 3 | 1 | 1 | 0 | 3 |
323,555 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/struct/base.py | csp_gateway.utils.struct.base.GatewayStruct | from csp import Struct
from pydantic_core import CoreConfig, core_schema
from pydantic import ValidationInfo
import csp
from datetime import datetime, timezone
from .psp import PerspectiveUtilityMixin
from typing import Any, Dict
class GatewayStruct(PerspectiveUtilityMixin, Struct, metaclass=PydanticizedCspStruct):
... |
class GatewayStruct(PerspectiveUtilityMixin, Struct, metaclass=PydanticizedCspStruct):
'''Sub-class of csp.Struct specifically designed for usage with csp-gateway.
These classes inherit from csp.Struct, but each one also contains a pydantic model
as an attribute that mirrors the underlying struct class.
... | 12 | 2 | 11 | 1 | 6 | 4 | 2 | 0.78 | 3 | 9 | 0 | 3 | 1 | 0 | 6 | 11 | 93 | 13 | 45 | 20 | 32 | 35 | 38 | 15 | 30 | 4 | 2 | 2 | 13 |
323,556 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/struct/base.py | csp_gateway.utils.struct.base.PydanticizedCspStruct | from ..id_generator import get_counter
from csp.impl.struct import StructMeta
from types import MappingProxyType
from typing import Any, Dict
class PydanticizedCspStruct(StructMeta):
"""A subclass of StructMeta from csp, this class adds additional properties onto csp.Struct classes to link them into the Gateway fo... |
class PydanticizedCspStruct(StructMeta):
'''A subclass of StructMeta from csp, this class adds additional properties onto csp.Struct classes to link them into the Gateway format.
Specifically, allows lookups and automatic id generation.
'''
def __init__(cls: Any, name: str, bases: Any, attr_dict: Any)... | 4 | 1 | 6 | 1 | 3 | 1 | 1 | 0.64 | 1 | 3 | 0 | 1 | 3 | 0 | 3 | 3 | 25 | 7 | 11 | 4 | 7 | 7 | 11 | 4 | 7 | 1 | 1 | 0 | 3 |
323,557 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/struct/psp.py | csp_gateway.utils.struct.psp.PerspectiveUtilityMixin | import _thread
import orjson
from csp import Enum, Struct
from enum import Enum as PyEnum
from numpy import ndarray
from typing import Any, Callable, Dict, GenericAlias, List, Optional, Set, Tuple, Union, _GenericAlias, get_args, get_origin
class PerspectiveUtilityMixin:
def psp_flatten(self, custom_jsonifier: Op... |
class PerspectiveUtilityMixin:
def psp_flatten(self, custom_jsonifier: Optional[CustomJsonifier]=None) -> List[Dict[str, Any]]:
pass
def _callback(obj):
'''Callback helper that either calls custom_jsonifier or a default set of conversions'''
pass
@classmethod
... | 5 | 2 | 14 | 1 | 11 | 2 | 3 | 0.23 | 0 | 5 | 0 | 1 | 1 | 0 | 2 | 2 | 30 | 3 | 22 | 7 | 17 | 5 | 17 | 6 | 13 | 6 | 0 | 1 | 8 |
323,558 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/web/controls.py | csp_gateway.utils.web.controls.Controls | import orjson
from ..struct import GatewayStruct
from typing_extensions import override
import threading
class Controls(GatewayStruct):
name: str = 'none'
status: str = 'none'
data: dict = {}
data_str: str = ''
_lock: object
def lock(self, blocking=True, timeout=-1):
if not hasattr(sel... |
class Controls(GatewayStruct):
def lock(self, blocking=True, timeout=-1):
pass
def unlock(self):
pass
def update_str(self):
pass
@override
def psp_flatten(self, custom_jsonifier=None):
pass | 6 | 0 | 6 | 0 | 5 | 2 | 2 | 0.32 | 1 | 1 | 0 | 0 | 4 | 0 | 4 | 15 | 38 | 5 | 25 | 11 | 19 | 8 | 24 | 10 | 19 | 3 | 3 | 1 | 8 |
323,559 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/web/filter.py | csp_gateway.utils.web.filter.Filter | from pydantic import BaseModel, Field
from enum import Enum as PyEnum
class Filter(BaseModel):
attr: str = ''
by: FilterCondition
def calculate(self, obj) -> bool:
"""
calculate the filter condition on the object
returns `True` if SHOULD NOT BE FILTERED, else `False`
"""
... |
class Filter(BaseModel):
def calculate(self, obj) -> bool:
'''
calculate the filter condition on the object
returns `True` if SHOULD NOT BE FILTERED, else `False`
'''
pass | 2 | 1 | 26 | 2 | 17 | 7 | 6 | 0.35 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 83 | 30 | 3 | 20 | 5 | 18 | 7 | 20 | 4 | 18 | 6 | 5 | 3 | 6 |
323,560 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/web/filter.py | csp_gateway.utils.web.filter.FilterCondition | from datetime import datetime
from pydantic import BaseModel, Field
from typing import Literal, Optional, Union
class FilterCondition(BaseModel):
value: Optional[Union[float, int, str]] = Field(None)
when: Optional[datetime] = Field(None)
attr: str = ''
where: FilterWhere = '==' |
class FilterCondition(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 8 | 0 | 5 | 5 | 4 | 3 | 5 | 5 | 4 | 0 | 5 | 0 | 0 |
323,561 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/csp_gateway/utils/web/query.py | csp_gateway.utils.web.query.Query | from .filter import Filter
from typing import List
from pydantic import BaseModel
class Query(BaseModel):
filters: List[Filter] = []
def calculate(self, objs):
"""calculate and filter down objs by filters"""
log.info(f'Querying {len(objs)} with query: {self}')
return [o for o in objs i... |
class Query(BaseModel):
def calculate(self, objs):
'''calculate and filter down objs by filters'''
pass | 2 | 1 | 4 | 0 | 3 | 1 | 1 | 0.2 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 83 | 7 | 1 | 5 | 4 | 3 | 1 | 5 | 3 | 3 | 1 | 5 | 0 | 1 |
323,562 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/filedrop_example.py | filedrop_example.GWC | from typing import Any, Dict, List, Optional
import csp
from csp_gateway import AddChannelsToGraphOutput, FileDropType, Gateway, GatewayChannels, GatewayModule, GatewayStruct, ReadFileDrop, ReadFileDropConfiguration
class GWC(GatewayChannels):
data: csp.ts[MyStruct] = None
list_data: csp.ts[List[MyStruct]] = N... |
class GWC(GatewayChannels):
def dynamic_keys(self) -> Optional[Dict[str, List[Any]]]:
'''Define dynamic dictionary keys by field, driven by data from the channels.'''
pass | 2 | 1 | 6 | 0 | 5 | 1 | 1 | 0.11 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 1 | 11 | 1 | 9 | 6 | 7 | 1 | 7 | 6 | 5 | 1 | 1 | 0 | 1 |
323,563 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/filedrop_example.py | filedrop_example.MyStruct | from csp_gateway import AddChannelsToGraphOutput, FileDropType, Gateway, GatewayChannels, GatewayModule, GatewayStruct, ReadFileDrop, ReadFileDropConfiguration
class MyStruct(GatewayStruct):
foo: str |
class MyStruct(GatewayStruct):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
323,564 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/filedrop_example.py | filedrop_example.MySubStruct | from csp_gateway import AddChannelsToGraphOutput, FileDropType, Gateway, GatewayChannels, GatewayModule, GatewayStruct, ReadFileDrop, ReadFileDropConfiguration
class MySubStruct(GatewayStruct):
foo: str |
class MySubStruct(GatewayStruct):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
323,565 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/filedrop_example.py | filedrop_example.PrintModule | from csp_gateway import AddChannelsToGraphOutput, FileDropType, Gateway, GatewayChannels, GatewayModule, GatewayStruct, ReadFileDrop, ReadFileDropConfiguration
import csp
class PrintModule(GatewayModule):
def connect(self, channels):
data = channels.get_channel(GWC.data)
csp.print('Data', data)
... |
class PrintModule(GatewayModule):
def connect(self, channels):
pass | 2 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 8 | 0 | 8 | 5 | 6 | 0 | 8 | 5 | 6 | 1 | 1 | 0 | 1 |
323,566 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/kafka_example.py | kafka_example.GWC | from csp_gateway import AddChannelsToGraphOutput, Gateway, GatewayChannels, GatewayModule, GatewayStruct, KafkaConfiguration, ReadWriteKafka
import csp
class GWC(GatewayChannels):
my_proclamation: csp.ts[MyStruct] = None |
class GWC(GatewayChannels):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 1 | 0 | 0 |
323,567 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/kafka_example.py | kafka_example.MyCallToTheWorld | from csp_gateway import AddChannelsToGraphOutput, Gateway, GatewayChannels, GatewayModule, GatewayStruct, KafkaConfiguration, ReadWriteKafka
import csp
class MyCallToTheWorld(GatewayModule):
my_data: csp.ts[MyStruct]
def connect(self, channels: GWC):
channels.set_channel(GWC.my_proclamation, self.my_d... |
class MyCallToTheWorld(GatewayModule):
def connect(self, channels: GWC):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 2 | 2 | 0 | 4 | 2 | 2 | 1 | 1 | 0 | 1 |
323,568 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/kafka_example.py | kafka_example.MyStruct | from csp_gateway import AddChannelsToGraphOutput, Gateway, GatewayChannels, GatewayModule, GatewayStruct, KafkaConfiguration, ReadWriteKafka
class MyStruct(GatewayStruct):
foo: str |
class MyStruct(GatewayStruct):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
323,569 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/multiprocessing_example.py | multiprocessing_example.MyComputedStruct | from csp_gateway import Gateway, GatewayChannels, GatewayModule, GatewayStruct
class MyComputedStruct(GatewayStruct):
x: int |
class MyComputedStruct(GatewayStruct):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
323,570 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/multiprocessing_example.py | multiprocessing_example.MyGatewayChannel | from csp import ts
from csp_gateway import Gateway, GatewayChannels, GatewayModule, GatewayStruct
class MyGatewayChannel(GatewayChannels):
input_data: ts[MyInputStruct] = None
computed_data: ts[MyComputedStruct] = None |
class MyGatewayChannel(GatewayChannels):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 3 | 2 | 0 | 3 | 3 | 2 | 0 | 1 | 0 | 0 |
323,571 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/multiprocessing_example.py | multiprocessing_example.MyInputModule | import csp
from csp_gateway import Gateway, GatewayChannels, GatewayModule, GatewayStruct
import numpy as np
from csp import ts
from datetime import datetime, timedelta, timezone
class MyInputModule(GatewayModule):
"""Module for generating random inputs."""
def connect(self, channels: MyGatewayChannel):
... |
class MyInputModule(GatewayModule):
'''Module for generating random inputs.'''
def connect(self, channels: MyGatewayChannel):
pass
@staticmethod
@csp.node
def _generate_random_inputs(trigger: ts[bool]) -> csp.Outputs(ts[MyInputStruct]):
pass | 5 | 1 | 4 | 0 | 4 | 0 | 2 | 0.1 | 1 | 5 | 2 | 0 | 1 | 0 | 2 | 2 | 13 | 2 | 10 | 6 | 5 | 1 | 8 | 5 | 5 | 2 | 1 | 1 | 3 |
323,572 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/multiprocessing_example.py | multiprocessing_example.MyInputStruct | from csp_gateway import Gateway, GatewayChannels, GatewayModule, GatewayStruct
class MyInputStruct(GatewayStruct):
x: int |
class MyInputStruct(GatewayStruct):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
323,573 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/multiprocessing_example.py | multiprocessing_example.MyMultiProcessingModule | import logging
import csp
from multiprocessing import Process, Queue
from pydantic import Field
from csp import ts
from csp_gateway import Gateway, GatewayChannels, GatewayModule, GatewayStruct
from ccflow import Frequency
class MyMultiProcessingModule(GatewayModule):
"""Module for applying some very expensive fun... |
class MyMultiProcessingModule(GatewayModule):
'''Module for applying some very expensive function in a sub-process.'''
def connect(self, channels: MyGatewayChannel):
pass
@staticmethod
@csp.node
def _process_monitor(x: ts[MyInputStruct], drain_queue: ts[bool], input_queue: object, output_q... | 5 | 1 | 18 | 3 | 13 | 3 | 4 | 0.23 | 1 | 5 | 3 | 0 | 1 | 0 | 2 | 2 | 44 | 9 | 30 | 14 | 23 | 7 | 26 | 11 | 23 | 6 | 1 | 2 | 7 |
323,574 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/panel_example.py | panel_example.ExampleData | from csp_gateway import Gateway, GatewayChannels, GatewayModule, GatewayStruct, get_thread
class ExampleData(GatewayStruct):
x: float
y: float
z: float |
class ExampleData(GatewayStruct):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 1 | 0 | 0 |
323,575 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/panel_example.py | panel_example.ExampleDataModule | from csp import ts
import csp
from datetime import timedelta
import numpy as np
from csp_gateway import Gateway, GatewayChannels, GatewayModule, GatewayStruct, get_thread
class ExampleDataModule(GatewayModule):
"""Example data module to generate random data to plot."""
def connect(self, channels: ExampleGatew... |
class ExampleDataModule(GatewayModule):
'''Example data module to generate random data to plot.'''
def connect(self, channels: ExampleGatewayChannel) -> None:
pass
@staticmethod
@csp.node
def _generate_data(trigger: ts[bool]) -> csp.Outputs(ts[ExampleData]):
pass | 5 | 1 | 8 | 1 | 8 | 0 | 2 | 0.06 | 1 | 4 | 2 | 0 | 1 | 0 | 2 | 2 | 22 | 3 | 18 | 8 | 13 | 1 | 12 | 7 | 9 | 2 | 1 | 1 | 3 |
323,576 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/panel_example.py | panel_example.ExampleGatewayChannel | from csp import ts
from csp_gateway import Gateway, GatewayChannels, GatewayModule, GatewayStruct, get_thread
class ExampleGatewayChannel(GatewayChannels):
data: ts[ExampleData] = None |
class ExampleGatewayChannel(GatewayChannels):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 1 | 0 | 0 |
323,577 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/panel_example.py | panel_example.ExamplePanelApp | from csp_gateway import Gateway, GatewayChannels, GatewayModule, GatewayStruct, get_thread
import plotly.graph_objects as go
from typing import Any, Dict, Optional
from pydantic import Field, PrivateAttr
from queue import Queue
from ccflow import BaseModel
import panel as pn
import pandas as pd
class ExamplePanelApp(B... |
class ExamplePanelApp(BaseModel):
'''Class representing our example panel app. it will plot a timeseries of ExampleData using Plotly. This is a
ccflow BaseModel. This means it is configurable via YAML.'''
def _create_panel(self):
pass
def accumulate_data(self, timestamp, data) -> None:
... | 5 | 4 | 10 | 1 | 7 | 3 | 2 | 0.39 | 1 | 1 | 0 | 0 | 4 | 0 | 4 | 4 | 55 | 10 | 33 | 14 | 28 | 13 | 26 | 14 | 21 | 3 | 1 | 2 | 6 |
323,578 | Point72/csp-gateway | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Point72_csp-gateway/examples/panel_example.py | panel_example.ExamplePanelModule | from csp import ts
from csp_gateway import Gateway, GatewayChannels, GatewayModule, GatewayStruct, get_thread
import csp
class ExamplePanelModule(GatewayModule):
"""Example module that visualizes the data channel in Panel."""
app: ExamplePanelApp
@csp.node
def _send_data_to_panel(self, data: ts[Exampl... |
class ExamplePanelModule(GatewayModule):
'''Example module that visualizes the data channel in Panel.'''
@csp.node
def _send_data_to_panel(self, data: ts[ExampleData]):
pass
def connect(self, channels: ExampleGatewayChannel) -> None:
pass | 4 | 1 | 4 | 0 | 4 | 0 | 2 | 0.09 | 1 | 2 | 2 | 0 | 2 | 0 | 2 | 2 | 15 | 3 | 11 | 6 | 7 | 1 | 10 | 5 | 7 | 2 | 1 | 1 | 3 |
323,579 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/bulk_operations_wizard.py | bulk_operations_wizard.BulkOperationConfig | from typing import Any, Callable, Dict, List, Optional
from dataclasses import dataclass, field
@dataclass
class BulkOperationConfig:
"""Configuration for a bulk operation"""
operation_type: BulkOperationType
dry_run: bool = True
batch_size: int = 10
delay_between_batches: float = 1.0
create_ba... | @dataclass
class BulkOperationConfig:
'''Configuration for a bulk operation'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.13 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 1 | 8 | 7 | 7 | 1 | 8 | 7 | 7 | 0 | 0 | 0 | 0 |
323,580 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/bulk_operations_wizard.py | bulk_operations_wizard.BulkOperationPreview | from typing import Any, Callable, Dict, List, Optional
from dataclasses import dataclass, field
@dataclass
class BulkOperationPreview:
"""Preview of changes that will be made"""
affected_items: List[Dict[str, Any]]
total_count: int
changes_summary: Dict[str, Any]
estimated_duration: float
warni... | @dataclass
class BulkOperationPreview:
'''Preview of changes that will be made'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.14 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 1 | 7 | 3 | 6 | 1 | 7 | 3 | 6 | 0 | 0 | 0 | 0 |
323,581 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/bulk_operations_wizard.py | bulk_operations_wizard.BulkOperationType | from enum import Enum
class BulkOperationType(Enum):
"""Supported bulk operation types"""
SCHEMA_UPDATE = 'schema_update'
MIGRATION = 'migration'
CLEANUP = 'cleanup'
CONFIGURATION = 'configuration' |
class BulkOperationType(Enum):
'''Supported bulk operation types'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 7 | 1 | 5 | 5 | 4 | 1 | 5 | 5 | 4 | 0 | 4 | 0 | 0 |
323,582 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/bulk_operations_wizard.py | bulk_operations_wizard.BulkOperationsWizard | import json
from datetime import datetime
from elicitation import ElicitationField, ElicitationManager, ElicitationRequest, ElicitationType
from task_management import AsyncTaskManager
from typing import Any, Callable, Dict, List, Optional
import asyncio
class BulkOperationsWizard:
"""
Interactive wizard for b... |
class BulkOperationsWizard:
'''
Interactive wizard for bulk operations on Schema Registry
'''
def __init__(self, registry_manager, elicitation_manager: ElicitationManager, task_manager: AsyncTaskManager, batch_operations):
pass
def _register_handlers(self) -> Dict[BulkOperationType, Calla... | 26 | 25 | 27 | 3 | 21 | 5 | 2 | 0.24 | 0 | 17 | 7 | 0 | 25 | 5 | 25 | 25 | 714 | 99 | 516 | 115 | 474 | 126 | 191 | 98 | 165 | 7 | 0 | 4 | 59 |
323,583 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/demo/client-example.py | client-example.MCPLlamaClient | import httpx
class MCPLlamaClient:
def __init__(self, bridge_url: str='http://localhost:8080'):
self.bridge_url = bridge_url
async def health_check(self) -> dict:
"""Check if the bridge service is healthy"""
async with httpx.AsyncClient() as client:
response = await client... |
class MCPLlamaClient:
def __init__(self, bridge_url: str='http://localhost:8080'):
pass
async def health_check(self) -> dict:
'''Check if the bridge service is healthy'''
pass
async def chat(self, message: str, model: str='llama3.2:3b', use_mcp: bool=True) -> dict:
'''Sen... | 6 | 4 | 17 | 3 | 14 | 1 | 2 | 0.06 | 0 | 5 | 0 | 0 | 5 | 1 | 5 | 5 | 92 | 19 | 69 | 14 | 63 | 4 | 41 | 11 | 35 | 8 | 0 | 3 | 12 |
323,584 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/elicitation.py | elicitation.ElicitationField | from typing import Any, Dict, List, Optional
from dataclasses import dataclass, field
@dataclass
class ElicitationField:
"""Represents a single field in an elicitation request."""
name: str
type: str
label: Optional[str] = None
description: Optional[str] = None
required: bool = True
default... | @dataclass
class ElicitationField:
'''Represents a single field in an elicitation request.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 12 | 1 | 10 | 8 | 9 | 1 | 10 | 8 | 9 | 0 | 0 | 0 | 0 |
323,585 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/elicitation.py | elicitation.ElicitationManager | import asyncio
from datetime import datetime, timedelta, timezone
from typing import Any, Dict, List, Optional
class ElicitationManager:
"""Manages elicitation requests and responses."""
def __init__(self):
self.pending_requests: Dict[str, ElicitationRequest] = {}
self.responses: Dict[str, Eli... |
class ElicitationManager:
'''Manages elicitation requests and responses.'''
def __init__(self):
pass
async def create_request(self, request: ElicitationRequest) -> str:
'''Create a new elicitation request.'''
pass
async def submit_response(self, response: ElicitationResponse)... | 13 | 12 | 12 | 2 | 8 | 2 | 3 | 0.31 | 0 | 12 | 2 | 2 | 12 | 3 | 12 | 12 | 153 | 32 | 93 | 27 | 78 | 29 | 88 | 24 | 75 | 6 | 0 | 3 | 30 |
323,586 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/elicitation.py | elicitation.ElicitationPriority | from enum import Enum
class ElicitationPriority(Enum):
"""Priority levels for elicitation requests."""
HIGH = 'high'
MEDIUM = 'medium'
LOW = 'low' |
class ElicitationPriority(Enum):
'''Priority levels for elicitation requests.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 6 | 1 | 4 | 4 | 3 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
323,587 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/elicitation.py | elicitation.ElicitationRequest | from uuid import uuid4
from typing import Any, Dict, List, Optional
from datetime import datetime, timedelta, timezone
from dataclasses import dataclass, field
@dataclass
class ElicitationRequest:
"""Represents an elicitation request to the user."""
id: str = field(default_factory=lambda: str(uuid4()))
typ... | @dataclass
class ElicitationRequest:
'''Represents an elicitation request to the user.'''
def __post_init__(self):
'''Calculate expiration time if not set.'''
pass
def to_dict(self) -> Dict[str, Any]:
'''Convert to dictionary for MCP protocol.'''
pass
def is_expired(se... | 5 | 4 | 12 | 0 | 11 | 1 | 2 | 0.11 | 0 | 6 | 0 | 0 | 3 | 0 | 3 | 3 | 54 | 4 | 46 | 14 | 42 | 5 | 21 | 14 | 17 | 2 | 0 | 1 | 6 |
323,588 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/elicitation.py | elicitation.ElicitationResponse | from datetime import datetime, timedelta, timezone
from typing import Any, Dict, List, Optional
from dataclasses import dataclass, field
@dataclass
class ElicitationResponse:
"""Represents a user's response to an elicitation request."""
request_id: str
values: Dict[str, Any]
timestamp: datetime = field... | @dataclass
class ElicitationResponse:
'''Represents a user's response to an elicitation request.'''
def to_dict(self) -> Dict[str, Any]:
'''Convert to dictionary.'''
pass | 3 | 2 | 9 | 0 | 8 | 1 | 1 | 0.14 | 0 | 4 | 0 | 0 | 1 | 0 | 1 | 1 | 18 | 2 | 14 | 5 | 12 | 2 | 8 | 5 | 6 | 1 | 0 | 0 | 1 |
323,589 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/elicitation.py | elicitation.ElicitationType | from enum import Enum
class ElicitationType(Enum):
"""Types of elicitation requests supported."""
TEXT = 'text'
CHOICE = 'choice'
CONFIRMATION = 'confirmation'
FORM = 'form'
MULTI_FIELD = 'multi_field' |
class ElicitationType(Enum):
'''Types of elicitation requests supported.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.17 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 8 | 1 | 6 | 6 | 5 | 1 | 6 | 6 | 5 | 0 | 4 | 0 | 0 |
323,590 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/examples/elicitation_demo.py | elicitation_demo.ElicitationDemo | from typing import Any, Dict
import json
from datetime import datetime
class ElicitationDemo:
"""Demo class showing elicitation capabilities."""
def __init__(self):
self.demo_results = []
async def run_all_demos(self):
"""Run all elicitation demos."""
print('\n🎭 Kafka Schema Regi... |
class ElicitationDemo:
'''Demo class showing elicitation capabilities.'''
def __init__(self):
pass
async def run_all_demos(self):
'''Run all elicitation demos.'''
pass
async def demo_schema_registration(self) -> Dict[str, Any]:
'''Demo interactive schema registration.... | 11 | 10 | 44 | 6 | 36 | 3 | 3 | 0.07 | 0 | 9 | 0 | 0 | 10 | 1 | 10 | 10 | 449 | 67 | 357 | 47 | 346 | 26 | 162 | 45 | 151 | 11 | 0 | 4 | 31 |
323,591 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/elicitation_enhancements.py | elicitation_enhancements.ElicitationCache | from elicitation import ElicitationField, ElicitationManager, ElicitationRequest, ElicitationResponse
from typing import Any, Dict, List, Optional
class ElicitationCache:
"""Cache for commonly used elicitation patterns."""
def __init__(self, max_size: int=100):
self.cache = {}
self.max_size = ... |
class ElicitationCache:
'''Cache for commonly used elicitation patterns.'''
def __init__(self, max_size: int=100):
pass
def get_cached_response(self, request_signature: str) -> Optional[Dict[str, Any]]:
'''Get cached response for similar requests.'''
pass
def cache_response(s... | 5 | 4 | 7 | 0 | 5 | 2 | 2 | 0.35 | 0 | 4 | 1 | 0 | 4 | 3 | 4 | 4 | 32 | 5 | 20 | 10 | 15 | 7 | 20 | 10 | 15 | 2 | 0 | 1 | 6 |
323,592 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/elicitation_enhancements.py | elicitation_enhancements.EnhancedElicitationManager | from typing import Any, Dict, List, Optional
from elicitation import ElicitationField, ElicitationManager, ElicitationRequest, ElicitationResponse
from datetime import datetime, timedelta, timezone
import re
class EnhancedElicitationManager(ElicitationManager):
"""Enhanced elicitation manager with additional featu... |
class EnhancedElicitationManager(ElicitationManager):
'''Enhanced elicitation manager with additional features.'''
def __init__(self):
pass
async def submit_response(self, response: ElicitationResponse) -> bool:
'''Submit response with enhanced validation.'''
pass
def _valida... | 10 | 9 | 19 | 3 | 13 | 3 | 3 | 0.22 | 1 | 14 | 4 | 0 | 9 | 2 | 9 | 21 | 182 | 37 | 120 | 49 | 102 | 26 | 94 | 40 | 84 | 8 | 1 | 2 | 31 |
323,593 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/elicitation_enhancements.py | elicitation_enhancements.ValidationResult | from dataclasses import dataclass
from typing import Any, Dict, List, Optional
@dataclass
class ValidationResult:
"""Result of field validation."""
is_valid: bool
errors: List[str]
warnings: List[str] = None
def __post_init__(self):
if self.warnings is None:
self.warnings = [] | @dataclass
class ValidationResult:
'''Result of field validation.'''
def __post_init__(self):
pass | 3 | 1 | 3 | 0 | 3 | 0 | 2 | 0.14 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 10 | 2 | 7 | 3 | 5 | 1 | 7 | 3 | 5 | 2 | 0 | 1 | 2 |
323,594 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/examples/enhanced_task_demo.py | enhanced_task_demo.MockContext | from typing import Any, Optional, cast
from dataclasses import dataclass
@dataclass
class MockContext:
"""Mock MCP Context for testing without a full MCP server."""
progress_token: Optional[str] = 'test-progress-token'
class Meta:
progressToken = 'test-progress-token'
class RequestContext:
... | @dataclass
class MockContext:
'''Mock MCP Context for testing without a full MCP server.'''
class Meta:
class RequestContext:
def __init__(self):
pass
def __post_init__(self):
pass
async def report_progress(self, progress: float, total: float, message: Optional[s... | 11 | 1 | 2 | 0 | 2 | 0 | 1 | 0.05 | 0 | 3 | 1 | 0 | 6 | 1 | 6 | 6 | 30 | 9 | 20 | 15 | 10 | 1 | 20 | 15 | 10 | 1 | 0 | 0 | 7 |
323,595 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/kafka_schema_registry_unified_mcp.py | kafka_schema_registry_unified_mcp.LocalSchemaHandler | import urllib.request
import urllib.error
import json
from io import BytesIO
class LocalSchemaHandler(urllib.request.BaseHandler):
"""Custom handler to serve JSON Schema meta-schemas locally."""
def http_open(self, req):
return self.handle_schema_request(req)
def https_open(self, req):
re... |
class LocalSchemaHandler(urllib.request.BaseHandler):
'''Custom handler to serve JSON Schema meta-schemas locally.'''
def http_open(self, req):
pass
def https_open(self, req):
pass
def handle_schema_request(self, req):
pass | 4 | 1 | 11 | 1 | 8 | 2 | 1 | 0.28 | 1 | 1 | 0 | 0 | 3 | 0 | 3 | 6 | 37 | 7 | 25 | 8 | 20 | 7 | 13 | 8 | 8 | 2 | 1 | 1 | 4 |
323,596 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/kafka_schema_registry_unified_mcp.py | kafka_schema_registry_unified_mcp.SecureHeaderDict | import os
import base64
class SecureHeaderDict(dict):
"""Dictionary-like class that generates fresh headers with credentials on each access."""
def __init__(self, content_type: str='application/vnd.schemaregistry.v1+json'):
super().__init__()
self.content_type = content_type
self._upda... |
class SecureHeaderDict(dict):
'''Dictionary-like class that generates fresh headers with credentials on each access.'''
def __init__(self, content_type: str='application/vnd.schemaregistry.v1+json'):
pass
def _update_headers(self):
'''Update headers with fresh credentials.'''
pass... | 8 | 2 | 4 | 0 | 4 | 1 | 1 | 0.29 | 1 | 2 | 0 | 0 | 7 | 1 | 7 | 34 | 38 | 7 | 28 | 12 | 20 | 8 | 28 | 12 | 20 | 2 | 2 | 1 | 8 |
323,597 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/migration_tools.py | migration_tools.IDPreservationError | class IDPreservationError(Exception):
"""Exception raised when ID preservation fails and requires user confirmation."""
def __init__(self, message: str, reason: str, original_error: str=None):
super().__init__(message)
self.reason = reason
self.original_error = original_error | class IDPreservationError(Exception):
'''Exception raised when ID preservation fails and requires user confirmation.'''
def __init__(self, message: str, reason: str, original_error: str=None):
pass | 2 | 1 | 4 | 0 | 4 | 0 | 1 | 0.2 | 1 | 2 | 0 | 0 | 1 | 2 | 1 | 11 | 7 | 1 | 5 | 4 | 3 | 1 | 5 | 4 | 3 | 1 | 3 | 0 | 1 |
323,598 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/migration_tools.py | migration_tools.MigrationConfirmationRequired | from typing import Any, Dict, List, Optional
class MigrationConfirmationRequired(Exception):
"""Exception raised when migration requires user confirmation to proceed."""
def __init__(self, message: str, confirmation_details: Dict[str, Any]):
super().__init__(message)
self.confirmation_details ... |
class MigrationConfirmationRequired(Exception):
'''Exception raised when migration requires user confirmation to proceed.'''
def __init__(self, message: str, confirmation_details: Dict[str, Any]):
pass | 2 | 1 | 3 | 0 | 3 | 0 | 1 | 0.25 | 1 | 3 | 0 | 0 | 1 | 1 | 1 | 11 | 6 | 1 | 4 | 3 | 2 | 1 | 4 | 3 | 2 | 1 | 3 | 0 | 1 |
323,599 | aywengo/kafka-schema-reg-mcp | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/multi_step_elicitation.py | multi_step_elicitation.MultiStepElicitationManager | from typing import Any, Callable, Dict, List, Optional, Union
from elicitation import ElicitationField, ElicitationManager, ElicitationRequest, ElicitationResponse, ElicitationType
from datetime import datetime, timezone
from uuid import uuid4
class MultiStepElicitationManager:
"""Manages multi-step elicitation wo... |
class MultiStepElicitationManager:
'''Manages multi-step elicitation workflows.'''
def __init__(self, elicitation_manager: ElicitationManager):
pass
def register_workflow(self, workflow: MultiStepWorkflow):
'''Register a workflow definition.'''
pass
async def start_workflow(s... | 9 | 8 | 23 | 3 | 17 | 4 | 3 | 0.21 | 0 | 12 | 7 | 0 | 8 | 4 | 8 | 8 | 194 | 29 | 137 | 39 | 122 | 29 | 86 | 33 | 77 | 10 | 0 | 3 | 23 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.