Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename to res2df #462

Merged
merged 68 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
6d0e944
ecl2df->res2df
Nov 14, 2023
06ae725
ecl2csv->res2csv
Nov 14, 2023
25dad26
csv2ecl->csv2res
Nov 14, 2023
16b4367
eclfile -> resdatafile
Nov 14, 2023
d7f8924
Eclipse deck -> input deck
Nov 14, 2023
1dad475
ecl2arrow->res2arrow
Nov 14, 2023
0114cc9
ecl2->res2
Nov 14, 2023
5f8572b
an Eclipse record -> a resdata record
Nov 14, 2023
c527580
Eclipse keyword -> resdata keyword
Nov 14, 2023
8c35b59
Eclipse include file -> resdata include file
Nov 14, 2023
674721b
Eclipse DATA -> Reservoir DATA
Nov 14, 2023
2f04e4f
df2ecl->df2res
Nov 14, 2023
aacd22d
Rename in common.py
Nov 14, 2023
e80d4a2
eclsum->summary
Nov 15, 2023
34a274f
ecl_unit_system->unit_system
Nov 15, 2023
d2f9862
Reservoir files -> Reservoir simulator input decks
Nov 15, 2023
a87291e
ecl_str -> deck_str
Nov 15, 2023
74397c3
Update glossary
Nov 15, 2023
a8e1f59
Eclipse PRT -> PRT
Nov 15, 2023
21512f7
Remove Eclipse from grid doc
Nov 15, 2023
e9fa1be
Update some more .rst files
Nov 15, 2023
52f3010
Remove/replace unnecessary eclipse occurrences
Nov 15, 2023
2325fe8
libecl->resdata
Nov 15, 2023
f2649fa
resdata include files -> include files
Nov 15, 2023
782854b
Use *with res2df format
Nov 16, 2023
a6c6b3f
ecldeck->deck
Nov 16, 2023
1adc2eb
use phrase "include file"
Nov 16, 2023
c06b4be
ecl2df.yml->res2df.yml
Nov 16, 2023
fa8e365
Call OPM "OPM Flow"
Nov 16, 2023
332a568
Include lower case include file notations
Nov 16, 2023
f7c7959
Fix smaller doc errors
Nov 16, 2023
44dd565
Bump date & version of fipnum.inc
Nov 16, 2023
5700703
Use .DATA file consistently
Nov 16, 2023
ae41aad
Add reservoir simulator output file to glossary
Nov 16, 2023
668312e
EclFile/EclGrid -> res sim output files
Nov 16, 2023
2c9d028
Remove ECLBASE mention in res2csv EXAMPLES str
Nov 16, 2023
bc1acf8
result files to output files
Nov 16, 2023
971331a
deck_or_eclpath->deckpath
Nov 16, 2023
ad13987
rst link .DATA_FILE
Nov 16, 2023
a2167a2
Describe deck in glossary
Nov 16, 2023
262947e
Add links to csv2res.rst
Nov 16, 2023
dea0081
Add links to index.rst
Nov 16, 2023
49af8cf
Add links to introduction.rst
Nov 16, 2023
429ffdc
Add links to res2csv.rst
Nov 16, 2023
d457a55
Add links to usage/*.rst
Nov 16, 2023
9728ab2
Try term in py code .DATA file
Nov 17, 2023
0918a8c
.DATA file -> :term:`.DATA file`
Nov 17, 2023
23bd2f0
output files -> :term`output files`
Nov 17, 2023
838bcc2
include file -> :term:`include file`
Nov 17, 2023
1920f36
Full deck/.DATA file -> Complete deck
Nov 17, 2023
07feab4
Link to deck
Nov 17, 2023
49ed0e1
Fix RES2CSV casing
Nov 17, 2023
cae4acd
resdata keyword -> keyword
Nov 17, 2023
1f08f18
Remove TODO (full/not full described in deck)
Nov 17, 2023
5bcb38f
Fix some typos
Nov 17, 2023
b70ee48
fixup an->a grammar
Nov 17, 2023
56ae3d4
Give some include file examples
Nov 17, 2023
67cf99e
Use consistent notation for .DATA file
Nov 20, 2023
a02db6e
fix some docstrings
Nov 20, 2023
69e2285
include string -> include file content
Nov 21, 2023
d67b2f0
Print X keyword with data ->
Nov 21, 2023
dff35bf
Produce a string representing ->
Nov 21, 2023
cb01156
input file->include file oops
Nov 21, 2023
763bee9
Clarify some glossary terms
Nov 21, 2023
b383910
Reword description of compdat
Nov 21, 2023
00c0ea8
Fix satfunc doc wording
Nov 21, 2023
71fc136
Fix wording UNSMRY files
Nov 21, 2023
972b3ef
Reservoir .DATA file -> simulator input .DATA file
Nov 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
24 changes: 12 additions & 12 deletions .github/workflows/ecl2df.yml → .github/workflows/res2df.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ecl2df
name: res2df

on:
push:
Expand All @@ -15,7 +15,7 @@ env:
ERT_SHOW_BACKTRACE: 1

jobs:
ecl2df:
res2df:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
\#*
.\#*
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PYLINT: General settings for ecl2df
# PYLINT: General settings for res2df

[GENERAL]
disable=R0205, F0010, C0330, E1136, E0401,C0114
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
eivindjahren marked this conversation as resolved.
Show resolved Hide resolved
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 <https://equinor.github.io/ecl2df/>
For documentation, see <https://equinor.github.io/res2df/>

## License

Expand Down
20 changes: 10 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---------------------------------------------------
Expand All @@ -50,7 +50,7 @@
"sphinxarg.ext",
]

autoapi_modules: dict = {"ecl2df": None}
autoapi_modules: dict = {"res2df": None}

autodoc_default_options = {"members": None}

Expand Down Expand Up @@ -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 ------------------------------------------------
Expand All @@ -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 ----------------------------------------------
Expand All @@ -159,10 +159,10 @@
texinfo_documents = [
(
master_doc,
"ecl2df",
"ecl2df Documentation",
"res2df",
"res2df Documentation",
author,
"ecl2df",
"res2df",
"One line description of project.",
"Miscellaneous",
)
Expand Down
36 changes: 18 additions & 18 deletions docs/contribution.rst
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
======================
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 [email protected]:<youraccount>/ecl2df
cd ecl2df
git clone [email protected]:<youraccount>/res2df
cd res2df

Then add the upstream repository:

.. code-block:: console

git remote add upstream [email protected]:equinor/ecl2df
git remote add upstream [email protected]: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`` :

.. code-block:: console

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
Expand Down Expand Up @@ -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.

Expand All @@ -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``
Expand All @@ -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.
Expand Down
22 changes: 0 additions & 22 deletions docs/csv2ecl.rst

This file was deleted.

22 changes: 22 additions & 0 deletions docs/csv2res.rst
Original file line number Diff line number Diff line change
@@ -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
13 changes: 0 additions & 13 deletions docs/ecl2csv.rst

This file was deleted.

Loading