-
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
Make metadata same accross roles #760
base: main
Are you sure you want to change the base?
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
@@ -37,6 +38,7 @@ | |||
) | |||
|
|||
|
|||
@pytest.mark.skip(reason="Skipping this test until refactoring of rules is completed") |
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.
Does this mean that we are in a non-releaseable state?
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.
Temporary file. Should not be committed. Suggest adding something like ~*.xlsx
to .gitignore
.
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.
Mostly clarification questions
@@ -125,6 +150,34 @@ class BaseMetadata(SchemaModel): | |||
""" | |||
|
|||
role: ClassVar[RoleTypes] | |||
aspect: ClassVar[DataModelAspect] | |||
space: SpaceType = Field(SchemaCompleteness.partial, alias="prefix") |
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.
Wrong default value?
|
||
@abstractmethod | ||
def get_prefix(self) -> str: |
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.
Lets remove this and replace it with .prefix. It is only used in one location
Unlike namespace, the identifier does not end with "/" or "#". | ||
""" | ||
return DEFAULT_NAMESPACE[f"data-model/verified/{self.aspect}/{self.space}/{self.external_id}/{self.version}"] |
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! Very good idea to have aspect as part of the unique identifier.
license: str | None = None | ||
rights: str | None = None | ||
physical: str | None = None | ||
conceptual: str | None = None |
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.
Is the thinking here to use these two fields to link the different input rules?
metadata["namespace"] = default | ||
def fix_space(metadata: dict, default: str = "neat") -> dict: | ||
if space := metadata.get("space", None): | ||
if not isinstance(space, str) or not PATTERNS.space_compliance.match(space): |
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.
A consequence now is that Information rules needs to use a prefix that is compliant with the regex for CDF space?
namespace
now automatically generated not anymore settable