Skip to content

DEP: Deprecate warning for ExportData.fmu-context#1784

Open
nourinmohd wants to merge 1 commit into
equinor:mainfrom
nourinmohd:1513_deprecate_exportdata_notice
Open

DEP: Deprecate warning for ExportData.fmu-context#1784
nourinmohd wants to merge 1 commit into
equinor:mainfrom
nourinmohd:1513_deprecate_exportdata_notice

Conversation

@nourinmohd

@nourinmohd nourinmohd commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Resolves #1513

Checklist

  • Tests added (if not, comment why)
  • Test coverage equal or up from main (run pytest with --cov=src/ --cov-report term-missing)
  • If not squash merging, every commit passes tests
  • Appropriate commit prefix and precise commit message used
  • All debug prints and unnecessary comments removed
  • Docstrings are correct and updated
  • Documentation is updated, if necessary
  • Latest main rebased/merged into branch
  • Added comments on this PR where appropriate to help reviewers
  • Moved issue status on project board
  • Checked the boxes in this checklist ✅

@nourinmohd
nourinmohd force-pushed the 1513_deprecate_exportdata_notice branch from 28a29ed to 0c77671 Compare July 2, 2026 18:37
Comment on lines +361 to +366
if (
preprocessed
and fmu_context_input is None
and effective_context == FMUContext.realization
):
effective_context = FMUContext.case

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You should not need to the fmu_context_input here, if fmu_context_input was None the effective_context was set from environment. So this should be enough

Suggested change
if (
preprocessed
and fmu_context_input is None
and effective_context == FMUContext.realization
):
effective_context = FMUContext.case
if (
preprocessed
and effective_context == FMUContext.realization
):
effective_context = FMUContext.case

Another note, the change here would essentially allow all realizations running in parallell to export to the same file, so might cause problems..

I know we have an error saying preprocessed should be run outside of ERT or with context case... but this seems wrong to me, preprocessed is only intended to be run outside of an ERT run, and then to be included into the run by the COPY_PREPROCESSED ERT workflow. Hence I struggle to see the use case for supporting case context here.

Could we make an issue to deprecate preprocessed in case context? 🙂

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.

Issue deprecation notice for ExportData.fmu_context

2 participants