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

[discussion]: Split out properties generator/dataclasses into own package? #868

Open
lwjohnst86 opened this issue Nov 13, 2024 · 2 comments

Comments

@lwjohnst86
Copy link
Member

What would you like to discuss?

In line with the same reasoning as #867, I could imagine us and other developers wanting an easier/more well-documented connection between building data package compliant Python classes without needing/wanting to install all the other features of Sprout.

Same as with #867, reasons could be:

  1. Uncouple a core functionality of interacting with data package properties in Python from the main aim of Sprout.
  2. Showcase to the frictionless team another way of doing it, that auto-generates (mostly) from the official spec.
  3. Faster time to upload to PyPI.

Name could be datapackage2dataclass or something.

@martonvago
Copy link
Contributor

So would this package only include the *Properties classes? And would these be used only to help create metadata objects in Python?

If anyone else or an another Seedcase component wants to use these without the rest of Sprout, then sure! With the caveat that there is no guarantee that these classes will produce absolutely correct and complete metadata, as we only enforce a general structure, not all requirements in the Data Package standard. Also, we made some simplifications when writing/editing the classes (e.g. losing the option for inline data), which fit our use case, but if we wanted to release this into the wild on its own, then I assume these simplifications would need to go?

As for autogenerating it, I think that’s true to a rather qualified extent. I think the autogeneration code is okay for an in-house tool to give us a rough draft, but I would be a bit wary of actually including it as part of the package (but I’m not sure if you meant that).

@lwjohnst86
Copy link
Member Author

Thanks @martonvago, this package seems less likely/needed compared to #867 so I will move this out of this iteration (but not close it) and we can revisit it later.

@lwjohnst86 lwjohnst86 removed their assignment Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants