67 lines
1.1 KiB
Python
67 lines
1.1 KiB
Python
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from dataclasses import dataclass, field
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass(frozen=True)
|
||
|
|
class Repository:
|
||
|
|
id: int
|
||
|
|
name: str
|
||
|
|
url: str
|
||
|
|
description: str | None
|
||
|
|
branch: str
|
||
|
|
status: str
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass(frozen=True)
|
||
|
|
class Evidence:
|
||
|
|
id: int
|
||
|
|
type: str
|
||
|
|
reference: str
|
||
|
|
strength: str
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass(frozen=True)
|
||
|
|
class Feature:
|
||
|
|
id: int
|
||
|
|
name: str
|
||
|
|
type: str
|
||
|
|
location: str
|
||
|
|
confidence: float
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass(frozen=True)
|
||
|
|
class Capability:
|
||
|
|
id: int
|
||
|
|
name: str
|
||
|
|
description: str
|
||
|
|
inputs: list[str]
|
||
|
|
outputs: list[str]
|
||
|
|
confidence: float
|
||
|
|
features: list[Feature] = field(default_factory=list)
|
||
|
|
evidence: list[Evidence] = field(default_factory=list)
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass(frozen=True)
|
||
|
|
class Ability:
|
||
|
|
id: int
|
||
|
|
name: str
|
||
|
|
description: str
|
||
|
|
confidence: float
|
||
|
|
capabilities: list[Capability] = field(default_factory=list)
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass(frozen=True)
|
||
|
|
class RepositoryAbilityMap:
|
||
|
|
repository: Repository
|
||
|
|
abilities: list[Ability]
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass(frozen=True)
|
||
|
|
class SearchResult:
|
||
|
|
repository_id: int
|
||
|
|
repository_name: str
|
||
|
|
match_type: str
|
||
|
|
match_name: str
|
||
|
|
confidence: float
|