generated from coulomb/repo-seed
Milestone 6 API completeness
This commit is contained in:
@@ -168,3 +168,25 @@ class SearchResult:
|
||||
match_type: str
|
||||
match_name: str
|
||||
confidence: float
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class AbilitySummary:
|
||||
id: int
|
||||
repository_id: int
|
||||
repository_name: str
|
||||
name: str
|
||||
description: str
|
||||
confidence: float
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class CapabilitySummary:
|
||||
id: int
|
||||
repository_id: int
|
||||
repository_name: str
|
||||
ability_id: int
|
||||
ability_name: str
|
||||
name: str
|
||||
description: str
|
||||
confidence: float
|
||||
|
||||
@@ -3,7 +3,9 @@ from __future__ import annotations
|
||||
from collections.abc import Sequence
|
||||
|
||||
from repo_registry.core.models import (
|
||||
AbilitySummary,
|
||||
AnalysisRun,
|
||||
CapabilitySummary,
|
||||
CandidateGraph,
|
||||
ObservedFact,
|
||||
Repository,
|
||||
@@ -101,6 +103,15 @@ class RegistryService:
|
||||
def list_analysis_runs(self, repository_id: int) -> list[AnalysisRun]:
|
||||
return self.store.list_analysis_runs(repository_id)
|
||||
|
||||
def get_analysis_run(self, repository_id: int, analysis_run_id: int) -> AnalysisRun:
|
||||
return self.store.get_analysis_run(repository_id, analysis_run_id)
|
||||
|
||||
def list_abilities(self) -> list[AbilitySummary]:
|
||||
return self.store.list_abilities()
|
||||
|
||||
def list_capabilities(self) -> list[CapabilitySummary]:
|
||||
return self.store.list_capabilities()
|
||||
|
||||
def list_observed_facts(
|
||||
self,
|
||||
repository_id: int,
|
||||
|
||||
Reference in New Issue
Block a user