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
Bugfix/get all record duplicated columns #1021
Conversation
Add a new argument to `get_all_records` to provide the list of expected headers. The given expected headers must: - be unique - be part of the complete headers list - must not contain extra headers This will provide a way for users to use this method and still have *some* duplicated headers that are not relevant to pull. This will ensure the columns that matters have unique headers. Closes #1007
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.
Thanks. This would be great. Added some comments for you to consider, but nothing blocking this.
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.
I forgot one more comment.
Improved test coverage, make sure the logic is and remains. Add note to users to expect all headers to be returned even if only a subset is provided by `expected_headers`. Updated test cassette on the way. Clean old comment in tests when preparing sheet data.
Thank you for your review, it is much appreciated. You're right my first test scenario was too simple, I improved it to check the new logic and added a note to mention all the headers are returned. |
you're right, this was probably an old comment and the code part was copied over and over with time. I cleaned it. |
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.
Nice. Thanks. I added one more idea to consider for the future.
Also, in case this helps anyone, this is still a backward incompatible change for some. If you newly run into an issue, you’ll need to update your code to pass |
It will, it will be accepted as a valid list of expected headers, then all checks should pass. |
Add a new argument to
get_all_records
to provide the list of expectedheaders.
The given expected headers must:
This will provide a way for users to use this method and still
have some duplicated headers that are not relevant to pull.
This will ensure the columns that matters have unique headers.
Closes #1007