-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NEAT-41] Export to CDF and Integration Test #283
Conversation
T_WritableCogniteResourceList = TypeVar("T_WritableCogniteResourceList", bound=WriteableCogniteResourceList) | ||
|
||
|
||
class ResourceLoader( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is steeling a concept from cdf-toolkit
. However, I thing it is equally useful for us to be able to tell the user results of dry runs and have a standardized interface towards cognite resources.
from dataclasses import dataclass, field | ||
from functools import total_ordering | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we call this module _models
? not really religious
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love it.
def delete(self, ids: SequenceNotStr[DataModelId]) -> list[DataModelId]: | ||
return self.client.data_modeling.data_models.delete(cast(Sequence, ids)) | ||
|
||
def are_equal(self, local: DataModelApply, remote: DataModel) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this local
and remote
. We should remebre to use same naming for Asset Loader.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is already there in the new AssetLoader implementation.
Overall got the DMS Export to DMS to work in the first iteration (still more validation to add). On the way I ran into multiple obstacles that resulted in the following.
DMSExporters.export_to_cdf
.