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.
What is the goal of this class?
There was a problem hiding this comment.
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.
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