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

Fix formatting and clean up code #8

Merged
merged 3 commits into from
Jan 5, 2024
Merged

Fix formatting and clean up code #8

merged 3 commits into from
Jan 5, 2024

Conversation

FredrikNevjenNR
Copy link
Collaborator

Lots of formatting in all files in src/xtgeoapp_grd3dmaps/aggregate/, some changes in function structure _co2_mass.py.

@AudunSektnanNR AudunSektnanNR self-requested a review January 4, 2024 14:50
@@ -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
Copy link
Owner

@AudunSektnanNR AudunSektnanNR Jan 5, 2024

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.

Comment on lines 58 to 60
# grid = EclGrid(grid_file)
# unrst = EclFile(co2_mass_settings.unrst_source)
# init = EclFile(co2_mass_settings.init_source)
Copy link
Owner

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 ###################
Copy link
Owner

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.

Copy link
Owner

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(
Copy link
Owner

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed now

@FredrikNevjenNR FredrikNevjenNR merged commit 8ac39b4 into develop Jan 5, 2024
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.

2 participants