-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix formatting and clean up code #8
Conversation
@@ -297,7 +300,8 @@ def _property_to_map( | |||
if weights is not None: | |||
assert method in [AggregationMethod.MEAN, AggregationMethod.SUM] | |||
data = prop[0][cols] if len(prop) == 1 else prop[cols] | |||
# Small hack due to a slight difference between calculating mass and other properties | |||
# Small hack due to a small difference between calculating mass and other properties | |||
# pylint: disable=fixme | |||
# TODO: Implement a better solution |
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.
Could also remove the TODO since we have an issue for it, maybe copy the line data = ... to the issue description to remember where it was. Then we don't need to disable the pylint message.
# grid = EclGrid(grid_file) | ||
# unrst = EclFile(co2_mass_settings.unrst_source) | ||
# init = EclFile(co2_mass_settings.init_source) |
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.
Can just remove the lines if they are not used here
@@ -240,77 +245,91 @@ def _fetch_properties( | |||
else: | |||
print("Skip HACK") | |||
################# HACK END ################### |
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.
Whoops, we need to remove this hack! Left behind from earlier implementations.
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.
Then the pylint disable can be removed also I guess
return grids | ||
|
||
|
||
def _temp_make_property_copy( |
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.
Is this method used? If so we can change the name, just remove "temp". The name was made when it was not clear if this was a method that was going to be used.
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.
Removed now
Lots of formatting in all files in src/xtgeoapp_grd3dmaps/aggregate/, some changes in function structure _co2_mass.py.