Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.11
python-version: 3.12

- name: Install Flow Simulator
run: |
Expand All @@ -45,7 +45,7 @@ jobs:

- name: Check code style and linting
run: |
black --check src/ tests/ examples/
black --target-version py312 --check src/ tests/ examples/
pylint src/ tests/ examples/
mypy --ignore-missing-imports src/ tests/ examples/

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ Contributions are more than welcome using the fork and pull request approach
1. Work on your own fork of the main repo
1. In the main repo execute:
1. **pip install -r dev-requirements.txt** (this installs the [_dev-requirements.txt_](https://github.com/cssr-tools/expreccs/blob/main/dev-requirements.txt))
1. **black src/ tests/** (this formats the code)
1. **black --target-version py312 src/ tests/** (this formats the code)
1. **pylint src/ tests/** (this analyses the code, and might rise issues that need to be fixed before the pull request)
1. **mypy --ignore-missing-imports src/ tests/** (this is a static checker, and might rise issues that need to be fixed before the pull request)
1. **pytest --cov=expreccs --cov-report term-missing tests/** (this runs locally the tests, and might rise issues that need to be fixed before the pull request)
1. **pushd docs & make html** (this generates the documentation, and might rise issues that need to be fixed before the pull request; if the build succeeds and if the contribution changes the documentation, then copy all content from the docs/_build/html/ folder and replace the files in the [_docs_](https://github.com/cssr-tools/expreccs/tree/main/docs) folder)
* Tip for Linux users: See the [_CI.yml_](https://github.com/cssr-tools/expreccs/blob/main/.github/workflows/CI.yml) script and the [_Actions_](https://github.com/cssr-tools/expreccs/actions) for installation of expreccs, OPM Flow (binary packages), and dependencies, as well as the execution of the six previous steps in Ubuntu 24.04 using Python 3.11.
* Tip for Linux users: See the [_CI.yml_](https://github.com/cssr-tools/expreccs/blob/main/.github/workflows/CI.yml) script and the [_Actions_](https://github.com/cssr-tools/expreccs/actions) for installation of expreccs, OPM Flow (binary packages), and dependencies, as well as the execution of the six previous steps in Ubuntu 24.04 using Python 3.12.
* Tip for macOS users: See the [_ci_pycopm_macos_.yml_](https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml) script and the [_OPM-Flow_macOS Actions_](https://github.com/cssr-tools/pycopm/actions) for installation of pycopm (a related tool to expreccs), OPM Flow (source build), and dependencies in macOS 26 using Python 3.13. In addition, you need to add the directory containing the OPM Flow executable to your system's PATH environment variable (e.g., export PATH=$PATH:/Users/yourname/pyopmspe11/build/opm-simulators/bin).
1. Squash your commits into a single commit (see this [_nice tutorial_](https://gist.github.com/lpranam/4ae996b0a4bc37448dc80356efbca7fa) if you are not familiar with this)
1. Push your commit and make a pull request
Expand Down
4 changes: 2 additions & 2 deletions docs/_sources/contributing.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ Contribute to the software
#. In the main repo execute:

#. **pip install -r dev-requirements.txt** (this installs the `dev-requirements.txt <https://github.com/cssr-tools/expreccs/blob/main/dev-requirements.txt>`_)
#. **black src/ tests/** (this formats the code)
#. **black --target-version py312 src/ tests/** (this formats the code)
#. **pylint src/ tests/** (this analyses the code, and might rise issues that need to be fixed before the pull request)
#. **mypy \-\-ignore-missing-imports src/ tests/** (this is a static checker, and might rise issues that need to be fixed before the pull request)
#. **pytest \-\-cov=expreccs \-\-cov-report term-missing tests/** (this runs locally the tests, and might rise issues that need to be fixed before the pull request)
#. **pushd docs & make html** (this generates the documentation, and might rise issues that need to be fixed before the pull request; if the build succeeds and if the contribution changes the documentation, then copy all content from the docs/_build/html/ folder and replace the files in the `docs <https://github.com/cssr-tools/expreccs/tree/main/docs>`_ folder)

.. tip::
See the `CI.yml <https://github.com/cssr-tools/expreccs/blob/main/.github/workflows/CI.yml>`_ script and the `Actions <https://github.com/cssr-tools/expreccs/actions>`_ for installation of expreccs, OPM Flow (binary packages), and dependencies, as well as the execution of the six previous steps in Ubuntu 24.04 using Python 3.11.
See the `CI.yml <https://github.com/cssr-tools/expreccs/blob/main/.github/workflows/CI.yml>`_ script and the `Actions <https://github.com/cssr-tools/expreccs/actions>`_ for installation of expreccs, OPM Flow (binary packages), and dependencies, as well as the execution of the six previous steps in Ubuntu 24.04 using Python 3.12.
For macOS users, see the `ci_pycopm_macos.yml <https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml>`_ script and the `OPM-Flow_macOS Actions <https://github.com/cssr-tools/pycopm/actions>`_ for installation of pycopm (a related tool to expreccs), OPM Flow (source build), and dependencies in macOS 26 using Python 3.13.
In addition for macOS, you need to add the directory containing the OPM Flow executable to your system's PATH environment variable (e.g., export PATH=$PATH:/Users/yourname/pyopmspe11/build/opm-simulators/bin).

Expand Down
52 changes: 5 additions & 47 deletions docs/_sources/installation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ supported either via source builds or through running a virtual machine.
.. tip::

See the `CI.yml <https://github.com/cssr-tools/expreccs/blob/main/.github/workflows/CI.yml>`_ script
for installation of OPM Flow (binary packages), LaTeX (optional) libraries, and the expreccs package in Ubuntu 24.04 and Python 3.11.
for installation of OPM Flow (binary packages), LaTeX (optional) libraries, and the expreccs package in Ubuntu 24.04 and Python 3.12.

Source build in Linux/Windows
+++++++++++++++++++++++++++++
If you are a Linux user (including the Windows subsystem for Linux, see `this link <https://learn.microsoft.com/en-us/windows/python/web-frameworks>`_
for a nice tutorial for setting Python environments in WSL), then you could try to build Flow (after installing the `prerequisites <https://opm-project.org/?page_id=239>`_) from the master branches with mpi support by running
in the terminal the following lines (which in turn should build flow in the folder ./build/opm-simulators/bin/flow.):
in the terminal the following lines (which in turn should build flow in the folder ./build/opm-simulators/bin/flow):

.. code-block:: console

Expand All @@ -97,7 +97,7 @@ in the terminal the following lines (which in turn should build flow in the fold
do git clone https://github.com/OPM/opm-$repo.git
mkdir build/opm-$repo
cd build/opm-$repo
cmake -DUSE_MPI=1 -DWITH_NDEBUG=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid" $CURRENT_DIRECTORY/opm-$repo
cmake -DUSE_MPI=1 -DWITH_NDEBUG=1 -DCMAKE_BUILD_TYPE=Release $CURRENT_DIRECTORY/opm-$repo
if [[ $repo == simulators ]]; then
make -j5 flow
else
Expand All @@ -117,7 +117,7 @@ Brew formula for macOS
++++++++++++++++++++++
For macOS, there are no available binary packages, so OPM Flow needs to be built from source. Recently, a formula to build flow using brew has
been added in `https://github.com/cssr-tools/homebrew-opm <https://github.com/cssr-tools/homebrew-opm>`_.
Then, you can try to install flow (v2025.10) by simply typing:
Then, you can try to install flow (v2026.02) by simply typing:

.. code-block:: console

Expand All @@ -130,46 +130,4 @@ You can check if the installation of OPM Flow succeded by typing in the terminal

Source build in macOS
+++++++++++++++++++++
If you would like to build the latest OPM Flow from the master branch, then you can first install the prerequisites using brew:

.. code-block:: console

brew install cjson boost openblas suite-sparse python@3.14 cmake

In addition, it is recommended to uprade and update your macOS to the latest available versions (the following steps have
worked for macOS Tahoe 26.2.0 with Apple clang version 17.0.0).
After the prerequisites are installed, then building OPM Flow can be achieved with the following bash lines:

.. code-block:: console

CURRENT_DIRECTORY="$PWD"

for module in common geometry grid istl
do git clone https://gitlab.dune-project.org/core/dune-$module.git
cd dune-$module && git checkout v2.10.0 && cd ..
./dune-common/bin/dunecontrol --only=dune-$module cmake -DCMAKE_DISABLE_FIND_PACKAGE_MPI=1
./dune-common/bin/dunecontrol --only=dune-$module make -j5
done

mkdir build

for repo in common grid simulators
do git clone https://github.com/OPM/opm-$repo.git
mkdir build/opm-$repo && cd build/opm-$repo
cmake -DUSE_MPI=0 -DWITH_NDEBUG=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/dune-common/build-cmake;$CURRENT_DIRECTORY/dune-grid/build-cmake;$CURRENT_DIRECTORY/dune-geometry/build-cmake;$CURRENT_DIRECTORY/dune-istl/build-cmake;$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid" $CURRENT_DIRECTORY/opm-$repo
if [[ $repo == simulators ]]; then
make -j5 flow
else
make -j5 opm$repo
fi
cd ../..
done

echo "export PATH=\$PATH:$CURRENT_DIRECTORY/build/opm-simulators/bin" >> ~/.zprofile
source ~/.zprofile

This builds OPM Flow, and it exports the path to the flow executable. You can check if the installation of OPM Flow succeded by typing in the terminal **flow \-\-help**.

.. tip::
See `this repository <https://github.com/daavid00/OPM-Flow_macOS>`_ dedicated to build OPM Flow from source in the latest macOS (GitHub actions).
If you still face problems, raise an issue in the GitHub repository, or you could also send an email to the maintainers.
See `this repository <https://github.com/daavid00/OPM-Flow_macOS>`_ dedicated to build OPM Flow from source in the latest macOS (GitHub actions), and tested with **pycopm**, another repository in cssr-tools.
4 changes: 2 additions & 2 deletions docs/contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ <h2>Contribute to the software<a class="headerlink" href="#contribute-to-the-sof
<blockquote>
<div><ol class="arabic simple">
<li><p><strong>pip install -r dev-requirements.txt</strong> (this installs the <a class="reference external" href="https://github.com/cssr-tools/expreccs/blob/main/dev-requirements.txt">dev-requirements.txt</a>)</p></li>
<li><p><strong>black src/ tests/</strong> (this formats the code)</p></li>
<li><p><strong>black –target-version py312 src/ tests/</strong> (this formats the code)</p></li>
<li><p><strong>pylint src/ tests/</strong> (this analyses the code, and might rise issues that need to be fixed before the pull request)</p></li>
<li><p><strong>mypy --ignore-missing-imports src/ tests/</strong> (this is a static checker, and might rise issues that need to be fixed before the pull request)</p></li>
<li><p><strong>pytest --cov=expreccs --cov-report term-missing tests/</strong> (this runs locally the tests, and might rise issues that need to be fixed before the pull request)</p></li>
<li><p><strong>pushd docs &amp; make html</strong> (this generates the documentation, and might rise issues that need to be fixed before the pull request; if the build succeeds and if the contribution changes the documentation, then copy all content from the docs/_build/html/ folder and replace the files in the <a class="reference external" href="https://github.com/cssr-tools/expreccs/tree/main/docs">docs</a> folder)</p></li>
</ol>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>See the <a class="reference external" href="https://github.com/cssr-tools/expreccs/blob/main/.github/workflows/CI.yml">CI.yml</a> script and the <a class="reference external" href="https://github.com/cssr-tools/expreccs/actions">Actions</a> for installation of expreccs, OPM Flow (binary packages), and dependencies, as well as the execution of the six previous steps in Ubuntu 24.04 using Python 3.11.
<p>See the <a class="reference external" href="https://github.com/cssr-tools/expreccs/blob/main/.github/workflows/CI.yml">CI.yml</a> script and the <a class="reference external" href="https://github.com/cssr-tools/expreccs/actions">Actions</a> for installation of expreccs, OPM Flow (binary packages), and dependencies, as well as the execution of the six previous steps in Ubuntu 24.04 using Python 3.12.
For macOS users, see the <a class="reference external" href="https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml">ci_pycopm_macos.yml</a> script and the <a class="reference external" href="https://github.com/cssr-tools/pycopm/actions">OPM-Flow_macOS Actions</a> for installation of pycopm (a related tool to expreccs), OPM Flow (source build), and dependencies in macOS 26 using Python 3.13.
In addition for macOS, you need to add the directory containing the OPM Flow executable to your system’s PATH environment variable (e.g., export PATH=$PATH:/Users/yourname/pyopmspe11/build/opm-simulators/bin).</p>
</div>
Expand Down
Loading
Loading