Skip to content

Update FlowNet dependencies, codebase and CI to make it it run again on newer setups - #460

Open
wouterjdb wants to merge 23 commits into
equinor:masterfrom
wouterjdb:master
Open

wouterjdb wants to merge 23 commits into
equinor:masterfrom
wouterjdb:master

Conversation

@wouterjdb

Copy link
Copy Markdown
Collaborator

This PR is a collection of many changes to make sure FlowNet can run again in 2026.


Contributor checklist

  • 🎉 This PR closes #ISSUE_NUMBER.
  • 📜 I have broken down my PR into the following tasks:
    • Task 1
    • Task 2
  • 🤖 I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR.
  • 📖 I have considered adding a new entry in CHANGELOG.md.
  • 📚 I have considered updating the documentation.

wouterjdb and others added 18 commits October 6, 2026 20:19
…ack (#8)

* Restore FlowNet runtime compatibility

* Update CI for Python 3.11

* Add bounded Egg CI smoke test

* Restore Egg and Norne CI matrix

* Fix README badges and Python support docs

* Install CI dependencies in a virtualenv

* Apply Black formatting

* Fix Pylint 4 findings

* Fix mypy errors in CI targets

* Fix black issues

* Fix remaining Pylint findings

* Restore reduced CI integration coverage

* Restore reduced Norne CI integration

* Scope pre-push checks to committed tree

* feat: add Python 3.12 compatibility

* feat: target ERT 26 and Python 3.14

* fix: pass scalar cell index to grid.find_cell; fix CI heredoc indentation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: build Webviz with fork start method on Python 3.14

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: wrap metrics dict in DataFrame; run Webviz copy_data with fork start method

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Delete scripts/pre-push-checks.sh

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* Fix docs deployment when gh-pages is missing

* Remove stale pre-push hook
…e mapping, bump dependency floors (#9)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@wouterjdb wouterjdb added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed maintenance labels Oct 15, 2026
@wouterjdb wouterjdb assigned wouterjdb and unassigned anders-kiaer Oct 15, 2026
@wouterjdb

Copy link
Copy Markdown
Collaborator Author

Also updated CI, see: https://github.com/equinor/flownet

Comment thread setup.py Resolved
@olelod

olelod commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

@wouterjdb You should also change the required checks in the GitHub settings to the new jobs.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved runtime regressions and duplicate deployment execution need correction before approval.

5 open findings
What changed in this PR

Modernizes FlowNet’s reservoir-modeling workflows for current Python environments and dependencies.

Changes:

  • Migrates to resdata/res2df and updates ERT, pandas, and scientific-library integrations.
  • Updates Webviz generation, configuration handling, and compatibility tests.
  • Refreshes packaging, CI environments, installation instructions, and contributor documentation.
File Description
tests/​tests_multiple_one_dimensional.py Replaces deprecated DataFrame append.
tests/​test_probability_distributions.py Renames the distribution fixture.
tests/​test_iteration_analytics.py Tests ERT parameter normalization.
tests/​test_data_flow.py Uses resdata regions.
tests/​test_config_parser.py Tests single-analysis shorthand.
tests/​test_check_obsfiles_ert_yaml.py Normalizes schedule dates.
src/​flownet/​utils/​types.py Adds a naming-check exemption.
src/​flownet/​utils/​plot_results.py Migrates summary loading to resdata.
src/​flownet/​utils/​observations.py Accepts ISO and legacy dates.
src/​flownet/​templates/​webviz_pred_config.yml.jinja2 Updates the time-series plugin.
src/​flownet/​templates/​webviz_ahm_config.yml.jinja2 Updates the time-series plugin.
src/​flownet/​templates/​observations.ertobs.jinja2 Writes ISO observation dates.
src/​flownet/​templates/​common_config.ert.jinja2 Updates forward-model registration.
src/​flownet/​static/​DELETE_IN_CURRENT_ITERATION Updates ERT executable syntax.
src/​flownet/​static/​CREATE_FLOWNET_MODEL Updates executable syntax and arguments.
src/​flownet/​realization/​_simulation_realization.py Removes extra whitespace.
src/​flownet/​realization/​_schedule.py Refines annotations and formatting.
src/​flownet/​parameters/​probability_distributions.py Updates typing and distribution validation.
src/​flownet/​parameters/​_rock_compressibility.py Removes extra whitespace.
src/​flownet/​parameters/​_relative_permeability.py Simplifies tuple assignment syntax.
src/​flownet/​parameters/​_porv_poro_trans.py Removes extra whitespace.
src/​flownet/​parameters/​_permeability.py Reformats distribution selection.
src/​flownet/​parameters/​_fault_transmissibility.py Removes extra whitespace.
src/​flownet/​parameters/​_equilibration.py Removes extra whitespace.
src/​flownet/​parameters/​_base_parameter.py Cleans formatting and lint suppression.
src/​flownet/​network_model/​_one_dimensional_model.py Returns native Python floats.
src/​flownet/​network_model/​_network_model.py Modernizes concatenation and fault handling.
src/​flownet/​network_model/​_mitchell.py Validates candidate-generation modes.
src/​flownet/​network_model/​_hull.py Corrects optional argument typing.
src/​flownet/​network_model/​_generate_connections.py Modernizes imports and table construction.
src/​flownet/​network_model/​_create_egrid.py Migrates grid writing to resdata.
src/​flownet/​hyperparameter/​_run_hyper.py Applies configuration overrides to optimization settings.
src/​flownet/​ert/​forward_models/​utils.py Normalizes ERT parameter formats.
src/​flownet/​ert/​forward_models/​_save_predictions.py Modernizes result concatenation.
src/​flownet/​ert/​forward_models/​_save_iteration_parameters.py Uses parameter normalization.
src/​flownet/​ert/​forward_models/​_render_realization.py Normalizes realization parameter inputs.
src/​flownet/​ert/​forward_models/​_iteration_analytics.py Updates summary loading, metrics, and concatenation.
src/​flownet/​ert/​forward_models/​_flow_job.py Supports updated ERT plugin imports.
src/​flownet/​ert/​_run_subprocess.py Combines subprocess output streams.
src/​flownet/​ert/​_create_synthetic_refcase.py Uses resdata summary-writing APIs.
src/​flownet/​ert/​_create_ert_setup.py Updates resampling and simulator-job setup.
src/​flownet/​data/​perforation_strategy.py Modernizes grouping, filling, and concatenation.
src/​flownet/​data/​from_flow.py Migrates readers and vectorizes volume mapping.
src/​flownet/​data/​compdat.py Migrates to res2df and fixes date-keyword matching.
src/​flownet/​config_parser/​_config_transformations.py Adjusts signature formatting.
src/​flownet/​config_parser/​_config_parser.py Normalizes analysis entries and validates simulation availability.
src/​flownet/​config_parser/​_config_parser_pred.py Corrects optional argument typing.
src/​flownet/​config_parser/​_config_parser_hyperparam.py Normalizes analysis entries during optimization setup.
src/​flownet/​ahm/​_run_ahm.py Updates regional mapping and parameter-table construction.
src/​flownet/​ahm/​_assisted_history_matching.py Simplifies reporting expressions.
src/​flownet/​_command_line.py Adds Arrow conversion and Webviz process compatibility.
src/​flownet/​__init__.py Uses standard-library package metadata.
setup.py Updates dependencies and minimum Python version.
README.md Refreshes installation and compatibility documentation.
pyproject.toml Declares the build backend.
CONTRIBUTING.md Updates local-check instructions.
CHANGELOG.md Records modernization changes.
apt_install.sh Updates unattended dependency installation.
.pylintrc Adjusts lint configuration.
.pre-commit-config.yaml Updates Black and hook stages.
.github/​workflows/​flownet.yml Expands CI coverage and updates deployment steps.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/flownet.yml Resolved
Comment thread .github/workflows/flownet.yml Resolved
Comment on lines +36 to +38
for data_file in output_folder.glob(
"output/runpath/realization-*/*/eclipse/model/*.DATA"
):

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@anders-kiaer, this one isn't that relevant I guess?

Comment thread src/flownet/data/from_flow.py Resolved
Comment on lines +178 to +180
score = np.sqrt(mean_squared_error(data_reference, data_test))
elif metric == "NRMSE":
score = mean_squared_error(data_reference, data_test, squared=False) / (
score = np.sqrt(mean_squared_error(data_reference, data_test)) / (
wouterjdb and others added 2 commits October 23, 2026 16:00
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@wouterjdb

wouterjdb commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

@wouterjdb You should also change the required checks in the GitHub settings to the new jobs.

@olelod

Can you be more specific?

@olelod

olelod commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

@wouterjdb You should also change the required checks in the GitHub settings to the new jobs.

@olelod

Can you be more specific?

I think maybe Anders have done it? CI was requiring running python 3.7, 3.8 and 3.9 or something like that. Now it is 3.12 and 3.14. So it's ok now.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants