res2df 1.1.1__tar.gz → 1.2.0__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.
Files changed (262) hide show
  1. {res2df-1.1.1 → res2df-1.2.0}/.github/workflows/codecov.yml +6 -2
  2. {res2df-1.1.1 → res2df-1.2.0}/.github/workflows/res2df.yml +25 -18
  3. res2df-1.2.0/.github/workflows/style.yml +42 -0
  4. res2df-1.2.0/.github/workflows/typing.yml +42 -0
  5. res2df-1.2.0/.pre-commit-config.yaml +20 -0
  6. {res2df-1.1.1 → res2df-1.2.0}/PKG-INFO +15 -15
  7. {res2df-1.1.1 → res2df-1.2.0}/README.md +4 -4
  8. {res2df-1.1.1 → res2df-1.2.0}/ci/testkomodo.sh +0 -4
  9. {res2df-1.1.1 → res2df-1.2.0}/docs/glossary.rst +2 -2
  10. {res2df-1.1.1 → res2df-1.2.0}/docs/introduction.rst +1 -1
  11. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/equil.rst +1 -1
  12. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/fipreports-example.txt +1 -1
  13. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/fipreports.rst +0 -5
  14. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/grid.rst +2 -2
  15. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/gruptree.rst +0 -1
  16. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/nnc.rst +0 -1
  17. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/pvt.rst +1 -2
  18. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/rft.rst +0 -1
  19. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/satfunc.rst +1 -1
  20. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/trans.rst +0 -1
  21. {res2df-1.1.1 → res2df-1.2.0}/res2df/__init__.py +3 -3
  22. {res2df-1.1.1 → res2df-1.2.0}/res2df/common.py +13 -10
  23. {res2df-1.1.1 → res2df-1.2.0}/res2df/compdat.py +41 -53
  24. {res2df-1.1.1 → res2df-1.2.0}/res2df/equil.py +10 -19
  25. {res2df-1.1.1 → res2df-1.2.0}/res2df/faults.py +3 -4
  26. {res2df-1.1.1 → res2df-1.2.0}/res2df/fipreports.py +2 -2
  27. {res2df-1.1.1 → res2df-1.2.0}/res2df/grid.py +10 -11
  28. {res2df-1.1.1 → res2df-1.2.0}/res2df/gruptree.py +9 -13
  29. {res2df-1.1.1 → res2df-1.2.0}/res2df/hook_implementations/jobs.py +5 -11
  30. {res2df-1.1.1 → res2df-1.2.0}/res2df/inferdims.py +11 -16
  31. {res2df-1.1.1 → res2df-1.2.0}/res2df/nnc.py +2 -2
  32. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/readme +1 -2
  33. {res2df-1.1.1 → res2df-1.2.0}/res2df/parameters.py +1 -1
  34. {res2df-1.1.1 → res2df-1.2.0}/res2df/pillars.py +1 -4
  35. {res2df-1.1.1 → res2df-1.2.0}/res2df/pvt.py +20 -44
  36. {res2df-1.1.1 → res2df-1.2.0}/res2df/res2csv.py +1 -0
  37. {res2df-1.1.1 → res2df-1.2.0}/res2df/rft.py +7 -8
  38. {res2df-1.1.1 → res2df-1.2.0}/res2df/satfunc.py +7 -11
  39. {res2df-1.1.1 → res2df-1.2.0}/res2df/summary.py +15 -120
  40. {res2df-1.1.1 → res2df-1.2.0}/res2df/trans.py +1 -0
  41. {res2df-1.1.1 → res2df-1.2.0}/res2df/version.py +2 -2
  42. {res2df-1.1.1 → res2df-1.2.0}/res2df/vfp/__init__.py +1 -1
  43. {res2df-1.1.1 → res2df-1.2.0}/res2df/vfp/_vfp.py +12 -15
  44. {res2df-1.1.1 → res2df-1.2.0}/res2df/vfp/_vfpcommon.py +1 -5
  45. {res2df-1.1.1 → res2df-1.2.0}/res2df/vfp/_vfpinj.py +2 -2
  46. {res2df-1.1.1 → res2df-1.2.0}/res2df/vfp/_vfpprod.py +4 -5
  47. {res2df-1.1.1 → res2df-1.2.0}/res2df/wcon.py +2 -3
  48. {res2df-1.1.1 → res2df-1.2.0}/res2df.egg-info/PKG-INFO +15 -15
  49. {res2df-1.1.1 → res2df-1.2.0}/res2df.egg-info/SOURCES.txt +4 -2
  50. {res2df-1.1.1 → res2df-1.2.0}/res2df.egg-info/requires.txt +10 -8
  51. res2df-1.2.0/ruff.toml +36 -0
  52. {res2df-1.1.1 → res2df-1.2.0}/setup.cfg +0 -7
  53. {res2df-1.1.1 → res2df-1.2.0}/setup.py +11 -3
  54. res2df-1.2.0/test_requirements.txt +4 -0
  55. {res2df-1.1.1 → res2df-1.2.0}/tests/conftest.py +0 -1
  56. {res2df-1.1.1 → res2df-1.2.0}/tests/data/eightcells/EIGHTCELLS.PRT +133 -133
  57. {res2df-1.1.1 → res2df-1.2.0}/tests/data/fipreports/TEST1.PRT +61 -61
  58. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/grid/reek.faults +4 -4
  59. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/grid/reek.grid +1 -1
  60. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/grid/reek.multz +1 -1
  61. res2df-1.2.0/tests/data/reek/eclipse/include/props/let-sgof.txt +29 -0
  62. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/props/let-swof.txt +11 -12
  63. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/props/reek.endpoints +1 -3
  64. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/props/reek.pvt +7 -7
  65. res2df-1.2.0/tests/data/reek/eclipse/include/props/sgof.txt +58 -0
  66. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/props/swof.inc +2 -2
  67. res2df-1.2.0/tests/data/reek/eclipse/include/props/swof.txt +60 -0
  68. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/schedule/op6_aicd1_gp.sch +35 -37
  69. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/schedule/op6_icd1_gp.sch +35 -37
  70. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/schedule/op6_valve1_gp.sch +35 -37
  71. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/summary/reek.smry +10 -10
  72. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/model/2_R001_REEK-0.DATA +16 -16
  73. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/model/2_R001_REEK-0.ECLEND +4 -4
  74. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/model/2_R001_REEK-0.LOG +1265 -1265
  75. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/model/2_R001_REEK-0.PRT +7891 -7891
  76. {res2df-1.1.1 → res2df-1.2.0}/tests/test_common.py +3 -4
  77. {res2df-1.1.1 → res2df-1.2.0}/tests/test_compdat.py +0 -1
  78. {res2df-1.1.1 → res2df-1.2.0}/tests/test_eclfiles.py +0 -1
  79. {res2df-1.1.1 → res2df-1.2.0}/tests/test_equil.py +4 -6
  80. {res2df-1.1.1 → res2df-1.2.0}/tests/test_ert_hooks.py +7 -8
  81. {res2df-1.1.1 → res2df-1.2.0}/tests/test_faults.py +0 -1
  82. {res2df-1.1.1 → res2df-1.2.0}/tests/test_fipreports.py +13 -16
  83. {res2df-1.1.1 → res2df-1.2.0}/tests/test_grid.py +7 -8
  84. {res2df-1.1.1 → res2df-1.2.0}/tests/test_gruptree.py +2 -3
  85. {res2df-1.1.1 → res2df-1.2.0}/tests/test_hook_implementations.py +4 -5
  86. {res2df-1.1.1 → res2df-1.2.0}/tests/test_inferdims.py +0 -1
  87. {res2df-1.1.1 → res2df-1.2.0}/tests/test_integration.py +0 -1
  88. {res2df-1.1.1 → res2df-1.2.0}/tests/test_logging.py +6 -8
  89. {res2df-1.1.1 → res2df-1.2.0}/tests/test_nnc.py +0 -1
  90. {res2df-1.1.1 → res2df-1.2.0}/tests/test_parameters.py +7 -9
  91. {res2df-1.1.1 → res2df-1.2.0}/tests/test_pillars.py +0 -1
  92. {res2df-1.1.1 → res2df-1.2.0}/tests/test_pvt.py +3 -4
  93. {res2df-1.1.1 → res2df-1.2.0}/tests/test_rft.py +1 -2
  94. {res2df-1.1.1 → res2df-1.2.0}/tests/test_satfunc.py +0 -1
  95. {res2df-1.1.1 → res2df-1.2.0}/tests/test_summary.py +1 -2
  96. {res2df-1.1.1 → res2df-1.2.0}/tests/test_summary_restarts.py +8 -5
  97. {res2df-1.1.1 → res2df-1.2.0}/tests/test_trans.py +1 -2
  98. {res2df-1.1.1 → res2df-1.2.0}/tests/test_userapi.py +0 -1
  99. {res2df-1.1.1 → res2df-1.2.0}/tests/test_vfp.py +0 -1
  100. {res2df-1.1.1 → res2df-1.2.0}/tests/test_wcon.py +0 -1
  101. {res2df-1.1.1 → res2df-1.2.0}/tests/test_wellcompletiondata.py +0 -1
  102. {res2df-1.1.1 → res2df-1.2.0}/tests/test_wellconnstatus.py +0 -1
  103. {res2df-1.1.1 → res2df-1.2.0}/tests/test_welopen.py +0 -1
  104. {res2df-1.1.1 → res2df-1.2.0}/tests/test_wlist.py +0 -1
  105. {res2df-1.1.1 → res2df-1.2.0}/tests/test_zonemap.py +0 -1
  106. res2df-1.2.0/types_requirements.txt +4 -0
  107. res2df-1.1.1/.pre-commit-config.yaml +0 -34
  108. res2df-1.1.1/.pylintrc +0 -23
  109. res2df-1.1.1/bandit.yml +0 -3
  110. res2df-1.1.1/test_requirements.txt +0 -12
  111. res2df-1.1.1/tests/data/reek/eclipse/include/props/let-sgof.txt +0 -30
  112. res2df-1.1.1/tests/data/reek/eclipse/include/props/sgof.txt +0 -58
  113. res2df-1.1.1/tests/data/reek/eclipse/include/props/swof.txt +0 -60
  114. {res2df-1.1.1 → res2df-1.2.0}/.codacy.yml +0 -0
  115. {res2df-1.1.1 → res2df-1.2.0}/.gitignore +0 -0
  116. {res2df-1.1.1 → res2df-1.2.0}/LICENSE +0 -0
  117. {res2df-1.1.1 → res2df-1.2.0}/docs/_static/equinor-logo.png +0 -0
  118. {res2df-1.1.1 → res2df-1.2.0}/docs/_static/equinor-logo2.jpg +0 -0
  119. {res2df-1.1.1 → res2df-1.2.0}/docs/_static/equinor_logo.jpg +0 -0
  120. {res2df-1.1.1 → res2df-1.2.0}/docs/_static/equinor_logo_only.jpg +0 -0
  121. {res2df-1.1.1 → res2df-1.2.0}/docs/_templates/layout.html +0 -0
  122. {res2df-1.1.1 → res2df-1.2.0}/docs/conf.py +0 -0
  123. {res2df-1.1.1 → res2df-1.2.0}/docs/contribution.rst +0 -0
  124. {res2df-1.1.1 → res2df-1.2.0}/docs/csv2res.rst +0 -0
  125. {res2df-1.1.1 → res2df-1.2.0}/docs/history.rst +0 -0
  126. {res2df-1.1.1 → res2df-1.2.0}/docs/index.rst +0 -0
  127. {res2df-1.1.1 → res2df-1.2.0}/docs/installation.rst +0 -0
  128. {res2df-1.1.1 → res2df-1.2.0}/docs/res2csv.rst +0 -0
  129. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/compdat.csv +0 -0
  130. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/compdat.rst +0 -0
  131. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/equil-example.csv +0 -0
  132. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/fipnum.inc +0 -0
  133. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/fipreports-example.csv +0 -0
  134. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/grid.csv +0 -0
  135. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/gruptree.csv +0 -0
  136. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/gruptreenet.csv +0 -0
  137. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/images/injectoranalysis.png +0 -0
  138. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/images/multibranch-rftanalysis.png +0 -0
  139. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/nnc.csv +0 -0
  140. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/outflow.csv +0 -0
  141. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/pillars-dyn1-stacked.csv +0 -0
  142. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/pillars-dyn1-unstacked.csv +0 -0
  143. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/pillars-example1.csv +0 -0
  144. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/pillars.rst +0 -0
  145. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/pvt.csv +0 -0
  146. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/rft_columns.csv +0 -0
  147. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/satfunc.csv +0 -0
  148. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/summary.csv +0 -0
  149. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/summary.rst +0 -0
  150. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/trans-boundaries.csv +0 -0
  151. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/trans-group.csv +0 -0
  152. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/trans1.csv +0 -0
  153. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/wcon.csv +0 -0
  154. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/wcon.rst +0 -0
  155. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/well_connection_status.csv +0 -0
  156. {res2df-1.1.1 → res2df-1.2.0}/docs/usage/wellconnstatus.rst +0 -0
  157. {res2df-1.1.1 → res2df-1.2.0}/docs/usage.rst +0 -0
  158. {res2df-1.1.1 → res2df-1.2.0}/mypy.ini +0 -0
  159. {res2df-1.1.1 → res2df-1.2.0}/py.typed +0 -0
  160. {res2df-1.1.1 → res2df-1.2.0}/res2df/__version__.py +0 -0
  161. {res2df-1.1.1 → res2df-1.2.0}/res2df/config_jobs/CSV2RES +0 -0
  162. {res2df-1.1.1 → res2df-1.2.0}/res2df/config_jobs/RES2CSV +0 -0
  163. {res2df-1.1.1 → res2df-1.2.0}/res2df/constants.py +0 -0
  164. {res2df-1.1.1 → res2df-1.2.0}/res2df/csv2res.py +0 -0
  165. {res2df-1.1.1 → res2df-1.2.0}/res2df/hook_implementations/__init__.py +0 -0
  166. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/BRANPROP +0 -0
  167. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/COMPDAT +0 -0
  168. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/COMPLUMP +0 -0
  169. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/COMPSEGS +0 -0
  170. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/DENSITY +0 -0
  171. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/EQLDIMS +0 -0
  172. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/EQUIL +0 -0
  173. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/FAULTS +0 -0
  174. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/GRUPNET +0 -0
  175. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/GRUPTREE +0 -0
  176. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/NODEPROP +0 -0
  177. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/PBVD +0 -0
  178. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/PDVD +0 -0
  179. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/PVDG +0 -0
  180. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/PVDO +0 -0
  181. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/PVTG +0 -0
  182. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/PVTO +0 -0
  183. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/PVTW +0 -0
  184. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/ROCK +0 -0
  185. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/RSVD +0 -0
  186. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/RVVD +0 -0
  187. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/SGFN +0 -0
  188. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/SGOF +0 -0
  189. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/SGWFN +0 -0
  190. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/SLGOF +0 -0
  191. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/SOF2 +0 -0
  192. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/SOF3 +0 -0
  193. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/SWFN +0 -0
  194. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/SWOF +0 -0
  195. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/TABDIMS +0 -0
  196. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/VFPINJ +0 -0
  197. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/VFPPROD +0 -0
  198. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/WCONHIST +0 -0
  199. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/WCONINJE +0 -0
  200. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/WCONINJH +0 -0
  201. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/WCONPROD +0 -0
  202. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/WELOPEN +0 -0
  203. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/WELSEGS +0 -0
  204. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/WELSPECS +0 -0
  205. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/WLIST +0 -0
  206. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/WSEGAICD +0 -0
  207. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/WSEGSICD +0 -0
  208. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/WSEGVALV +0 -0
  209. {res2df-1.1.1 → res2df-1.2.0}/res2df/opmkeywords/runmetoupdate.sh +0 -0
  210. {res2df-1.1.1 → res2df-1.2.0}/res2df/res2csvlogger.py +0 -0
  211. {res2df-1.1.1 → res2df-1.2.0}/res2df/resdatafiles.py +0 -0
  212. {res2df-1.1.1 → res2df-1.2.0}/res2df/svg_color_keyword_names.txt +0 -0
  213. {res2df-1.1.1 → res2df-1.2.0}/res2df/vfp/_vfpdefs.py +0 -0
  214. {res2df-1.1.1 → res2df-1.2.0}/res2df/wellcompletiondata.py +0 -0
  215. {res2df-1.1.1 → res2df-1.2.0}/res2df/wellconnstatus.py +0 -0
  216. {res2df-1.1.1 → res2df-1.2.0}/res2df.egg-info/dependency_links.txt +0 -0
  217. {res2df-1.1.1 → res2df-1.2.0}/res2df.egg-info/entry_points.txt +0 -0
  218. {res2df-1.1.1 → res2df-1.2.0}/res2df.egg-info/not-zip-safe +0 -0
  219. {res2df-1.1.1 → res2df-1.2.0}/res2df.egg-info/top_level.txt +0 -0
  220. {res2df-1.1.1 → res2df-1.2.0}/tests/__init__.py +0 -0
  221. {res2df-1.1.1 → res2df-1.2.0}/tests/data/eightcells/EIGHTCELLS.DATA +0 -0
  222. {res2df-1.1.1 → res2df-1.2.0}/tests/data/eightcells/EIGHTCELLS.EGRID +0 -0
  223. {res2df-1.1.1 → res2df-1.2.0}/tests/data/eightcells/EIGHTCELLS.INIT +0 -0
  224. {res2df-1.1.1 → res2df-1.2.0}/tests/data/eightcells/EIGHTCELLS.INSPEC +0 -0
  225. {res2df-1.1.1 → res2df-1.2.0}/tests/data/eightcells/EIGHTCELLS.RFT +0 -0
  226. {res2df-1.1.1 → res2df-1.2.0}/tests/data/eightcells/EIGHTCELLS.RSSPEC +0 -0
  227. {res2df-1.1.1 → res2df-1.2.0}/tests/data/eightcells/EIGHTCELLS.SMSPEC +0 -0
  228. {res2df-1.1.1 → res2df-1.2.0}/tests/data/eightcells/EIGHTCELLS.UNRST +0 -0
  229. {res2df-1.1.1 → res2df-1.2.0}/tests/data/eightcells/EIGHTCELLS.UNSMRY +0 -0
  230. {res2df-1.1.1 → res2df-1.2.0}/tests/data/eightcells/eightcells_duplicated_summary_vector/EIGHTCELLS_DUPES.DATA +0 -0
  231. {res2df-1.1.1 → res2df-1.2.0}/tests/data/eightcells/eightcells_duplicated_summary_vector/EIGHTCELLS_DUPES.SMSPEC +0 -0
  232. {res2df-1.1.1 → res2df-1.2.0}/tests/data/eightcells/eightcells_duplicated_summary_vector/EIGHTCELLS_DUPES.UNSMRY +0 -0
  233. {res2df-1.1.1 → res2df-1.2.0}/tests/data/eightcells/zones.lyr +0 -0
  234. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/grid/reek.multflt +0 -0
  235. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/grid/reek.perm +0 -0
  236. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/grid/reek.poro +0 -0
  237. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/props/reek.swatinit +0 -0
  238. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/regions/reek.eqlnum +0 -0
  239. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/regions/reek.fipnum +0 -0
  240. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/schedule/reek_history.sch +0 -0
  241. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/include/solution/reek.equil +0 -0
  242. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/model/2_R001_REEK-0-OPMFLOW.PRT +0 -0
  243. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/model/2_R001_REEK-0.EGRID +0 -0
  244. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/model/2_R001_REEK-0.INIT +0 -0
  245. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/model/2_R001_REEK-0.RFT +0 -0
  246. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/model/2_R001_REEK-0.SMSPEC +0 -0
  247. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/model/2_R001_REEK-0.UNRST +0 -0
  248. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/model/2_R001_REEK-0.UNSMRY +0 -0
  249. {res2df-1.1.1 → res2df-1.2.0}/tests/data/reek/eclipse/model/zones.lyr +0 -0
  250. {res2df-1.1.1 → res2df-1.2.0}/tests/data/timesteps/SHORT_STEP.DATA +0 -0
  251. {res2df-1.1.1 → res2df-1.2.0}/tests/data/timesteps/SHORT_STEP.SMSPEC +0 -0
  252. {res2df-1.1.1 → res2df-1.2.0}/tests/data/timesteps/SHORT_STEP.UNSMRY +0 -0
  253. {res2df-1.1.1 → res2df-1.2.0}/tests/data/timesteps/SHORT_STEP_LONG.DATA +0 -0
  254. {res2df-1.1.1 → res2df-1.2.0}/tests/data/timesteps/SHORT_STEP_LONG.SMSPEC +0 -0
  255. {res2df-1.1.1 → res2df-1.2.0}/tests/data/timesteps/SHORT_STEP_LONG.UNSMRY +0 -0
  256. {res2df-1.1.1 → res2df-1.2.0}/tests/data/timesteps/SHORT_STEP_WITH_TIMESTEP.DATA +0 -0
  257. {res2df-1.1.1 → res2df-1.2.0}/tests/data/timesteps/SHORT_STEP_WITH_TIMESTEP.SMSPEC +0 -0
  258. {res2df-1.1.1 → res2df-1.2.0}/tests/data/timesteps/SHORT_STEP_WITH_TIMESTEP.UNSMRY +0 -0
  259. {res2df-1.1.1 → res2df-1.2.0}/tests/data/timesteps/SHORT_STEP_WITH_TIMESTEP_LONG.DATA +0 -0
  260. {res2df-1.1.1 → res2df-1.2.0}/tests/data/timesteps/SHORT_STEP_WITH_TIMESTEP_LONG.SMSPEC +0 -0
  261. {res2df-1.1.1 → res2df-1.2.0}/tests/data/timesteps/SHORT_STEP_WITH_TIMESTEP_LONG.UNSMRY +0 -0
  262. {res2df-1.1.1 → res2df-1.2.0}/tests/test_init.py +0 -0
@@ -16,12 +16,16 @@ jobs:
16
16
  PYTHON: '3.8'
17
17
 
18
18
  steps:
19
- - uses: actions/checkout@master
19
+ - uses: actions/checkout@v4
20
20
 
21
21
  - name: Setup Python
22
- uses: actions/setup-python@master
22
+ uses: actions/setup-python@v5
23
23
  with:
24
24
  python-version: 3.8
25
+ cache: "pip"
26
+ cache-dependency-path: |
27
+ setup.py
28
+ test_requirements.txt
25
29
 
26
30
  - name: Install res2df
27
31
  run: |
@@ -19,17 +19,25 @@ jobs:
19
19
  runs-on: ubuntu-latest
20
20
  strategy:
21
21
  matrix:
22
- python-version: ['3.8', '3.9', '3.10']
23
- pandas-version: ['pandas<2', 'pandas>2']
22
+ python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
23
+ pandas-version: ['pandas>2']
24
24
  include:
25
25
  # For one of the Python versions we
26
26
  # install the extra dependency ert
27
27
  # (in order to not double the job matrix)
28
+
29
+ # Only test with pandas < 2 for py38 and py311
30
+ # No wheels for python3.12 for pandas<2
28
31
  - python-version: '3.8'
29
32
  install-ert: true
33
+ - python-version: '3.8'
34
+ pandas-version: 'pandas<2'
35
+ - python-version: '3.11'
36
+ pandas-version: 'pandas<2'
37
+
30
38
  steps:
31
39
  - name: Checkout commit locally
32
- uses: actions/checkout@v3
40
+ uses: actions/checkout@v4
33
41
 
34
42
  - name: Checkout tags
35
43
  # This seems necessary for setuptools_scm to be able to infer
@@ -37,30 +45,30 @@ jobs:
37
45
  run: git fetch --unshallow --tags
38
46
 
39
47
  - name: Set up Python ${{ matrix.python-version }}
40
- uses: actions/setup-python@v4
48
+ uses: actions/setup-python@v5
41
49
  with:
42
50
  python-version: ${{ matrix.python-version }}
51
+ cache: "pip"
52
+ cache-dependency-path: |
53
+ setup.py
54
+ test_requirements.txt
43
55
 
44
56
  - name: Install res2df with dependencies
45
57
  run: |
46
58
  pip install --upgrade pip
47
- pip install .
59
+ pip install ".[tests, docs]"
60
+
61
+ - name: Install numpy<2 if pandas<2
62
+ if: matrix.pandas-version == 'pandas<2'
63
+ run: pip install "numpy<2"
64
+
65
+ - name: Check pandas version
66
+ run: |
48
67
  pip install "${{matrix.pandas-version}}"
49
- python -c "import res2df"
50
68
 
51
69
  - name: Install ert
52
70
  if: matrix.install-ert
53
- run: pip install .[ert]
54
-
55
- - name: Install test dependencies
56
- run: pip install .[tests,docs]
57
-
58
- - name: Check code style and typing
59
- run: |
60
- black --check res2df tests setup.py docs/conf.py
61
- flake8 res2df tests
62
- isort --check-only --profile black res2df tests
63
- mypy res2df
71
+ run: pip install ".[ert]"
64
72
 
65
73
  - name: List all installed packages
66
74
  run: pip freeze
@@ -110,4 +118,3 @@ jobs:
110
118
  python -m pip install --upgrade setuptools wheel twine
111
119
  python setup.py sdist bdist_wheel
112
120
  twine upload dist/*
113
-
@@ -0,0 +1,42 @@
1
+ name: Style
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ - 'version-**'
8
+ pull_request:
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
13
+
14
+ jobs:
15
+ check-style:
16
+ timeout-minutes: 15
17
+ runs-on: ubuntu-latest
18
+ strategy:
19
+ matrix:
20
+ python-version: ['3.12']
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ with:
25
+ fetch-depth: 0
26
+
27
+ - name: Set up Python ${{ matrix.python-version }}
28
+ uses: actions/setup-python@v5
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+ cache: "pip"
32
+ cache-dependency-path: |
33
+ setup.py
34
+
35
+ - name: Install res2df with style dependencies
36
+ run: |
37
+ pip install ".[style]"
38
+
39
+ - name: Run style check
40
+ if: ${{ always() }}
41
+ run: |
42
+ SKIP=no-commit-to-branch pre-commit run --all-files --show-diff-on-failure
@@ -0,0 +1,42 @@
1
+ name: Typing
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ - 'version-**'
8
+ pull_request:
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
13
+
14
+ jobs:
15
+ check-style:
16
+ timeout-minutes: 15
17
+ runs-on: ubuntu-latest
18
+ strategy:
19
+ matrix:
20
+ python-version: ['3.12']
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ with:
25
+ fetch-depth: 0
26
+
27
+ - name: Set up Python ${{ matrix.python-version }}
28
+ uses: actions/setup-python@v5
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+ cache: "pip"
32
+ cache-dependency-path: |
33
+ setup.py
34
+ types_requirements.txt
35
+
36
+ - name: Install res2df with types dependencies
37
+ run: |
38
+ pip install ".[types]"
39
+
40
+ - name: Run mypy
41
+ run: |
42
+ mypy res2df
@@ -0,0 +1,20 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.6.0
4
+ hooks:
5
+ - id: no-commit-to-branch
6
+ args: ['--branch', 'master']
7
+ - id: check-yaml
8
+ - id: debug-statements
9
+ - id: end-of-file-fixer
10
+ - id: fix-encoding-pragma
11
+ args: [--remove]
12
+ - id: mixed-line-ending
13
+ - id: trailing-whitespace
14
+
15
+ - repo: https://github.com/astral-sh/ruff-pre-commit
16
+ rev: v0.5.7
17
+ hooks:
18
+ - id: ruff
19
+ args: [ --fix ]
20
+ - id: ruff-format
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: res2df
3
- Version: 1.1.1
3
+ Version: 1.2.0
4
4
  Summary: Convert reservoir simulator input and output to DataFrames
5
5
  Home-page: http://github.com/equinor/res2df
6
6
  Author: Håvard Berland
@@ -9,7 +9,7 @@ License: GPLv3
9
9
  Requires-Python: >=3.8
10
10
  Description-Content-Type: text/markdown
11
11
  License-File: LICENSE
12
- Requires-Dist: resdata>=4.0.0
12
+ Requires-Dist: resdata>=5.0.0-b0
13
13
  Requires-Dist: numpy
14
14
  Requires-Dist: opm>=2020.10.2
15
15
  Requires-Dist: pandas
@@ -17,43 +17,43 @@ Requires-Dist: pyarrow
17
17
  Requires-Dist: pyyaml>=5.1
18
18
  Requires-Dist: treelib
19
19
  Provides-Extra: tests
20
- Requires-Dist: black; extra == "tests"
21
- Requires-Dist: flake8; extra == "tests"
22
- Requires-Dist: isort; extra == "tests"
23
- Requires-Dist: mypy; extra == "tests"
24
20
  Requires-Dist: networkx; extra == "tests"
25
- Requires-Dist: pre-commit; extra == "tests"
26
21
  Requires-Dist: pytest; extra == "tests"
27
22
  Requires-Dist: pytest-cov; extra == "tests"
28
23
  Requires-Dist: pytest-mock; extra == "tests"
29
- Requires-Dist: types-PyYAML; extra == "tests"
30
- Requires-Dist: types-pkg_resources; extra == "tests"
31
- Requires-Dist: types-python-dateutil; extra == "tests"
24
+ Provides-Extra: style
25
+ Requires-Dist: pre-commit; extra == "style"
26
+ Provides-Extra: types
27
+ Requires-Dist: mypy; extra == "types"
28
+ Requires-Dist: types-PyYAML; extra == "types"
29
+ Requires-Dist: types-python-dateutil; extra == "types"
30
+ Requires-Dist: types-setuptools; extra == "types"
32
31
  Provides-Extra: docs
33
32
  Requires-Dist: autoapi; extra == "docs"
34
33
  Requires-Dist: ipython; extra == "docs"
35
34
  Requires-Dist: rstcheck; extra == "docs"
35
+ Requires-Dist: setuptools; extra == "docs"
36
36
  Requires-Dist: sphinx<7; extra == "docs"
37
37
  Requires-Dist: sphinx-argparse; extra == "docs"
38
38
  Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
39
39
  Requires-Dist: sphinx_rtd_theme; extra == "docs"
40
40
  Provides-Extra: ert
41
- Requires-Dist: ert>=2.38.0-b5; extra == "ert"
41
+ Requires-Dist: ert>=10.2.0b13; extra == "ert"
42
42
 
43
43
  [![Build Status](https://img.shields.io/github/workflow/status/equinor/res2df/res2df)](https://github.com/equinor/res2df/actions?query=workflow%3Ares2df)
44
44
  [![codecov](https://codecov.io/gh/equinor/res2df/graph/badge.svg?token=3sZBGGu5VG)](https://codecov.io/gh/equinor/res2df)
45
- [![Python 3.8-3.10](https://img.shields.io/badge/python-3.8%20|%203.9%20|%203.10-blue.svg)](https://www.python.org)
46
- [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://black.readthedocs.io/)
45
+ [![Python 3.8-3.12](https://img.shields.io/badge/python-3.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12-blue.svg)](https://www.python.org)
46
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
47
47
  [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
48
48
 
49
49
  # res2df
50
50
 
51
51
  res2df is a Pandas DataFrame wrapper around resdata and opm.io, which
52
- are used to access binary files outputted by reservoir simulators,
52
+ are used to access binary files outputted by reservoir simulators,
53
53
  or its input files --- or any other tool outputting to the same data format.
54
54
 
55
55
  The reverse operation, from a Pandas DataFrame to reservoir simulator include files
56
- (commonly given the extension ".inc", ".grdecl" etc.) is provided for some of the
56
+ (commonly given the extension ".inc", ".grdecl" etc.) is provided for some of the
57
57
  modules.
58
58
 
59
59
  The package consists of a module pr. datatype, e.g. one module for summary
@@ -1,17 +1,17 @@
1
1
  [![Build Status](https://img.shields.io/github/workflow/status/equinor/res2df/res2df)](https://github.com/equinor/res2df/actions?query=workflow%3Ares2df)
2
2
  [![codecov](https://codecov.io/gh/equinor/res2df/graph/badge.svg?token=3sZBGGu5VG)](https://codecov.io/gh/equinor/res2df)
3
- [![Python 3.8-3.10](https://img.shields.io/badge/python-3.8%20|%203.9%20|%203.10-blue.svg)](https://www.python.org)
4
- [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://black.readthedocs.io/)
3
+ [![Python 3.8-3.12](https://img.shields.io/badge/python-3.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12-blue.svg)](https://www.python.org)
4
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
5
5
  [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
6
6
 
7
7
  # res2df
8
8
 
9
9
  res2df is a Pandas DataFrame wrapper around resdata and opm.io, which
10
- are used to access binary files outputted by reservoir simulators,
10
+ are used to access binary files outputted by reservoir simulators,
11
11
  or its input files --- or any other tool outputting to the same data format.
12
12
 
13
13
  The reverse operation, from a Pandas DataFrame to reservoir simulator include files
14
- (commonly given the extension ".inc", ".grdecl" etc.) is provided for some of the
14
+ (commonly given the extension ".inc", ".grdecl" etc.) is provided for some of the
15
15
  modules.
16
16
 
17
17
  The package consists of a module pr. datatype, e.g. one module for summary
@@ -2,10 +2,6 @@ install_test_dependencies () {
2
2
  pip install -r test_requirements.txt
3
3
  }
4
4
 
5
- install_package () {
6
- pip install .[tests,docs]
7
- }
8
-
9
5
  start_tests () {
10
6
  pytest --run-eclipse-simulator
11
7
  }
@@ -4,7 +4,7 @@ Glossary
4
4
  .. glossary::
5
5
 
6
6
  reservoir simulator
7
- Simulation of reservoir fields come in many forms, but for the purposes of
7
+ Simulation of reservoir fields come in many forms, but for the purposes of
8
8
  res2df we only consider simulators that take a :term:`deck` as input and produces
9
9
  :term:`output files <output file>` such `.UNSRMY`. This includes, OPM flow and Eclipse.
10
10
 
@@ -20,7 +20,7 @@ Glossary
20
20
  deck
21
21
  Refers to inputs passed to reservoir simulators. It may be a :term:`.DATA file` and the
22
22
  include files it points to, or it may be a single or several include files.
23
- If a deck contains all the information (i.e., keywords) the simulator needs
23
+ If a deck contains all the information (i.e., keywords) the simulator needs
24
24
  to run the requested simulation, it is defined as complete. Otherwise it is incomplete.
25
25
 
26
26
  output file
@@ -95,7 +95,7 @@ More documentation on :doc:`usage/trans`.
95
95
  ``rft``
96
96
  ^^^^^^^
97
97
 
98
- Reads the `.RFT` files which are outputted by the
98
+ Reads the `.RFT` files which are outputted by the
99
99
  :term:`simulator <reservoir simulator>` when
100
100
  the `WRFTPLT` keyword is used, with details along wellbores.
101
101
 
@@ -54,7 +54,7 @@ one meter for compatibility, which you could do by the statements:
54
54
  Re-exporting tables to include-files
55
55
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56
56
 
57
- When you are done with the table, you can generate new
57
+ When you are done with the table, you can generate new
58
58
  :term:`include files <include file>` from your modified
59
59
  data by issuing
60
60
 
@@ -1,4 +1,4 @@
1
- REPORT 0 1 JAN 2000
1
+ REPORT 0 1 JAN 2000
2
2
  =================================
3
3
  : FIPZON REPORT REGION 2 :
4
4
  : PAV = 139.76 BARSA:
@@ -20,8 +20,3 @@ In this particular example, ``FIPZON`` was selected explicitly, either using the
20
20
  through an option to the :func:`res2df.fipreports.df` function.
21
21
 
22
22
  Using this module is easiest through ``res2csv fipreports``.
23
-
24
-
25
-
26
-
27
-
@@ -2,8 +2,8 @@ grid
2
2
  ----
3
3
 
4
4
  The grid module will extract static and dynamic cell properties from
5
- a grid
6
- (from the :term:`output files of reservoir simulators <output file>`).
5
+ a grid
6
+ (from the :term:`output files of reservoir simulators <output file>`).
7
7
  Each row in a returned dataframe represents one cell.
8
8
 
9
9
  Typical usage
@@ -78,4 +78,3 @@ the dataframe will get additional rows and columns:
78
78
  .. csv-table:: Dataframe from GRUPTREE, GRUPNET and WELSPECS
79
79
  :file: gruptreenet.csv
80
80
  :header-rows: 1
81
-
@@ -71,4 +71,3 @@ and the contents of the exported file can be:
71
71
  30 4 3 31 4 2 0.1 /
72
72
  30 4 4 31 4 1 0.1 /
73
73
  / -- 4 nnc connections, avg multiplier 0.1
74
-
@@ -70,7 +70,7 @@ Density values are easier to scale up or down to whatever is needed.
70
70
  Re-exporting tables to include files
71
71
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72
72
 
73
- When you are done with the table, you can generate new
73
+ When you are done with the table, you can generate new
74
74
  :term:`include files <include file>` from your modified data by issuing
75
75
 
76
76
  .. code-block:: python
@@ -84,4 +84,3 @@ and need to be catered for outside res2df.
84
84
 
85
85
  The last step can also be done using the ``csv2res`` command line utility
86
86
  if you dump to CSV from your Python code instead.
87
-
@@ -95,4 +95,3 @@ to represent ICD segments. The corresponding ``SEG*`` data for these ICD segment
95
95
  will be joined to the segment they are connected to, and have their ``SEG*`` data
96
96
  renamed to ``ICD*``. For understanding your ``ICD*`` data, look at the description of
97
97
  the analogue ``SEG*`` data above.
98
-
@@ -2,7 +2,7 @@ satfunc
2
2
  -------
3
3
 
4
4
  satfunc will extract saturation functions from :term:`.DATA files <.DATA file>` or from
5
- :term:`include files <include file>`, these are the keywords ``SWOF``, ``SGOF``,
5
+ :term:`include files <include file>`, these are the keywords ``SWOF``, ``SGOF``,
6
6
  ``SGWFN``, ``SWFN``, ``SOF2``, ``SGFN``, ``SOF3`` and ``SLGOF``.
7
7
 
8
8
  The data obtained from one invocation of the satfunc module will be put in one
@@ -122,4 +122,3 @@ where this last table can also be exported directly from the command line using
122
122
  .. code-block:: console
123
123
 
124
124
  res2csv trans MYDATADECK.DATA --vectors FIPNUM --nnc --group --output fipnuminterfaces.csv
125
-
@@ -1,9 +1,9 @@
1
1
  import importlib
2
2
  from typing import List
3
3
 
4
- from .__version__ import __version__
5
- from .res2csvlogger import getLogger_res2csv
6
- from .resdatafiles import ResdataFiles
4
+ from .__version__ import __version__ as __version__
5
+ from .res2csvlogger import getLogger_res2csv as getLogger_res2csv
6
+ from .resdatafiles import ResdataFiles as ResdataFiles
7
7
 
8
8
  SUBMODULES: List[str] = [
9
9
  "compdat",
@@ -540,17 +540,20 @@ def df2res(
540
540
  calling_module = inspect.getmodule(from_module[0])
541
541
  if dataframe.empty:
542
542
  raise ValueError("Empty dataframe")
543
- if consecutive is not None and consecutive in dataframe:
544
- if not (
543
+ if (
544
+ consecutive is not None
545
+ and consecutive in dataframe
546
+ and not (
545
547
  min(dataframe[consecutive]) == 1
546
548
  and len(dataframe[consecutive].unique()) == max(dataframe[consecutive])
547
- ):
548
- logger.critical(
549
- "%s inconsistent in input dataframe, got the values %s",
550
- consecutive,
551
- str(dataframe[consecutive].unique()),
552
- )
553
- raise ValueError
549
+ )
550
+ ):
551
+ logger.critical(
552
+ "%s inconsistent in input dataframe, got the values %s",
553
+ consecutive,
554
+ str(dataframe[consecutive].unique()),
555
+ )
556
+ raise ValueError
554
557
 
555
558
  # "KEYWORD" must always be in the dataframe:
556
559
  if "KEYWORD" not in dataframe:
@@ -816,7 +819,7 @@ def stack_on_colnames(
816
819
  """
817
820
  if not inplace:
818
821
  dframe = dframe.copy()
819
- tuplecolumns = list(map(lambda x: tuple(x.split(sep)), dframe.columns))
822
+ tuplecolumns = [tuple(x.split(sep)) for x in dframe.columns]
820
823
  if max(map(len, tuplecolumns)) < 2:
821
824
  logger.info("No columns to stack")
822
825
  return dframe
@@ -1,16 +1,17 @@
1
1
  """Parser and dataframe generator for the keywords:
2
- * COMPDAT
3
- * COMPLUMP
4
- * COMPSEGS
5
- * WELOPEN
6
- * WELSEGS
7
- * WLIST
8
- * WSEGAICD
9
- * WSEGSICD
10
- * WSEGVALV
2
+ * COMPDAT
3
+ * COMPLUMP
4
+ * COMPSEGS
5
+ * WELOPEN
6
+ * WELSEGS
7
+ * WLIST
8
+ * WSEGAICD
9
+ * WSEGSICD
10
+ * WSEGVALV
11
11
  """
12
12
 
13
13
  import argparse
14
+ import contextlib
14
15
  import datetime
15
16
  import logging
16
17
  from typing import Dict, List, Optional, Union
@@ -18,12 +19,9 @@ from typing import Dict, List, Optional, Union
18
19
  import numpy as np
19
20
  import pandas as pd
20
21
 
21
- try:
22
+ with contextlib.suppress(ImportError):
22
23
  # pylint: disable=unused-import
23
24
  import opm.io.deck
24
- except ImportError:
25
- # Allow parts of res2df to work without OPM:
26
- pass
27
25
 
28
26
  from .common import (
29
27
  get_wells_matching_template,
@@ -276,16 +274,16 @@ def deck2dfs(
276
274
  if "KEYWORD_IDX" in wsegvalv_df.columns:
277
275
  wsegvalv_df.drop(["KEYWORD_IDX"], axis=1, inplace=True)
278
276
 
279
- return dict(
280
- COMPDAT=compdat_df,
281
- COMPSEGS=compsegs_df,
282
- WELSEGS=welsegs_df,
283
- WELOPEN=welopen_df,
284
- WLIST=wlist_df,
285
- WSEGSICD=wsegsicd_df,
286
- WSEGAICD=wsegaicd_df,
287
- WSEGVALV=wsegvalv_df,
288
- )
277
+ return {
278
+ "COMPDAT": compdat_df,
279
+ "COMPSEGS": compsegs_df,
280
+ "WELSEGS": welsegs_df,
281
+ "WELOPEN": welopen_df,
282
+ "WLIST": wlist_df,
283
+ "WSEGSICD": wsegsicd_df,
284
+ "WSEGAICD": wsegaicd_df,
285
+ "WSEGVALV": wsegvalv_df,
286
+ }
289
287
 
290
288
 
291
289
  def expand_welopen(welopen_df: pd.DataFrame, compdat_df: pd.DataFrame) -> pd.DataFrame:
@@ -612,12 +610,14 @@ def expand_wlist(wlist_df: pd.DataFrame) -> pd.DataFrame:
612
610
  currentstate[wlist_record["NAME"]] = " ".join(
613
611
  sorted(wlist_record["WELLS"].split())
614
612
  )
615
- elif wlist_record["ACTION"] in ["ADD", "DEL"]:
616
- if wlist_record["NAME"] not in currentstate:
617
- raise ValueError(
618
- "WLIST ADD/DEL only works on existing well lists: "
619
- f"{str(wlist_record)}"
620
- )
613
+ elif (
614
+ wlist_record["ACTION"] in ["ADD", "DEL"]
615
+ and wlist_record["NAME"] not in currentstate
616
+ ):
617
+ raise ValueError(
618
+ "WLIST ADD/DEL only works on existing well lists: "
619
+ f"{str(wlist_record)}"
620
+ )
621
621
  if wlist_record["ACTION"] == "ADD":
622
622
  currentstate[wlist_record["NAME"]] = " ".join(
623
623
  sorted(
@@ -630,10 +630,8 @@ def expand_wlist(wlist_df: pd.DataFrame) -> pd.DataFrame:
630
630
  if wlist_record["ACTION"] == "DEL":
631
631
  currentstate[wlist_record["NAME"]] = " ".join(
632
632
  sorted(
633
- list(
634
- set(currentstate[wlist_record["NAME"]].split())
635
- - set(wlist_record["WELLS"].split())
636
- )
633
+ set(currentstate[wlist_record["NAME"]].split())
634
+ - set(wlist_record["WELLS"].split())
637
635
  )
638
636
  )
639
637
  if wlist_record["ACTION"] == "MOV":
@@ -641,25 +639,16 @@ def expand_wlist(wlist_df: pd.DataFrame) -> pd.DataFrame:
641
639
  currentstate[wlist_record["NAME"]] = ""
642
640
  currentstate[wlist_record["NAME"]] = " ".join(
643
641
  sorted(
644
- list(
645
- set(currentstate[wlist_record["NAME"]].split()).union(
646
- set(wlist_record["WELLS"].split())
647
- )
642
+ set(currentstate[wlist_record["NAME"]].split()).union(
643
+ set(wlist_record["WELLS"].split())
648
644
  )
649
645
  )
650
646
  )
651
- for (
652
- wlist
653
- ) in currentstate.keys(): # pylint: disable=consider-iterating-dictionary
647
+ for wlist, value in currentstate.items():
654
648
  if wlist == wlist_record["NAME"]:
655
649
  continue
656
650
  currentstate[wlist] = " ".join(
657
- sorted(
658
- list(
659
- set(currentstate[wlist].split())
660
- - set(wlist_record["WELLS"].split())
661
- )
662
- )
651
+ sorted(set(value.split()) - set(wlist_record["WELLS"].split()))
663
652
  )
664
653
 
665
654
  # Dump final state:
@@ -857,11 +846,10 @@ def applywelopen(
857
846
  if isinstance(wlist_df, pd.DataFrame):
858
847
  if wlist_df.empty:
859
848
  wlist_df = None
860
- else:
861
- if set(wlist_df["ACTION"]) != {"NEW"}:
862
- raise ValueError(
863
- "The WLIST dataframe must be expanded through expand_wlist()"
864
- )
849
+ elif set(wlist_df["ACTION"]) != {"NEW"}:
850
+ raise ValueError(
851
+ "The WLIST dataframe must be expanded through expand_wlist()"
852
+ )
865
853
 
866
854
  welopen_df = welopen_df.astype(object).where(pd.notnull(welopen_df), None)
867
855
  welopen_df = expand_wlist_in_welopen_df(welopen_df, wlist_df)
@@ -869,8 +857,8 @@ def applywelopen(
869
857
 
870
858
  for _, row in welopen_df.iterrows():
871
859
  acts_on_well = False
872
- if (row["I"] is None and row["J"] is None and row["K"] is None) or (
873
- row["I"] <= 0 and row["J"] <= 0 and row["K"] <= 0
860
+ if all(x is None for x in (row["I"], row["J"], row["K"])) or all(
861
+ x <= 0 for x in (row["I"], row["J"], row["K"])
874
862
  ):
875
863
  # Applies to all connections when the completion range
876
864
  # is set zero or negative.