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

Make DataFrameModel iterable over the schema field names #1288

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

nathanjmcdougall
Copy link
Contributor

A possible implementation of #1286

Signed-off-by: Nathan McDougall <[email protected]>
Signed-off-by: Nathan McDougall <[email protected]>
Signed-off-by: Nathan McDougall <[email protected]>
@nathanjmcdougall nathanjmcdougall changed the title Make DataFrameModel iterable over the schema fields Make DataFrameModel iterable over the schema field names Aug 5, 2023
use class instead of hard-coded strings

Signed-off-by: Nathan McDougall <[email protected]>
@nathanjmcdougall nathanjmcdougall marked this pull request as draft August 5, 2023 12:56
Signed-off-by: Nathan McDougall <[email protected]>
@nathanjmcdougall
Copy link
Contributor Author

The issue I'm facing with this is that .to_schema gives fields in the same order as defined within a class, but groups of fields from different classes are in reverse order from the class heirarchy (hence the test I've added is failing).

I could create a workaround, but I wonder whether it would be better just to change .to_schema to give fields in the order corresponding to the order of inheritance?

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.

1 participant