diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml
index 71688375e..599ff0b54 100644
--- a/.github/workflows/codecov.yml
+++ b/.github/workflows/codecov.yml
@@ -23,16 +23,16 @@ jobs:
with:
python-version: 3.8
- - name: Install ecl2df
+ - name: Install res2df
run: |
pip install pip -U
pip install .[tests,ert]
- name: Generate coverage report and upload
run: |
- pytest tests --disable-warnings --cov=ecl2df --cov-report=xml
- # Uninstall packages that ecl2df supports not being installed:
+ pytest tests --disable-warnings --cov=res2df --cov-report=xml
+ # Uninstall packages that res2df supports not being installed:
pip uninstall --yes ert networkx opm
# Run tests again in cov-append-mode:
- pytest tests --disable-warnings --cov=ecl2df --cov-report=xml --cov-append
+ pytest tests --disable-warnings --cov=res2df --cov-report=xml --cov-append
bash <(curl -s https://codecov.io/bash)
diff --git a/.github/workflows/ecl2df.yml b/.github/workflows/res2df.yml
similarity index 83%
rename from .github/workflows/ecl2df.yml
rename to .github/workflows/res2df.yml
index 1eaa793e0..bd0fbee9a 100644
--- a/.github/workflows/ecl2df.yml
+++ b/.github/workflows/res2df.yml
@@ -1,4 +1,4 @@
-name: ecl2df
+name: res2df
on:
push:
@@ -15,7 +15,7 @@ env:
ERT_SHOW_BACKTRACE: 1
jobs:
- ecl2df:
+ res2df:
runs-on: ubuntu-latest
strategy:
matrix:
@@ -40,11 +40,11 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- - name: Install ecl2df with dependencies
+ - name: Install res2df with dependencies
run: |
pip install --upgrade pip
pip install .
- python -c "import ecl2df"
+ python -c "import res2df"
- name: Install ert
if: matrix.install-ert
@@ -55,17 +55,17 @@ jobs:
- name: Check code style and typing
run: |
- black --check ecl2df tests setup.py docs/conf.py
- flake8 ecl2df tests
- isort --check-only --profile black ecl2df tests
- mypy ecl2df
+ black --check res2df tests setup.py docs/conf.py
+ flake8 res2df tests
+ isort --check-only --profile black res2df tests
+ mypy res2df
- name: List all installed packages
run: pip freeze
- name: Run tests
run: |
- python -c "import ecl2df"
+ python -c "import res2df"
pytest tests/
- name: Syntax check documentation
@@ -81,8 +81,8 @@ jobs:
run: |
cp -R ./build/sphinx/html ../html
- git config --local user.email "ecl2df-github-action"
- git config --local user.name "ecl2df-github-action"
+ git config --local user.email "res2df-github-action"
+ git config --local user.name "res2df-github-action"
git fetch origin gh-pages
git checkout --track origin/gh-pages
git clean -f -f -d -x
@@ -103,7 +103,7 @@ jobs:
if: github.event_name == 'release' && matrix.python-version == '3.8'
env:
TWINE_USERNAME: __token__
- TWINE_PASSWORD: ${{ secrets.ecl2df_pypi_token }}
+ TWINE_PASSWORD: ${{ secrets.res2df_pypi_token }}
run: |
python -m pip install --upgrade setuptools wheel twine
python setup.py sdist bdist_wheel
diff --git a/.gitignore b/.gitignore
index 7deb22b05..fe6149219 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,13 +1,13 @@
.eggs
.cache
.coverage
-ecl2df.egg-info
+res2df.egg-info
.tox
*.swp
*.pyc
*~
docs/modules.rst
-docs/ecl2df.rst
-ecl2df/version.py
+docs/res2df.rst
+res2df/version.py
\#*
.\#*
diff --git a/.pylintrc b/.pylintrc
index ee7791fa6..aafe0859c 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -1,4 +1,4 @@
-# PYLINT: General settings for ecl2df
+# PYLINT: General settings for res2df
[GENERAL]
disable=R0205, F0010, C0330, E1136, E0401,C0114
diff --git a/README.md b/README.md
index 5d265bfad..9a06b3332 100644
--- a/README.md
+++ b/README.md
@@ -1,30 +1,30 @@
-[![Build Status](https://img.shields.io/github/workflow/status/equinor/ecl2df/ecl2df)](https://github.com/equinor/ecl2df/actions?query=workflow%3Aecl2df)
-[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/equinor/ecl2df.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/equinor/ecl2df/context:python)
-[![Total alerts](https://img.shields.io/lgtm/alerts/g/equinor/ecl2df.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/equinor/ecl2df/alerts/)
-[![codecov](https://codecov.io/gh/equinor/ecl2df/branch/master/graph/badge.svg)](https://codecov.io/gh/equinor/ecl2df)
+[![Build Status](https://img.shields.io/github/workflow/status/equinor/res2df/res2df)](https://github.com/equinor/res2df/actions?query=workflow%3Ares2df)
+[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/equinor/res2df.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/equinor/res2df/context:python)
+[![Total alerts](https://img.shields.io/lgtm/alerts/g/equinor/res2df.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/equinor/res2df/alerts/)
+[![codecov](https://codecov.io/gh/equinor/res2df/branch/master/graph/badge.svg)](https://codecov.io/gh/equinor/res2df)
[![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)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://black.readthedocs.io/)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
-# ecl2df
+# res2df
-ecl2df is a Pandas DataFrame wrapper around libecl and opm.io, which
-are used to access binary files outputted by the reservoir simulator
-Eclipse, or its input files --- or any other tool outputting to the same
-data format.
+res2df is a Pandas DataFrame wrapper around resdata and opm.io, which
+are used to access binary files outputted by reservoir simulators,
+or its input files --- or any other tool outputting to the same data format.
-The reverse operation, from a Pandas DataFrame to Eclipse include files,
-is provided for some of the modules.
+The reverse operation, from a Pandas DataFrame to reservoir simulator include files
+(commonly given the extension ".inc", ".grdecl" etc.) is provided for some of the
+modules.
The package consists of a module pr. datatype, e.g. one module for summary
files (.UNSMRY), one for completion data etc.
There is a command line frontend for almost all functionality, called
-`ecl2csv`, which converts the Eclipse data to DataFrames, and then dumps
-the dataframes to files in CSV format, and a similar `csv2ecl` for the
+`res2csv`, which converts the reservoir data to DataFrames, and then dumps
+the dataframes to files in CSV format, and a similar `csv2res` for the
reverse operation.
-For documentation, see
+For documentation, see
## License
diff --git a/docs/conf.py b/docs/conf.py
index 4d3297f8a..e7ba8b232 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -19,14 +19,14 @@
# -- Project information -----------------------------------------------------
-project = "ecl2df"
+project = "res2df"
author = "Håvard Berland"
copyright = f"Equinor 2019-{datetime.datetime.now().year}"
# The short X.Y version
-import ecl2df # noqa
+import res2df # noqa
-release = metadata.version("ecl2df")
+release = metadata.version("res2df")
version = release
# -- General configuration ---------------------------------------------------
@@ -50,7 +50,7 @@
"sphinxarg.ext",
]
-autoapi_modules: dict = {"ecl2df": None}
+autoapi_modules: dict = {"res2df": None}
autodoc_default_options = {"members": None}
@@ -118,7 +118,7 @@
# -- Options for HTMLHelp output ---------------------------------------------
# Output file base name for HTML help builder.
-htmlhelp_basename = "ecl2dfdoc"
+htmlhelp_basename = "res2dfdoc"
# -- Options for LaTeX output ------------------------------------------------
@@ -141,14 +141,14 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
-latex_documents = [(master_doc, "ecl2df.tex", "ecl2df Documentation", author, "manual")]
+latex_documents = [(master_doc, "res2df.tex", "res2df Documentation", author, "manual")]
# -- Options for manual page output ------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
-man_pages = [(master_doc, "ecl2df", "ecl2df Documentation", [author], 1)]
+man_pages = [(master_doc, "res2df", "res2df Documentation", [author], 1)]
# -- Options for Texinfo output ----------------------------------------------
@@ -159,10 +159,10 @@
texinfo_documents = [
(
master_doc,
- "ecl2df",
- "ecl2df Documentation",
+ "res2df",
+ "res2df Documentation",
author,
- "ecl2df",
+ "res2df",
"One line description of project.",
"Miscellaneous",
)
diff --git a/docs/contribution.rst b/docs/contribution.rst
index 0ad8b9bbe..8d13419e2 100644
--- a/docs/contribution.rst
+++ b/docs/contribution.rst
@@ -1,41 +1,41 @@
======================
-Contributing to ecl2df
+Contributing to res2df
======================
-Contributing to ecl2df is easiest on Linux computers. Windows has not been
+Contributing to res2df is easiest on Linux computers. Windows has not been
tested, and for Mac you will have to compile OPM yourself.
Getting started as a developer
------------------------------
-The first thing to do, is to create a fork of ecl2df to your personal
-github account. Go to https://github.com/equinor/ecl2df and click the Fork
+The first thing to do, is to create a fork of res2df to your personal
+github account. Go to https://github.com/equinor/res2df and click the Fork
button.
Clone your fork to your local computer:
.. code-block:: console
- git clone git@github.com:/ecl2df
- cd ecl2df
+ git clone git@github.com:/res2df
+ cd res2df
Then add the upstream repository:
.. code-block:: console
- git remote add upstream git@github.com:equinor/ecl2df
+ git remote add upstream git@github.com:equinor/res2df
This requires a valid login setup with SSH keys for you github account, needed
for write access.
After cloning, you should make a Python virtual environment in which you install
-ecl2df and its dependencies. If you want to create a new virtual environment for
-ecl2df, you can do something like the following:
+res2df and its dependencies. If you want to create a new virtual environment for
+res2df, you can do something like the following:
.. code-block:: console
- python3 -m venv venv-ecl2df
- source venv-ecl2df/bin/activate
+ python3 -m venv venv-res2df
+ source venv-res2df/bin/activate
and then run ``pip`` :
@@ -43,7 +43,7 @@ and then run ``pip`` :
pip install -e .[tests,docs]
-to install ecl2df in "edit"-mode together will all dependencies for ecl2df, its
+to install res2df in "edit"-mode together will all dependencies for res2df, its
test suite and documentation.
A good start is to verify that all tests pass after having cloned the
@@ -73,13 +73,13 @@ Komodo in order to prepare for the command:
NB: For every monthly Komodo release, you might have to remake your komodo-venv.
-Using ecl2df without OPM
+Using res2df without OPM
------------------------
-OPM is only pip-installable on Linux. To use the non-OPM dependent ecl2df
-modules on something else than Linux (but with libecl installed), you should
+OPM is only pip-installable on Linux. To use the non-OPM dependent res2df
+modules on something else than Linux (but with resdata installed), you should
install all the dependencies (except OPM) using ``pip`` (see ``setup.py`` for
-list of dependencies), and then install ecl2df with the ``--no-deps`` option
+list of dependencies), and then install res2df with the ``--no-deps`` option
to ``pip``. After this, the non-OPM dependent modules should work, and others will
fail with import errors.
@@ -88,7 +88,7 @@ Development workflow
If you have a feature or bugfix, a typical procedure is to:
-* Consider writing an issue on https://github.com/equinor/ecl2df/issues describing
+* Consider writing an issue on https://github.com/equinor/res2df/issues describing
what is not working or what is not present.
* Make a new git branch for your contribution, from an updated master branch.
* Write a test for the feature or a test proving the bug. Verify that ``pytest``
@@ -100,7 +100,7 @@ If you have a feature or bugfix, a typical procedure is to:
* Check your code quality with pylint. New code should aim for maximal pylint
score. Pylint exceptions should only be used when warranted.
* Commit your changes, remember to add any new files.
-* Push your branch to your fork on github, and go to github.com/equinor/ecl2df
+* Push your branch to your fork on github, and go to github.com/equinor/res2df
and make a pull request from your branch. Link your pull request to any
relevant issue.
* Fix any errors that pop up from automated checks.
diff --git a/docs/csv2ecl.rst b/docs/csv2ecl.rst
deleted file mode 100644
index 9087a99a7..000000000
--- a/docs/csv2ecl.rst
+++ /dev/null
@@ -1,22 +0,0 @@
-csv2ecl
-=======
-
-Some of the modules inside ecl2df is able to write Eclipse include files
-from dataframes (in the format dumped by ecl2df). This makes it possible
-to produce Eclipse input data in any application that can write CSV files,
-and use this tool to convert it into Eclipse include files, or it can
-facilitate operations/manipulations of an existing deck using any tool
-that can work on CSV files, by first running ecl2csv on an input file,
-transforming it, and writing back using csv2ecl.
-
-Mandatory argument for csv2ecl is
-always the submodule responsible, a CSV file, and
-an ``--output`` option to specify which include file to write to.
-If you want output to your terminal, use ``-`` as the output filename. Unless
-you also specify the ``--keywords`` argument with a list of wanted keywords, all
-supported keywords for a submodule which is also found in the CSV file provided,
-will be dumped to output file.
-
-.. argparse::
- :ref: ecl2df.csv2ecl.get_parser
- :prog: csv2ecl
diff --git a/docs/csv2res.rst b/docs/csv2res.rst
new file mode 100644
index 000000000..7ad27649a
--- /dev/null
+++ b/docs/csv2res.rst
@@ -0,0 +1,22 @@
+csv2res
+=======
+
+Some of the modules inside res2df is able to write :term:`.DATA files<.DATA file>`
+from dataframes (in the format dumped by res2df). This makes it possible
+to produce :term:`.DATA files<.DATA file>` in any application that can write CSV files,
+and use this tool to convert it into reservoir simulator files, or it can
+facilitate operations/manipulations of an existing :term:`deck` using any tool
+that can work on CSV files, by first running res2csv on an :term:`include file`,
+transforming it, and writing back using csv2res.
+
+Mandatory argument for csv2res is
+always the submodule responsible, a CSV file, and
+an ``--output`` option to specify which include file to write to.
+If you want output to your terminal, use ``-`` as the output filename. Unless
+you also specify the ``--keywords`` argument with a list of wanted keywords, all
+supported keywords for a submodule which is also found in the CSV file provided,
+will be dumped to an :term:`output file`.
+
+.. argparse::
+ :ref: res2df.csv2res.get_parser
+ :prog: csv2res
diff --git a/docs/ecl2csv.rst b/docs/ecl2csv.rst
deleted file mode 100644
index 89f125e46..000000000
--- a/docs/ecl2csv.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-ecl2csv
-=======
-
-Most of the functionality in ecl2df is exposed to the command line through
-the script *ecl2csv*. The first argument to this script is always
-the submodule (subcommand) from which you want functionality. Mandatory argument is
-always an Eclipse deck or sometimes individual Eclipse include files, and
-there is usually an ``--output`` option to specify which file to dump
-the CSV to. If you want output to your terminal, use ``-`` as the output filename.
-
-.. argparse::
- :ref: ecl2df.ecl2csv.get_parser
- :prog: ecl2csv
diff --git a/docs/glossary.rst b/docs/glossary.rst
new file mode 100644
index 000000000..e6ed5b095
--- /dev/null
+++ b/docs/glossary.rst
@@ -0,0 +1,29 @@
+Glossary
+========
+
+.. glossary::
+
+ reservoir simulator
+ Simulation of reservoir fields come in many forms, but for the purposes of
+ res2df we only consider simulators that take a :term:`deck` as input and produces
+ :term:`output files