Skip to content

Commit

Permalink
Run ruff format and updated pre-commit on all files
Browse files Browse the repository at this point in the history
  • Loading branch information
larsevj committed Aug 14, 2024
1 parent ce97ec5 commit ee06193
Show file tree
Hide file tree
Showing 39 changed files with 9,627 additions and 9,647 deletions.
1 change: 0 additions & 1 deletion .github/workflows/res2df.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,3 @@ jobs:
python -m pip install --upgrade setuptools wheel twine
python setup.py sdist bdist_wheel
twine upload dist/*
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:
- name: Run style check
if: ${{ always() }}
run: |
SKIP=no-commit-to-branch pre-commit run --all-files --show-diff-on-failure
SKIP=no-commit-to-branch pre-commit run --all-files --show-diff-on-failure
2 changes: 1 addition & 1 deletion .github/workflows/typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
- name: Run mypy
run: |
mypy res2df
mypy res2df
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
# res2df

res2df is a Pandas DataFrame wrapper around resdata and opm.io, which
are used to access binary files outputted by reservoir simulators,
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 reservoir simulator include files
(commonly given the extension ".inc", ".grdecl" etc.) is provided for some of the
(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
Expand Down
4 changes: 2 additions & 2 deletions docs/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Glossary
.. glossary::

reservoir simulator
Simulation of reservoir fields come in many forms, but for the purposes of
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 <output file>` such `.UNSRMY`. This includes, OPM flow and Eclipse.

Expand All @@ -20,7 +20,7 @@ Glossary
deck
Refers to inputs passed to reservoir simulators. It may be a :term:`.DATA file` and the
include files it points to, or it may be a single or several include files.
If a deck contains all the information (i.e., keywords) the simulator needs
If a deck contains all the information (i.e., keywords) the simulator needs
to run the requested simulation, it is defined as complete. Otherwise it is incomplete.

output file
Expand Down
2 changes: 1 addition & 1 deletion docs/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ More documentation on :doc:`usage/trans`.
``rft``
^^^^^^^

Reads the `.RFT` files which are outputted by the
Reads the `.RFT` files which are outputted by the
:term:`simulator <reservoir simulator>` when
the `WRFTPLT` keyword is used, with details along wellbores.

Expand Down
2 changes: 1 addition & 1 deletion docs/usage/equil.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ one meter for compatibility, which you could do by the statements:
Re-exporting tables to include-files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When you are done with the table, you can generate new
When you are done with the table, you can generate new
:term:`include files <include file>` from your modified
data by issuing

Expand Down
2 changes: 1 addition & 1 deletion docs/usage/fipreports-example.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REPORT 0 1 JAN 2000
REPORT 0 1 JAN 2000
=================================
: FIPZON REPORT REGION 2 :
: PAV = 139.76 BARSA:
Expand Down
5 changes: 0 additions & 5 deletions docs/usage/fipreports.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,3 @@ In this particular example, ``FIPZON`` was selected explicitly, either using the
through an option to the :func:`res2df.fipreports.df` function.

Using this module is easiest through ``res2csv fipreports``.





4 changes: 2 additions & 2 deletions docs/usage/grid.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ grid
----

The grid module will extract static and dynamic cell properties from
a grid
(from the :term:`output files of reservoir simulators <output file>`).
a grid
(from the :term:`output files of reservoir simulators <output file>`).
Each row in a returned dataframe represents one cell.

Typical usage
Expand Down
1 change: 0 additions & 1 deletion docs/usage/gruptree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,3 @@ the dataframe will get additional rows and columns:
.. csv-table:: Dataframe from GRUPTREE, GRUPNET and WELSPECS
:file: gruptreenet.csv
:header-rows: 1

1 change: 0 additions & 1 deletion docs/usage/nnc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,3 @@ and the contents of the exported file can be:
30 4 3 31 4 2 0.1 /
30 4 4 31 4 1 0.1 /
/ -- 4 nnc connections, avg multiplier 0.1
3 changes: 1 addition & 2 deletions docs/usage/pvt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Density values are easier to scale up or down to whatever is needed.
Re-exporting tables to include files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When you are done with the table, you can generate new
When you are done with the table, you can generate new
:term:`include files <include file>` from your modified data by issuing

.. code-block:: python
Expand All @@ -84,4 +84,3 @@ and need to be catered for outside res2df.

The last step can also be done using the ``csv2res`` command line utility
if you dump to CSV from your Python code instead.

1 change: 0 additions & 1 deletion docs/usage/rft.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,3 @@ to represent ICD segments. The corresponding ``SEG*`` data for these ICD segment
will be joined to the segment they are connected to, and have their ``SEG*`` data
renamed to ``ICD*``. For understanding your ``ICD*`` data, look at the description of
the analogue ``SEG*`` data above.

2 changes: 1 addition & 1 deletion docs/usage/satfunc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ satfunc
-------

satfunc will extract saturation functions from :term:`.DATA files <.DATA file>` or from
:term:`include files <include file>`, these are the keywords ``SWOF``, ``SGOF``,
:term:`include files <include file>`, these are the keywords ``SWOF``, ``SGOF``,
``SGWFN``, ``SWFN``, ``SOF2``, ``SGFN``, ``SOF3`` and ``SLGOF``.

The data obtained from one invocation of the satfunc module will be put in one
Expand Down
1 change: 0 additions & 1 deletion docs/usage/trans.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,3 @@ where this last table can also be exported directly from the command line using
.. code-block:: console
res2csv trans MYDATADECK.DATA --vectors FIPNUM --nnc --group --output fipnuminterfaces.csv
6 changes: 3 additions & 3 deletions res2df/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import importlib
from typing import List

from .__version__ import __version__
from .res2csvlogger import getLogger_res2csv
from .resdatafiles import ResdataFiles
from .__version__ import __version__ as __version__
from .res2csvlogger import getLogger_res2csv as getLogger_res2csv
from .resdatafiles import ResdataFiles as ResdataFiles

SUBMODULES: List[str] = [
"compdat",
Expand Down
3 changes: 1 addition & 2 deletions res2df/opmkeywords/readme
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
This directory contains JSON files downloaded from
https://github.com/OPM/opm-common/tree/master/src/opm/parser/eclipse/share/keywords/000_Eclipse100

When a new keyword is to be supported by res2df, add it in
When a new keyword is to be supported by res2df, add it in
runmetoupdate.sh AND add it to the list of supported keywords in common.py

Loading

0 comments on commit ee06193

Please sign in to comment.