-
Notifications
You must be signed in to change notification settings - Fork 124
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
Remove attribute-style accesses to (Geo)DataFrames columns and xarray Datasets variables and attributes #939
Remove attribute-style accesses to (Geo)DataFrames columns and xarray Datasets variables and attributes #939
Conversation
I did my best to replace all instances of attribute-style accesses with the recommended keyword-style accesses. Please let me know if you spot some instances that I missed! What I still need to do is to update tests (as I assume this needs to be done as well). |
check_attribute-style_access.py
Outdated
import os | ||
import sys | ||
|
||
class DataFrameAttributeVisitor(ast.NodeVisitor): |
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.
What is the goal of this class?
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.
Sorry, it got mistakenly commited, I will remove it. It was a script to try to automatically find out occurences of attribute-style accesses but it was not working out well..
Great job! I looked around with different regexps based on yours:
I did not find others (except for tests, but you said you still haven't done these yet) |
Ok so I removed the few instances that I missed + the ones in the tests. Everything should be covered now. However I now have some tests failing with some weird errors e.g. |
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.
Very good job! You can merge as soon as we understand why the test are failing on Jenkins.
@emanuel-schmid any idea?
awesome! many thanks! (the importlib_metadata error was most likely just about some incompatible conda package) |
Changes proposed in this PR:
This PR fixes SCRUM userstory 100: Avoid attribute-style access to DataFrame columns (https://tree.taiga.io/project/emanuel-schmid-climada/us/100).
PR Author Checklist
develop
)PR Reviewer Checklist