-
Notifications
You must be signed in to change notification settings - Fork 89
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
refactor: split "meta" into Meta
#2841
Conversation
1578317
to
4dacbf4
Compare
I don't think we can / should group |
refactor: move more metadata handling into meta refactor: more typing remove more to meta
d0a0026
to
2fa362a
Compare
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.
Yes, we have been talking about this for a long time.
Sure, let's go ahead with this, but only if it isn't disruptive. From a user's or downstream developer's perspective, the Form and Content classes should appear to be as they have been (i.e. a pure refactor).
And yes, Types don't fit into this scheme.
06e56b3
to
5cbcb71
Compare
Codecov Report
Additional details and impacted files
|
@jpivarski and I have discussed this on-and-off for over a year now.
Presently,
ak.contents.Content
subclasses re-use code fromak.forms.Form
subclasses using explicit descriptor lookups. As such,ak.forms.Form
serves as the implementation for many metadata methods. As we look to grow the set of metadata-only methods, it would be nice to formalise this hierarchy. Benefits include:Content.parameter
involves an additional attribute lookup and function call)As it now seems possible that we'll want an
enforce_form
function, I would like for the ability to implement the_mergeable_next
protocol at the "meta" level, and doing this properly feels more readable (and easier to reason about) to me; we're not fighting the type system by implementing this via inheritance.