Skip to content

Commit

Permalink
Neat 45 missing properties in info architect sheet (#288)
Browse files Browse the repository at this point in the history
* update/pretify info rules

* update/pretify info rules

* added rules2ontology

* enable exporters

* final msg

* changed matchtype to match for info rules

* changed to match type for info rules

* refactor: setup CDF exporter

* refactor; renaming

* refactor: add type hint

---------

Co-authored-by: anders-albert <anders0albert@gmail.com>
  • Loading branch information
nikokaoja and doctrino authored Mar 2, 2024
1 parent 7b4b129 commit 5560b43
Show file tree
Hide file tree
Showing 9 changed files with 763 additions and 9 deletions.
2 changes: 2 additions & 0 deletions cognite/neat/rules/exporters/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def export_to_file(self, filepath: Path) -> None:
def export(self) -> T_Export:
raise NotImplementedError


class CDFExporter(ABC, Generic[T_Export]):
@abstractmethod
def export_to_cdf(self, client: CogniteClient, dry_run: bool = False) -> Iterable[UploadResult]:
raise NotImplementedError
4 changes: 2 additions & 2 deletions cognite/neat/rules/exporters/_rules2dms.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
from cognite.neat.rules.models._rules.dms_schema import DMSSchema
from cognite.neat.utils.cdf_loaders import ContainerLoader, DataModelingLoader, DataModelLoader, SpaceLoader, ViewLoader

from ._base import BaseExporter
from ._base import CDFExporter
from ._models import UploadResult


class DMSExporter(BaseExporter[DMSSchema]):
class DMSExporter(CDFExporter[DMSSchema]):
"""Class for exporting rules object to CDF Data Model Storage (DMS).
Args:
Expand Down
Loading

0 comments on commit 5560b43

Please sign in to comment.