res2df 1.3.11__tar.gz → 1.3.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {res2df-1.3.11 → res2df-1.3.12}/.github/workflows/res2df.yml +30 -20
- {res2df-1.3.11 → res2df-1.3.12}/PKG-INFO +2 -2
- {res2df-1.3.11 → res2df-1.3.12}/pyproject.toml +33 -13
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/common.py +19 -16
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/compdat.py +3 -3
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/grid.py +1 -1
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/gruptree.py +4 -4
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/parameters.py +3 -2
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/summary.py +6 -5
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/version.py +3 -3
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/vfp/_vfpcommon.py +1 -1
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/vfp/_vfpinj.py +9 -13
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/vfp/_vfpprod.py +9 -12
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df.egg-info/PKG-INFO +2 -2
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df.egg-info/requires.txt +1 -1
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_common.py +1 -8
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_gruptree.py +9 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_summary.py +24 -8
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_welopen.py +50 -0
- {res2df-1.3.11 → res2df-1.3.12}/.github/dependabot.yml +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/.github/workflows/codecov.yml +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/.github/workflows/publish.yml +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/.github/workflows/style.yml +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/.github/workflows/typing.yml +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/.gitignore +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/.pre-commit-config.yaml +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/CONTRIBUTING.md +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/LICENSE +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/README.md +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/SECURITY.md +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/ci/testkomodo.sh +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/_static/equinor-logo.png +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/_static/equinor-logo2.jpg +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/_static/equinor_logo.jpg +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/_static/equinor_logo_only.jpg +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/_templates/layout.html +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/conf.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/contribution.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/csv2res.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/glossary.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/history.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/index.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/installation.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/introduction.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/res2csv.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/compdat.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/compdat.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/equil-example.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/equil.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/fipnum.inc +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/fipreports-example.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/fipreports-example.txt +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/fipreports.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/grid.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/grid.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/gruptree.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/gruptree.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/gruptreenet.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/images/injectoranalysis.png +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/images/multibranch-rftanalysis.png +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/nnc.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/nnc.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/outflow.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/pillars-dyn1-stacked.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/pillars-dyn1-unstacked.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/pillars-example1.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/pillars.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/pvt.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/pvt.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/rft.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/rft_columns.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/satfunc.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/satfunc.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/summary.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/summary.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/trans-boundaries.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/trans-group.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/trans.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/trans1.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/wcon.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/wcon.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/well_connection_status.csv +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage/wellconnstatus.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/docs/usage.rst +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/setup.cfg +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/__init__.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/__version__.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/constants.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/csv2res.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/equil.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/faults.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/fipreports.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/hook_implementations/__init__.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/hook_implementations/forward_model_steps.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/inferdims.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/nnc.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/BRANPROP +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/COMPDAT +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/COMPLUMP +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/COMPSEGS +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/DENSITY +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/EQLDIMS +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/EQUIL +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/FAULTS +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/GRUPNET +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/GRUPTREE +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/NODEPROP +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/PBVD +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/PDVD +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/PVDG +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/PVDO +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/PVTG +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/PVTO +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/PVTW +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/ROCK +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/RSVD +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/RVVD +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/SGFN +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/SGOF +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/SGWFN +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/SLGOF +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/SOF2 +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/SOF3 +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/SWFN +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/SWOF +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/TABDIMS +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/VFPINJ +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/VFPPROD +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/WCONHIST +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/WCONINJE +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/WCONINJH +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/WCONPROD +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/WELOPEN +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/WELSEGS +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/WELSPECS +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/WLIST +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/WSEGAICD +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/WSEGSICD +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/WSEGVALV +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/__init__.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/readme +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/opmkeywords/runmetoupdate.sh +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/pillars.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/pvt.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/py.typed +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/res2csv.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/res2csvlogger.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/resdatafiles.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/rft.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/satfunc.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/svg_color_keyword_names.txt +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/trans.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/vfp/__init__.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/vfp/_vfp.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/vfp/_vfpdefs.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/wcon.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/wellcompletiondata.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df/wellconnstatus.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df.egg-info/SOURCES.txt +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df.egg-info/dependency_links.txt +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df.egg-info/entry_points.txt +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df.egg-info/not-zip-safe +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/src/res2df.egg-info/top_level.txt +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/__init__.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/conftest.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/eightcells/EIGHTCELLS.DATA +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/eightcells/EIGHTCELLS.EGRID +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/eightcells/EIGHTCELLS.INIT +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/eightcells/EIGHTCELLS.INSPEC +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/eightcells/EIGHTCELLS.PRT +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/eightcells/EIGHTCELLS.RFT +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/eightcells/EIGHTCELLS.RSSPEC +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/eightcells/EIGHTCELLS.SMSPEC +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/eightcells/EIGHTCELLS.UNRST +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/eightcells/EIGHTCELLS.UNSMRY +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/eightcells/eightcells_duplicated_summary_vector/EIGHTCELLS_DUPES.DATA +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/eightcells/eightcells_duplicated_summary_vector/EIGHTCELLS_DUPES.SMSPEC +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/eightcells/eightcells_duplicated_summary_vector/EIGHTCELLS_DUPES.UNSMRY +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/eightcells/zones.lyr +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/fipreports/TEST1.PRT +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/grid/reek.faults +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/grid/reek.grid +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/grid/reek.multflt +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/grid/reek.multz +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/grid/reek.perm +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/grid/reek.poro +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/props/let-sgof.txt +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/props/let-swof.txt +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/props/reek.endpoints +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/props/reek.pvt +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/props/reek.swatinit +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/props/sgof.txt +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/props/swof.inc +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/props/swof.txt +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/regions/reek.eqlnum +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/regions/reek.fipnum +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/schedule/op6_aicd1_gp.sch +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/schedule/op6_icd1_gp.sch +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/schedule/op6_valve1_gp.sch +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/schedule/reek_history.sch +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/solution/reek.equil +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/include/summary/reek.smry +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/model/2_R001_REEK-0-OPMFLOW.PRT +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/model/2_R001_REEK-0.DATA +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/model/2_R001_REEK-0.ECLEND +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/model/2_R001_REEK-0.EGRID +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/model/2_R001_REEK-0.INIT +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/model/2_R001_REEK-0.LOG +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/model/2_R001_REEK-0.PRT +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/model/2_R001_REEK-0.RFT +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/model/2_R001_REEK-0.SMSPEC +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/model/2_R001_REEK-0.UNRST +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/model/2_R001_REEK-0.UNSMRY +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/reek/eclipse/model/zones.lyr +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/timesteps/SHORT_STEP.DATA +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/timesteps/SHORT_STEP.SMSPEC +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/timesteps/SHORT_STEP.UNSMRY +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/timesteps/SHORT_STEP_LONG.DATA +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/timesteps/SHORT_STEP_LONG.SMSPEC +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/timesteps/SHORT_STEP_LONG.UNSMRY +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/timesteps/SHORT_STEP_WITH_TIMESTEP.DATA +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/timesteps/SHORT_STEP_WITH_TIMESTEP.SMSPEC +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/timesteps/SHORT_STEP_WITH_TIMESTEP.UNSMRY +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/timesteps/SHORT_STEP_WITH_TIMESTEP_LONG.DATA +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/timesteps/SHORT_STEP_WITH_TIMESTEP_LONG.SMSPEC +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/data/timesteps/SHORT_STEP_WITH_TIMESTEP_LONG.UNSMRY +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_compdat.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_eclfiles.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_equil.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_ert_hooks.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_faults.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_fipreports.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_grid.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_hook_implementations.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_inferdims.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_init.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_integration.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_logging.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_nnc.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_parameters.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_pillars.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_pvt.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_rft.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_satfunc.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_summary_restarts.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_trans.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_userapi.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_vfp.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_wcon.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_wellcompletiondata.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_wellconnstatus.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_wlist.py +0 -0
- {res2df-1.3.11 → res2df-1.3.12}/tests/test_zonemap.py +0 -0
|
@@ -10,7 +10,7 @@ on:
|
|
|
10
10
|
|
|
11
11
|
schedule:
|
|
12
12
|
# Run CI every night and check that tests are working with latest dependencies
|
|
13
|
-
- cron:
|
|
13
|
+
- cron: "0 0 * * *"
|
|
14
14
|
|
|
15
15
|
env:
|
|
16
16
|
ERT_SHOW_BACKTRACE: 1
|
|
@@ -21,16 +21,23 @@ jobs:
|
|
|
21
21
|
runs-on: ubuntu-latest
|
|
22
22
|
strategy:
|
|
23
23
|
matrix:
|
|
24
|
-
python-version: [
|
|
24
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
25
|
+
pandas-version: [""]
|
|
25
26
|
include:
|
|
26
27
|
# For one of the Python versions we
|
|
27
28
|
# install the extra dependency ert
|
|
28
29
|
# (in order to not double the job matrix)
|
|
29
|
-
- python-version:
|
|
30
|
+
- python-version: "3.11"
|
|
30
31
|
install-ert: true
|
|
32
|
+
- python-version: "3.13"
|
|
33
|
+
pandas-version: ">=2,<3"
|
|
34
|
+
- python-version: "3.13"
|
|
35
|
+
pandas-version: ">=3.0.0"
|
|
36
|
+
exclude:
|
|
37
|
+
- python-version: "3.13"
|
|
38
|
+
pandas-version: ""
|
|
31
39
|
|
|
32
40
|
steps:
|
|
33
|
-
|
|
34
41
|
- name: Install Ubuntu dependencies
|
|
35
42
|
run: |
|
|
36
43
|
sudo apt-get update
|
|
@@ -59,11 +66,14 @@ jobs:
|
|
|
59
66
|
run: |
|
|
60
67
|
uv pip install ".[tests, docs]"
|
|
61
68
|
|
|
62
|
-
|
|
63
69
|
- name: Install ert
|
|
64
70
|
if: matrix.install-ert
|
|
65
71
|
run: uv pip install ".[ert]"
|
|
66
72
|
|
|
73
|
+
- name: Pin pandas version
|
|
74
|
+
if: matrix.pandas-version
|
|
75
|
+
run: uv pip install "pandas${{ matrix.pandas-version }}"
|
|
76
|
+
|
|
67
77
|
- name: List all installed packages
|
|
68
78
|
run: uv pip freeze
|
|
69
79
|
|
|
@@ -84,22 +94,22 @@ jobs:
|
|
|
84
94
|
- name: Update GitHub pages
|
|
85
95
|
if: github.repository_owner == 'equinor' && github.ref == 'refs/heads/master' && matrix.python-version == '3.11'
|
|
86
96
|
run: |
|
|
87
|
-
|
|
97
|
+
cp -R ./build/sphinx/html ../html
|
|
88
98
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
99
|
+
git config --local user.email "res2df-github-action"
|
|
100
|
+
git config --local user.name "res2df-github-action"
|
|
101
|
+
git fetch origin gh-pages
|
|
102
|
+
git checkout --track origin/gh-pages
|
|
103
|
+
git clean -f -f -d -x
|
|
104
|
+
git rm -r *
|
|
95
105
|
|
|
96
|
-
|
|
106
|
+
cp -R ../html/* .
|
|
97
107
|
|
|
98
|
-
|
|
108
|
+
git add .
|
|
99
109
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
110
|
+
if git diff-index --quiet HEAD; then
|
|
111
|
+
echo "No changes in documentation. Skip documentation deploy."
|
|
112
|
+
else
|
|
113
|
+
git commit -m "Update Github Pages"
|
|
114
|
+
git push "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" gh-pages
|
|
115
|
+
fi
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: res2df
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.12
|
|
4
4
|
Summary: Convert reservoir simulator input and output to DataFrames
|
|
5
5
|
Author-email: Håvard Berland <havb@equinor.com>
|
|
6
6
|
License-Expression: GPL-3.0-only
|
|
@@ -26,7 +26,7 @@ Requires-Dist: resfo
|
|
|
26
26
|
Requires-Dist: networkx
|
|
27
27
|
Requires-Dist: numpy
|
|
28
28
|
Requires-Dist: opm>=2020.10.2
|
|
29
|
-
Requires-Dist: pandas
|
|
29
|
+
Requires-Dist: pandas>=2
|
|
30
30
|
Requires-Dist: pyarrow
|
|
31
31
|
Requires-Dist: pyyaml>=5.1
|
|
32
32
|
Requires-Dist: treelib
|
|
@@ -40,7 +40,7 @@ dependencies= [
|
|
|
40
40
|
"networkx",
|
|
41
41
|
"numpy",
|
|
42
42
|
"opm>=2020.10.2",
|
|
43
|
-
"pandas",
|
|
43
|
+
"pandas >= 2",
|
|
44
44
|
"pyarrow",
|
|
45
45
|
"pyyaml>=5.1",
|
|
46
46
|
"treelib",
|
|
@@ -128,24 +128,44 @@ line-length = 88
|
|
|
128
128
|
|
|
129
129
|
[tool.ruff.lint]
|
|
130
130
|
select = [
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
131
|
+
"AIR", # airflow
|
|
132
|
+
"ANN", # flake8-annotations
|
|
133
|
+
"ASYNC", # flake8-async
|
|
134
134
|
"B", # flake-8-bugbear
|
|
135
|
-
"
|
|
135
|
+
"C4", # flake8-comprehensions
|
|
136
|
+
"DJ", # django
|
|
137
|
+
"E", # pycodestyle
|
|
136
138
|
"F", # pyflakes
|
|
137
|
-
"
|
|
139
|
+
"FA", # future-annotations
|
|
140
|
+
"FAST", # fastapi
|
|
141
|
+
"FIX", # fixme
|
|
142
|
+
"FLY", # flynt
|
|
143
|
+
"FURB", # refurb
|
|
144
|
+
"I", # isort
|
|
145
|
+
"ICN", # flake8-import-conventions
|
|
146
|
+
"INT", # gettext
|
|
147
|
+
"ISC", # flake8-implicit-str-concat
|
|
138
148
|
"NPY", # numpy specific rules
|
|
139
|
-
"C4", # flake8-comprehensions
|
|
140
149
|
"PD", # pandas-vet
|
|
141
|
-
"RUF", # ruff specific rules
|
|
142
|
-
"UP", # pyupgrade
|
|
143
|
-
"ANN", # flake8-annotations
|
|
144
|
-
"FURB", # refurb
|
|
145
150
|
"PERF", # perflint
|
|
151
|
+
"PGH", # pygrep-hooks
|
|
152
|
+
"PIE", # flake8-pie
|
|
153
|
+
"PL", # pylint
|
|
154
|
+
"PLC", # pylint convention
|
|
155
|
+
"PLE", # pylint error
|
|
156
|
+
"PLR", # pylint refactor
|
|
157
|
+
"PLW", # pylint warning
|
|
146
158
|
"PTH", # flake8-use-pathlib
|
|
147
|
-
"
|
|
148
|
-
"
|
|
159
|
+
"PYI", # flake8-pyi
|
|
160
|
+
"Q", # quotes
|
|
161
|
+
"RSE", # raise
|
|
162
|
+
"RUF", # ruff specific rules
|
|
163
|
+
"SIM", # flake-8-simplify
|
|
164
|
+
"SLOT", # flake8-slots
|
|
165
|
+
"TD", # todos
|
|
166
|
+
"UP", # pyupgrade
|
|
167
|
+
"W", # pycodestyle
|
|
168
|
+
"YTT", # year 2020
|
|
149
169
|
]
|
|
150
170
|
preview = true
|
|
151
171
|
ignore = [
|
|
@@ -653,7 +653,7 @@ def generic_deck_table(
|
|
|
653
653
|
|
|
654
654
|
# Start building the string we are to return:
|
|
655
655
|
string = keyword + "\n"
|
|
656
|
-
if comment
|
|
656
|
+
if comment:
|
|
657
657
|
string += "\n".join(["-- " + line for line in comment.splitlines()]) + "\n"
|
|
658
658
|
|
|
659
659
|
# Empty tables are ok with Eclipse (at least sometimes)
|
|
@@ -664,7 +664,7 @@ def generic_deck_table(
|
|
|
664
664
|
# Pandas make a pretty txt table:
|
|
665
665
|
dframe = dframe.copy()
|
|
666
666
|
|
|
667
|
-
# Column names are pr.
|
|
667
|
+
# Column names are pr. res2df standard, redo to opm.common in order to use
|
|
668
668
|
# sorting from that:
|
|
669
669
|
if renamer is not None:
|
|
670
670
|
inv_renamer = {value: key for key, value in renamer.items()}
|
|
@@ -696,11 +696,14 @@ def generic_deck_table(
|
|
|
696
696
|
dframe = dframe.fillna(value="1*")
|
|
697
697
|
|
|
698
698
|
if drop_trailing_columns:
|
|
699
|
+
columns_to_drop = []
|
|
699
700
|
for col_name in reversed(relevant_columns):
|
|
700
|
-
if
|
|
701
|
-
|
|
701
|
+
if (dframe[col_name] == "1*").all():
|
|
702
|
+
columns_to_drop.append(col_name)
|
|
702
703
|
else:
|
|
703
704
|
break
|
|
705
|
+
if columns_to_drop:
|
|
706
|
+
dframe = dframe.drop(columns=columns_to_drop)
|
|
704
707
|
|
|
705
708
|
# It is critical for opm.common, maybe also E100 to have integers printed
|
|
706
709
|
# as integers, for correct parsing. Ensure these are integer where the json
|
|
@@ -708,13 +711,15 @@ def generic_deck_table(
|
|
|
708
711
|
integer_cols = {
|
|
709
712
|
item["name"]
|
|
710
713
|
for item in OPMKEYWORDS[keyword]["items"]
|
|
711
|
-
if item["value_type"] == "INT"
|
|
714
|
+
if item["value_type"] == "INT"
|
|
712
715
|
}
|
|
713
716
|
for int_col in integer_cols.intersection(dframe.columns):
|
|
714
|
-
|
|
715
|
-
integer_values = dframe.loc[~defaulted_rows, int_col].astype(int)
|
|
717
|
+
mask = dframe[int_col] != "1*"
|
|
716
718
|
dframe[int_col] = dframe[int_col].astype(str)
|
|
717
|
-
|
|
719
|
+
if mask.any():
|
|
720
|
+
dframe.loc[mask, int_col] = (
|
|
721
|
+
dframe.loc[mask, int_col].astype(float).astype(int).astype(str)
|
|
722
|
+
)
|
|
718
723
|
|
|
719
724
|
# Quote all string data. This is not always needed, but needed
|
|
720
725
|
# for some colums, for example well-names containing a slash.
|
|
@@ -726,9 +731,8 @@ def generic_deck_table(
|
|
|
726
731
|
for str_col in string_cols.intersection(dframe.columns):
|
|
727
732
|
# Ensure 1* is not quoted.
|
|
728
733
|
non_defaulted_rows = dframe[str_col] != "1*"
|
|
729
|
-
dframe.loc[non_defaulted_rows, str_col].str.replace("'", "")
|
|
730
734
|
dframe.loc[non_defaulted_rows, str_col] = (
|
|
731
|
-
"'" + dframe.loc[non_defaulted_rows, str_col] + "'"
|
|
735
|
+
"'" + dframe.loc[non_defaulted_rows, str_col].str.replace("'", "") + "'"
|
|
732
736
|
)
|
|
733
737
|
|
|
734
738
|
# Now rename again to have prettier column names:
|
|
@@ -739,8 +743,7 @@ def generic_deck_table(
|
|
|
739
743
|
tablestring = dframe.to_string(header=True, index=False)
|
|
740
744
|
# Indent all lines with two spaces:
|
|
741
745
|
tablestring = "\n".join(
|
|
742
|
-
|
|
743
|
-
# The replace() in there is needed for py36/pandas==1.1.5 only.
|
|
746
|
+
" " + line.strip().replace(" /", " /") for line in tablestring.splitlines()
|
|
744
747
|
)
|
|
745
748
|
# Eclipse comment for the header line:
|
|
746
749
|
tablestring = "--" + tablestring[1:]
|
|
@@ -836,7 +839,7 @@ def stack_on_colnames(
|
|
|
836
839
|
# Drop rows stemming from the NaNs in the second tuple-element for
|
|
837
840
|
# static columns:
|
|
838
841
|
dframe = dframe.dropna(axis="index", subset=["DATE"])
|
|
839
|
-
|
|
842
|
+
dframe = dframe.drop(columns="level_0")
|
|
840
843
|
dframe.index.name = ""
|
|
841
844
|
return dframe
|
|
842
845
|
|
|
@@ -912,11 +915,11 @@ def parse_lyrfile(filename: str | Path) -> list[dict[str, Any]] | None:
|
|
|
912
915
|
zonedict["to_layer"] = to_layer
|
|
913
916
|
else:
|
|
914
917
|
logger.error("From_layer higher than to_layer")
|
|
915
|
-
raise ValueError
|
|
918
|
+
raise ValueError
|
|
916
919
|
elif len(numbers) == 1:
|
|
917
920
|
zonedict["span"] = int(numbers[0])
|
|
918
921
|
else:
|
|
919
|
-
raise ValueError
|
|
922
|
+
raise ValueError
|
|
920
923
|
lyrlist.append(zonedict)
|
|
921
924
|
except ValueError:
|
|
922
925
|
logger.error("Could not parse lyr file %s", filename)
|
|
@@ -967,7 +970,7 @@ def get_wells_matching_template(template: str, wells: list[str]) -> list[str]:
|
|
|
967
970
|
Returns:
|
|
968
971
|
List of matched wells
|
|
969
972
|
"""
|
|
970
|
-
if template.startswith("*"
|
|
973
|
+
if template.startswith(("*", "?")):
|
|
971
974
|
raise ValueError(
|
|
972
975
|
"Well template not allowed to start with a wildcard character: "
|
|
973
976
|
f"Must be preceded with a \\: {template}"
|
|
@@ -751,7 +751,7 @@ def expand_complump_in_welopen_df(
|
|
|
751
751
|
exp_welopens.append(cell_row)
|
|
752
752
|
|
|
753
753
|
dframe = pd.DataFrame(exp_welopens)
|
|
754
|
-
return dframe.astype(object).
|
|
754
|
+
return dframe.astype(object).replace({np.nan: None})
|
|
755
755
|
|
|
756
756
|
|
|
757
757
|
def expand_wlist_in_welopen_df(
|
|
@@ -785,7 +785,7 @@ def expand_wlist_in_welopen_df(
|
|
|
785
785
|
# Explicit wellname was used, no expansion to happen:
|
|
786
786
|
exp_welopens.append(row)
|
|
787
787
|
dframe = pd.DataFrame(exp_welopens)
|
|
788
|
-
return dframe.astype(object).
|
|
788
|
+
return dframe.astype(object).replace({np.nan: None})
|
|
789
789
|
|
|
790
790
|
|
|
791
791
|
def applywelopen(
|
|
@@ -844,7 +844,7 @@ def applywelopen(
|
|
|
844
844
|
"The WLIST dataframe must be expanded through expand_wlist()"
|
|
845
845
|
)
|
|
846
846
|
|
|
847
|
-
welopen_df = welopen_df.astype(object).
|
|
847
|
+
welopen_df = welopen_df.astype(object).replace({np.nan: None})
|
|
848
848
|
if wlist_df is not None:
|
|
849
849
|
welopen_df = expand_wlist_in_welopen_df(welopen_df, wlist_df)
|
|
850
850
|
if complump_df is not None:
|
|
@@ -47,7 +47,7 @@ def get_available_rst_dates(resdatafiles: ResdataFiles) -> list[datetime.date]:
|
|
|
47
47
|
)
|
|
48
48
|
return [
|
|
49
49
|
resdatafiles.get_rstfile().iget_restart_sim_time(index).date()
|
|
50
|
-
for index in range(
|
|
50
|
+
for index in range(len(report_indices))
|
|
51
51
|
]
|
|
52
52
|
|
|
53
53
|
|
|
@@ -9,9 +9,7 @@ import warnings
|
|
|
9
9
|
from typing import Any
|
|
10
10
|
|
|
11
11
|
import numpy as np
|
|
12
|
-
|
|
13
|
-
# Needed for mypy
|
|
14
|
-
import opm.io
|
|
12
|
+
import opm
|
|
15
13
|
import pandas as pd
|
|
16
14
|
import treelib
|
|
17
15
|
|
|
@@ -63,6 +61,9 @@ def df(
|
|
|
63
61
|
date: datetime.date | None
|
|
64
62
|
date = startdate if startdate is not None else None
|
|
65
63
|
|
|
64
|
+
if not isinstance(deck, (ResdataFiles, opm.opmcommon_python.Deck)):
|
|
65
|
+
raise TypeError("Input deck must be either ResdataFiles or an opm Deck.")
|
|
66
|
+
|
|
66
67
|
if isinstance(deck, ResdataFiles):
|
|
67
68
|
deck = deck.get_deck()
|
|
68
69
|
|
|
@@ -178,7 +179,6 @@ def df(
|
|
|
178
179
|
# This happens with WELSPECS if both GRUPTREE and BRANPROP is defined
|
|
179
180
|
# at the same timestep. And when a node is redirected to a new parent node
|
|
180
181
|
dframe = dframe.drop_duplicates(subset=["DATE", "CHILD", "KEYWORD"], keep="last")
|
|
181
|
-
print(dframe)
|
|
182
182
|
return dframe
|
|
183
183
|
|
|
184
184
|
|
|
@@ -5,7 +5,7 @@ import json
|
|
|
5
5
|
import logging
|
|
6
6
|
import warnings
|
|
7
7
|
from pathlib import Path
|
|
8
|
-
from typing import Any
|
|
8
|
+
from typing import Any, cast
|
|
9
9
|
|
|
10
10
|
import pandas as pd
|
|
11
11
|
import yaml
|
|
@@ -79,11 +79,12 @@ def load_parameterstxt(filename: str | Path) -> dict[str, Any]:
|
|
|
79
79
|
engine="python",
|
|
80
80
|
names=["KEY", "VALUE"],
|
|
81
81
|
index_col=False,
|
|
82
|
+
dtype={"KEY": str},
|
|
82
83
|
)
|
|
83
84
|
except pd.errors.ParserWarning as txt_exc:
|
|
84
85
|
raise pd.errors.ParserError(txt_exc) from txt_exc
|
|
85
86
|
|
|
86
|
-
return dframe.set_index("KEY")["VALUE"].to_dict()
|
|
87
|
+
return cast(dict[str, Any], dframe.set_index("KEY")["VALUE"].to_dict())
|
|
87
88
|
|
|
88
89
|
|
|
89
90
|
def load_all(
|
|
@@ -39,6 +39,7 @@ PD_FREQ_MNEMONICS: dict[str, str] = {
|
|
|
39
39
|
See
|
|
40
40
|
https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#dateoffset-objects
|
|
41
41
|
"""
|
|
42
|
+
PANDAS_MAJOR_VERSION = int(pd.__version__.split(".")[0])
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
def date_range(
|
|
@@ -617,7 +618,9 @@ def _fix_dframe_for_resdata(dframe: pd.DataFrame) -> pd.DataFrame:
|
|
|
617
618
|
dframe = dframe.copy()
|
|
618
619
|
if "DATE" in dframe.columns:
|
|
619
620
|
# Infer datatype (Pandas cannot answer it) based on the first element:
|
|
620
|
-
if
|
|
621
|
+
if PANDAS_MAJOR_VERSION >= 3:
|
|
622
|
+
dframe["DATE"] = pd.to_datetime(dframe["DATE"])
|
|
623
|
+
elif isinstance(dframe["DATE"].to_numpy()[0], str):
|
|
621
624
|
# Do not use pd.Series.apply() here, Pandas would try to convert it to
|
|
622
625
|
# datetime64[ns] which is limited at year 2262.
|
|
623
626
|
dframe["DATE"] = pd.Series(
|
|
@@ -625,7 +628,7 @@ def _fix_dframe_for_resdata(dframe: pd.DataFrame) -> pd.DataFrame:
|
|
|
625
628
|
dtype="object",
|
|
626
629
|
index=dframe.index,
|
|
627
630
|
)
|
|
628
|
-
|
|
631
|
+
elif isinstance(dframe["DATE"].to_numpy()[0], dt.date):
|
|
629
632
|
dframe["DATE"] = pd.Series(
|
|
630
633
|
[
|
|
631
634
|
dt.datetime.combine(dateobj, dt.datetime.min.time())
|
|
@@ -650,9 +653,7 @@ def _fix_dframe_for_resdata(dframe: pd.DataFrame) -> pd.DataFrame:
|
|
|
650
653
|
if "Unnamed: 0" in dframe:
|
|
651
654
|
dframe = dframe.drop("Unnamed: 0", axis="columns")
|
|
652
655
|
|
|
653
|
-
block_columns = [
|
|
654
|
-
col for col in dframe.columns if (col.startswith("B") or col.startswith("LB"))
|
|
655
|
-
]
|
|
656
|
+
block_columns = [col for col in dframe.columns if (col.startswith(("B", "LB")))]
|
|
656
657
|
if block_columns:
|
|
657
658
|
dframe = dframe.drop(columns=block_columns)
|
|
658
659
|
logger.warning(
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '1.3.
|
|
32
|
-
__version_tuple__ = version_tuple = (1, 3,
|
|
31
|
+
__version__ = version = '1.3.12'
|
|
32
|
+
__version_tuple__ = version_tuple = (1, 3, 12)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'gef2e91cb5'
|
|
@@ -123,7 +123,7 @@ def _stack_vfptable2df(
|
|
|
123
123
|
no_indices = len(index_names_list)
|
|
124
124
|
|
|
125
125
|
# insert index values as first columns in dataframe
|
|
126
|
-
for i in range(
|
|
126
|
+
for i in range(no_indices):
|
|
127
127
|
df_vfptable.insert(i, index_names_list[i], index_values_list[i])
|
|
128
128
|
|
|
129
129
|
# create multi-index for columns
|
|
@@ -14,19 +14,15 @@ import numbers
|
|
|
14
14
|
from typing import Any
|
|
15
15
|
|
|
16
16
|
import numpy as np
|
|
17
|
+
|
|
18
|
+
# Needed for mypy
|
|
19
|
+
import opm.io
|
|
17
20
|
import pandas as pd
|
|
18
21
|
import pyarrow as pa
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
import opm.io
|
|
24
|
-
|
|
25
|
-
# This import is seemingly not used, but necessary for some attributes
|
|
26
|
-
# to be included in DeckItem objects.
|
|
27
|
-
from opm.io.deck import DeckKeyword # noqa: F401
|
|
28
|
-
except ImportError:
|
|
29
|
-
pass
|
|
23
|
+
# This import is seemingly not used, but necessary for some attributes
|
|
24
|
+
# to be included in DeckItem objects.
|
|
25
|
+
from opm.io.deck import DeckKeyword # noqa: F401
|
|
30
26
|
|
|
31
27
|
from ..common import comment_formatter, parse_opmio_deckrecord
|
|
32
28
|
from ._vfpcommon import (
|
|
@@ -276,7 +272,7 @@ def basic_data2pyarrow(
|
|
|
276
272
|
|
|
277
273
|
# Column metadata is index in THP array
|
|
278
274
|
col_metadata_list = []
|
|
279
|
-
for i in range(
|
|
275
|
+
for i in range(len(thp_values)):
|
|
280
276
|
col_name = str(i)
|
|
281
277
|
col_dtype = pa.float64()
|
|
282
278
|
col_metadata = {
|
|
@@ -397,7 +393,7 @@ def pyarrow2basic_data(pa_table: pa.Table) -> dict[str, Any]:
|
|
|
397
393
|
# Extract index data from colum metadata
|
|
398
394
|
thp_indices = [
|
|
399
395
|
int(pa_table.schema.field(i).metadata[b"thp_idx"])
|
|
400
|
-
for i in range(
|
|
396
|
+
for i in range(pa_table.num_columns)
|
|
401
397
|
]
|
|
402
398
|
|
|
403
399
|
# Extract table data as numpy.array
|
|
@@ -602,7 +598,7 @@ def _write_table_records(
|
|
|
602
598
|
else:
|
|
603
599
|
table = table.reshape(no_records, no_flow_values)
|
|
604
600
|
|
|
605
|
-
for row in range(
|
|
601
|
+
for row in range(no_records):
|
|
606
602
|
thp = thp_indices[row]
|
|
607
603
|
deck_str += f"{thp:2d}"
|
|
608
604
|
for n, value in enumerate(table[row, :]):
|
|
@@ -14,18 +14,15 @@ import numbers
|
|
|
14
14
|
from typing import Any
|
|
15
15
|
|
|
16
16
|
import numpy as np
|
|
17
|
+
|
|
18
|
+
# Needed for mypy
|
|
19
|
+
import opm.io
|
|
17
20
|
import pandas as pd
|
|
18
21
|
import pyarrow as pa
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
# This import is seemingly not used, but necessary for some attributes
|
|
25
|
-
# to be included in DeckItem objects.
|
|
26
|
-
from opm.io.deck import DeckKeyword # noqa: F401
|
|
27
|
-
except ImportError:
|
|
28
|
-
pass
|
|
23
|
+
# This import is seemingly not used, but necessary for some attributes
|
|
24
|
+
# to be included in DeckItem objects.
|
|
25
|
+
from opm.io.deck import DeckKeyword # noqa: F401
|
|
29
26
|
|
|
30
27
|
from ..common import comment_formatter, parse_opmio_deckrecord
|
|
31
28
|
from ._vfpcommon import (
|
|
@@ -382,7 +379,7 @@ def basic_data2pyarrow(
|
|
|
382
379
|
# Column metadata is list of indices (THP,WFR,GFR,ALQ)
|
|
383
380
|
col_metadata_list = []
|
|
384
381
|
num_records = len(thp_values) * len(wfr_values) * len(gfr_values) * len(alq_values)
|
|
385
|
-
for i in range(
|
|
382
|
+
for i in range(num_records):
|
|
386
383
|
thp_idx = thp_indices[i]
|
|
387
384
|
wfr_idx = wfr_indices[i]
|
|
388
385
|
gfr_idx = gfr_indices[i]
|
|
@@ -597,7 +594,7 @@ def pyarrow2basic_data(pa_table: pa.Table) -> dict[str, Any]:
|
|
|
597
594
|
wfr_indices = []
|
|
598
595
|
gfr_indices = []
|
|
599
596
|
alq_indices = []
|
|
600
|
-
for i in range(
|
|
597
|
+
for i in range(pa_table.num_columns):
|
|
601
598
|
thp_indices.append(int(pa_table.schema.field(i).metadata[b"thp_idx"]))
|
|
602
599
|
wfr_indices.append(int(pa_table.schema.field(i).metadata[b"wfr_idx"]))
|
|
603
600
|
gfr_indices.append(int(pa_table.schema.field(i).metadata[b"gfr_idx"]))
|
|
@@ -880,7 +877,7 @@ def _write_table_records(
|
|
|
880
877
|
else:
|
|
881
878
|
table = table.reshape(no_records, no_flow_values)
|
|
882
879
|
|
|
883
|
-
for row in range(
|
|
880
|
+
for row in range(no_records):
|
|
884
881
|
thp = thp_indices[row]
|
|
885
882
|
wfr = wfr_indices[row]
|
|
886
883
|
gfr = gfr_indices[row]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: res2df
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.12
|
|
4
4
|
Summary: Convert reservoir simulator input and output to DataFrames
|
|
5
5
|
Author-email: Håvard Berland <havb@equinor.com>
|
|
6
6
|
License-Expression: GPL-3.0-only
|
|
@@ -26,7 +26,7 @@ Requires-Dist: resfo
|
|
|
26
26
|
Requires-Dist: networkx
|
|
27
27
|
Requires-Dist: numpy
|
|
28
28
|
Requires-Dist: opm>=2020.10.2
|
|
29
|
-
Requires-Dist: pandas
|
|
29
|
+
Requires-Dist: pandas>=2
|
|
30
30
|
Requires-Dist: pyarrow
|
|
31
31
|
Requires-Dist: pyyaml>=5.1
|
|
32
32
|
Requires-Dist: treelib
|
|
@@ -5,7 +5,6 @@ import os
|
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
|
|
7
7
|
import numpy as np
|
|
8
|
-
import packaging.version
|
|
9
8
|
import pandas as pd
|
|
10
9
|
import pytest
|
|
11
10
|
|
|
@@ -447,10 +446,4 @@ def test_generic_deck_table(
|
|
|
447
446
|
renamer=renamer,
|
|
448
447
|
drop_trailing_columns=drop_trailing_columns,
|
|
449
448
|
)
|
|
450
|
-
|
|
451
|
-
# these tests are written for. If so, be more slack about whitespace.
|
|
452
|
-
if packaging.version.parse(pd.__version__) < packaging.version.parse("1.2.0"):
|
|
453
|
-
stringtable = " ".join(stringtable.split())
|
|
454
|
-
assert stringtable == " ".join(expected.split())
|
|
455
|
-
else:
|
|
456
|
-
assert stringtable == expected
|
|
449
|
+
assert stringtable == expected
|
|
@@ -417,6 +417,15 @@ def test_emptytree_strdeck():
|
|
|
417
417
|
assert not treelibtree
|
|
418
418
|
|
|
419
419
|
|
|
420
|
+
def test_non_deck_input_raises():
|
|
421
|
+
"""Test giving in non valid input to df gives
|
|
422
|
+
reasonable error message"""
|
|
423
|
+
with pytest.raises(
|
|
424
|
+
TypeError, match="Input deck must be either ResdataFiles or an opm Deck"
|
|
425
|
+
):
|
|
426
|
+
_ = gruptree.df("this should not be valid")
|
|
427
|
+
|
|
428
|
+
|
|
420
429
|
def test_emptytree_commandlinetool(tmp_path, mocker, caplog):
|
|
421
430
|
"""Test the command line tool on a .DATA file which is empty"""
|
|
422
431
|
os.chdir(tmp_path)
|