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

Create BaseClass for all metacatalog models #276

Open
mmaelicke opened this issue Feb 14, 2023 · 1 comment
Open

Create BaseClass for all metacatalog models #276

mmaelicke opened this issue Feb 14, 2023 · 1 comment
Assignees
Labels
api Issue is affecting Python API discussion Needs discussion before labeling the issue enhancement New feature or request model This issue is affecting the database model priority low

Comments

@mmaelicke
Copy link
Member

We should create a Base class for all metacatalog models (inheriting from sqlalchemy.DeclarativeBase).
All models share the same declarative base anyway, so implementation should be straightforward. The idea is, that all models have a UUID, a to_dict method and a from_dict method.
@AlexDo1 any thoughts on this?

@mmaelicke mmaelicke added enhancement New feature or request api Issue is affecting Python API model This issue is affecting the database model discussion Needs discussion before labeling the issue labels Feb 14, 2023
@AlexDo1
Copy link
Collaborator

AlexDo1 commented Feb 14, 2023

I think that is a good idea as this would remove a lot of redundancy and would make the (basic) functionalities of metacatalog models more clear (especially the to_dict and from_dict methods).

@mmaelicke mmaelicke self-assigned this Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue is affecting Python API discussion Needs discussion before labeling the issue enhancement New feature or request model This issue is affecting the database model priority low
Projects
None yet
Development

No branches or pull requests

2 participants