diff --git a/CHANGELOG.md b/CHANGELOG.md index 546b6dc40..f5d56ed31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [UNRELEASED] - YYYY-MM-DD + +### Fixed +- [#1287](https://github.com/equinor/webviz-subsurface/pull/1287) - Fixed bug when grouping on FACIES for non-standard static sources. + +## [0.2.25] - 2024-03-18 + ### Added - [#1266](https://github.com/equinor/webviz-subsurface/pull/1266) - Added waterfall plot for analysing volume changes in `VolumetricAnalysis`. diff --git a/setup.py b/setup.py index d1a6db875..a5142a2a6 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ "dash[testing]", "isort", "mypy", - "pylint", + "pylint<3.2.0", "pytest-mock", "pytest-xdist", "pytest-forked", diff --git a/webviz_subsurface/_models/inplace_volumes_model.py b/webviz_subsurface/_models/inplace_volumes_model.py index f5f213518..63b0fc2c9 100644 --- a/webviz_subsurface/_models/inplace_volumes_model.py +++ b/webviz_subsurface/_models/inplace_volumes_model.py @@ -357,9 +357,10 @@ def get_df( filters_excl_facies, groups, parameters, properties ) # Remove "FACIES" to compute facies fraction for the individual groups - groups = [x for x in groups if x != "FACIES"] - df = dframe.groupby(groups) if groups else dframe - dframe["FACIES_FRACTION"] = df["BULK"].transform(lambda x: x / x.sum()) + if "FACIES_FRACTION" in self.property_columns: + groups = [x for x in groups if x != "FACIES"] + df = dframe.groupby(groups) if groups else dframe + dframe["FACIES_FRACTION"] = df["BULK"].transform(lambda x: x / x.sum()) return dframe[dframe["FACIES"].isin(filters["FACIES"])] if filters else dframe