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

Use dataclasses instead of tuples/dicts for passing data around #60

Open
snazzyfox opened this issue Aug 24, 2020 · 0 comments
Open

Use dataclasses instead of tuples/dicts for passing data around #60

snazzyfox opened this issue Aug 24, 2020 · 0 comments
Labels
documentation Improvements or additions to documentation feature Any new feature request reported meta Feedback of changes about the repo, CI, dev tooling etc, not the code

Comments

@snazzyfox
Copy link
Collaborator

We should formalize our data interface by using dataclasses instead of tuples and dictionaries when returning data. This can help in many ways

  • eliminate the possibility of missing a key, mixing different casing, or making a typo by making these structure lintable
  • much easier to document the meaning and data types of fields
  • allows us to create computed properties that are only computed on demand instead of always generated with the model even if not always needed
@snazzyfox snazzyfox added documentation Improvements or additions to documentation feature Any new feature request reported meta Feedback of changes about the repo, CI, dev tooling etc, not the code labels Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature Any new feature request reported meta Feedback of changes about the repo, CI, dev tooling etc, not the code
Projects
None yet
Development

No branches or pull requests

1 participant