Skip to content

Commit

Permalink
rm demostore constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
ssssarah committed Oct 30, 2023
1 parent f789d43 commit 53f2b95
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
5 changes: 0 additions & 5 deletions kgforge/core/archetypes/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ def __repr__(self) -> str:
def __str__(self):
return self._normalize_rules(self.rules)

def __eq__(self, other: object) -> bool:
# FIXME To properly work the loading of rules should normalize them. DKE-184.
# return eq_class(self, other)
raise NotImplementedError

@classmethod
def load(cls, source: str, mapping_type: MappingType = None):
# source: Union[str, FilePath, URL].
Expand Down
6 changes: 6 additions & 0 deletions kgforge/specializations/mappings/dictionaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@

from kgforge.core.archetypes.mapping import Mapping
from kgforge.core.commons.attributes import sort_attrs
from kgforge.core.commons.execution import not_supported


class DictionaryMapping(Mapping):

def __eq__(self, other: object) -> bool:
# FIXME To properly work the loading of rules should normalize them. DKE-184.
# return eq_class(self, other)
raise not_supported()

@staticmethod
def _load_rules(mapping: str) -> OrderedDict:
return hjson.loads(mapping)
Expand Down
7 changes: 0 additions & 7 deletions kgforge/specializations/stores/demo_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@
class DemoStore(Store):
"""An example to show how to implement a Store and to demonstrate how it is used."""

def __init__(self, endpoint: Optional[str] = None, bucket: Optional[str] = None,
token: Optional[str] = None, versioned_id_template: Optional[str] = None,
file_resource_mapping: Optional[str] = None,
model_context: Optional[Context] = None) -> None:
super().__init__(endpoint, bucket, token, versioned_id_template, file_resource_mapping,
model_context)

@property
def mapping(self) -> Type[Mapping]:
"""Mapping class to load file_resource_mapping."""
Expand Down

0 comments on commit 53f2b95

Please sign in to comment.