Skip to content
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

Add custom metadata in organization #2921

Merged
merged 30 commits into from Feb 19, 2024
Merged

Add custom metadata in organization #2921

merged 30 commits into from Feb 19, 2024

Conversation

quaxsze
Copy link
Collaborator

@quaxsze quaxsze commented Nov 3, 2023

@quaxsze quaxsze changed the title Add custom metadata in organization WIP: Add custom metadata in organization Nov 3, 2023
@quaxsze quaxsze changed the title WIP: Add custom metadata in organization Add custom metadata in organization Nov 13, 2023
@quaxsze
Copy link
Collaborator Author

quaxsze commented Nov 14, 2023

Behavior precision:

  • The organization custom metadata dict can only have key in the following: ["title", "description", "type", "choices"].
  • The type value can only be one of those: ["str", "int", "float", "bool", "datetime", "date", "choice"]
  • The dataset custom metadata must have been defined in the dataset's organization and be of the right type
  • If the organization changes the type of a custom metada, it is not retroactive. Validation error will only occur on future modification of the dataset.
  • If the organization deletes a custom metada, it is not retroactive. Validation error will only occur on future modification of the dataset.

udata/core/organization/apiv2.py Show resolved Hide resolved

errors = {}

mandatory_keys = ["title", "description", "type"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we could be a bit more concise?

udata/core/organization/apiv2.py Outdated Show resolved Hide resolved
udata/core/dataset/apiv2.py Show resolved Hide resolved
udata/models/extras_fields.py Outdated Show resolved Hide resolved
udata/core/organization/models.py Show resolved Hide resolved
udata/core/dataset/models.py Show resolved Hide resolved
udata/core/dataset/models.py Show resolved Hide resolved
Copy link
Contributor

@maudetes maudetes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

CHANGELOG.md Outdated Show resolved Hide resolved
@quaxsze quaxsze merged commit 3883ad2 into master Feb 19, 2024
1 check passed
@quaxsze quaxsze deleted the CustomMetadata branch February 19, 2024 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

POC des métadonnées custom au niveau de l'orga
2 participants