Coverage for kgi / base.py: 100%
4 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-23 08:53 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-23 08:53 +0000
1# SPDX-FileCopyrightText: 2026 Arcangelo Massari <arcangelo.massari@unibo.it>
2#
3# SPDX-License-Identifier: ISC
5from __future__ import annotations
7from abc import ABC, abstractmethod
8from typing import TYPE_CHECKING
10import pandas as pd
12if TYPE_CHECKING: # pragma: no cover
13 from .utils import Codex, IdGenerator
16class Endpoint(ABC): # pragma: no cover
18 @abstractmethod
19 def query(self, query: str):
20 raise NotImplementedError
23class Triple(ABC): # pragma: no cover
25 @abstractmethod
26 def generate(
27 self, id_generator: IdGenerator, codex: Codex, all_mapping_rules: pd.DataFrame
28 ) -> str | None:
29 raise NotImplementedError
32class Template(ABC): # pragma: no cover
34 @abstractmethod
35 def create_template(self) -> str:
36 raise NotImplementedError
38 @abstractmethod
39 def fill_data(self, data: pd.DataFrame, source_name: str) -> str:
40 raise NotImplementedError