Skip to content

Commit 021f418

Browse files
authored
Merge pull request #32 from daavid00/dev
Bump year to 2026
2 parents e65633a + 761095f commit 021f418

67 files changed

Lines changed: 177 additions & 144 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/CI.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,17 @@ on:
99
jobs:
1010
run-pyopmnearwell-local:
1111
timeout-minutes: 60
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
python-version: ['3.12']
16-
os: [ubuntu-latest]
17-
18-
runs-on: ${{ matrix.os }}
12+
runs-on: ubuntu-latest
1913

2014
steps:
2115
- uses: actions/checkout@v2
2216
with:
2317
fetch-depth: 0
2418

25-
- name: Set up Python ${{ matrix.python-version }}
19+
- name: Set up Python 3.12
2620
uses: actions/setup-python@v2
2721
with:
28-
python-version: ${{ matrix.python-version }}
22+
python-version: 3.12
2923

3024
- name: Install Flow Simulator
3125
run: |
@@ -54,7 +48,7 @@ jobs:
5448
5549
- name: Run the tests
5650
run: |
57-
pytest --cov=pyopmnearwell --cov-report term-missing tests/
51+
pytest -x --cov=pyopmnearwell --cov-report term-missing tests/
5852
5953
- name: Build documentation
6054
run: |

docs/_sources/installation.rst.txt

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ You also need to install:
6262

6363
* OPM Flow (https://opm-project.org, Release 2025.10 or current master branches)
6464

65+
Binary packages
66+
+++++++++++++++
67+
68+
See the `downloading and installing <https://opm-project.org/?page_id=36>`_ OPM Flow online documentation for
69+
instructions to install the binary packages in Ubuntu and Red Hat Enterprise Linux, and for other platforms which are
70+
supported either via source builds or through running a virtual machine.
71+
6572
.. tip::
6673

6774
See the `CI.yml <https://github.com/cssr-tools/pyopmnearwell/blob/main/.github/workflows/CI.yml>`_ script
@@ -99,32 +106,40 @@ in the terminal the following lines (which in turn should build flow in the fold
99106

100107
.. _macOS:
101108

109+
Brew formula for macOS
110+
++++++++++++++++++++++
111+
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
112+
been added in `https://github.com/cssr-tools/homebrew-opm <https://github.com/cssr-tools/homebrew-opm>`_.
113+
Then, you can try to install flow (v2025.10) by simply typing:
114+
115+
.. code-block:: console
116+
117+
brew install cssr-tools/opm/opm-simulators
118+
119+
You can check if the installation of OPM Flow succeded by typing in the terminal **flow \-\-help**.
120+
121+
.. tip::
122+
See the actions in the `cssr-tools/homebrew-opm <https://github.com/cssr-tools/homebrew-opm/actions>`_ repository.
123+
102124
Source build in macOS
103125
+++++++++++++++++++++
104-
For macOS, there are no available binary packages, so OPM Flow needs to be built from source, in addition to the dune libraries
105-
(see the `prerequisites <https://opm-project.org/?page_id=239>`_, which can be installed using macports or brew). For example,
106-
with brew the prerequisites can be installed by:
126+
If you would like to build the latest OPM Flow from the master branch, then you can first install the prerequisites using brew:
107127

108128
.. code-block:: console
109129
110130
brew install boost openblas suite-sparse python@3.13 cmake
111131
112132
In addition, it is recommended to uprade and update your macOS to the latest available versions (the following steps have
113-
worked for macOS Tahoe 26.1 with Apple clang version 17.0.0).
114-
After the prerequisites are installed and the vpyopmnearwell Python environment is created (see :ref:`vpyopmnearwell`),
115-
then building OPM Flow can be achieved with the following bash lines:
116-
117-
This can be achieved by the following lines:
133+
worked for macOS Tahoe 26.2 with Apple clang version 17.0.0).
134+
After the prerequisites are installed, then building OPM Flow can be achieved with the following bash lines:
118135

119136
.. code-block:: console
120137
121138
CURRENT_DIRECTORY="$PWD"
122139
123-
deactivate
124-
source vpyopmnearwell/bin/activate
125-
126140
for module in common geometry grid istl
127-
do git clone https://gitlab.dune-project.org/core/dune-$module.git --branch v2.9.1
141+
do git clone https://gitlab.dune-project.org/core/dune-$module.git
142+
cd dune-$module && git checkout v2.10.0 && cd ..
128143
./dune-common/bin/dunecontrol --only=dune-$module cmake -DCMAKE_DISABLE_FIND_PACKAGE_MPI=1
129144
./dune-common/bin/dunecontrol --only=dune-$module make -j5
130145
done
@@ -133,8 +148,7 @@ This can be achieved by the following lines:
133148
134149
for repo in common grid simulators
135150
do git clone https://github.com/OPM/opm-$repo.git
136-
mkdir build/opm-$repo
137-
cd build/opm-$repo
151+
mkdir build/opm-$repo && cd build/opm-$repo
138152
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
139153
if [[ $repo == simulators ]]; then
140154
make -j5 flow
@@ -144,12 +158,10 @@ This can be achieved by the following lines:
144158
cd ../..
145159
done
146160
147-
echo "export PATH=\$PATH:$CURRENT_DIRECTORY/build/opm-simulators/bin" >> $CURRENT_DIRECTORY/vpyopmnearwell/bin/activate
148-
149-
deactivate
150-
source vpyopmnearwell/bin/activate
161+
echo "export PATH=\$PATH:$CURRENT_DIRECTORY/build/opm-simulators/bin" >> ~/.zprofile
162+
source ~/.zprofile
151163
152-
This builds OPM Flow, and it exports the path to the flow executable (i.e., executing in the terminal **which flow** should print the path).
164+
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**.
153165

154166
.. tip::
155167
See `this repository <https://github.com/daavid00/OPM-Flow_macOS>`_ dedicated to build OPM Flow from source in the latest macOS (GitHub actions).

docs/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ <h1>About pyopmnearwell<a class="headerlink" href="#about-pyopmnearwell" title="
9999
<hr/>
100100

101101
<div role="contentinfo">
102-
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
102+
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
103103
</div>
104104

105105
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a

docs/api.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ <h2>pyopmnearwell<a class="headerlink" href="#pyopmnearwell" title="Link to this
140140
<hr/>
141141

142142
<div role="contentinfo">
143-
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
143+
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
144144
</div>
145145

146146
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a

docs/configuration_file.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ <h2>Additional parameters<a class="headerlink" href="#additional-parameters" tit
241241
<hr/>
242242

243243
<div role="contentinfo">
244-
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
244+
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
245245
</div>
246246

247247
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a

docs/contributing.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ <h2>Seek support<a class="headerlink" href="#seek-support" title="Link to this h
157157
<hr/>
158158

159159
<div role="contentinfo">
160-
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
160+
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
161161
</div>
162162

163163
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a

docs/examples.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ <h2>Publications<a class="headerlink" href="#publications" title="Link to this h
155155
<hr/>
156156

157157
<div role="contentinfo">
158-
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
158+
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
159159
</div>
160160

161161
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a

docs/genindex.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ <h2 id="W">W</h2>
690690
<hr/>
691691

692692
<div role="contentinfo">
693-
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
693+
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
694694
</div>
695695

696696
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a

docs/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ <h1>Welcome to pyopmnearwell’s documentation!<a class="headerlink" href="#welc
9191
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a><ul>
9292
<li class="toctree-l2"><a class="reference internal" href="installation.html#python-package">Python package</a></li>
9393
<li class="toctree-l2"><a class="reference internal" href="installation.html#opm-flow">OPM Flow</a><ul>
94+
<li class="toctree-l3"><a class="reference internal" href="installation.html#binary-packages">Binary packages</a></li>
9495
<li class="toctree-l3"><a class="reference internal" href="installation.html#source-build-in-linux-windows">Source build in Linux/Windows</a></li>
96+
<li class="toctree-l3"><a class="reference internal" href="installation.html#brew-formula-for-macos">Brew formula for macOS</a></li>
9597
<li class="toctree-l3"><a class="reference internal" href="installation.html#source-build-in-macos">Source build in macOS</a></li>
9698
</ul>
9799
</li>
@@ -163,7 +165,7 @@ <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Li
163165
<hr/>
164166

165167
<div role="contentinfo">
166-
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
168+
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
167169
</div>
168170

169171
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a

docs/installation.html

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949
<li class="toctree-l1 current"><a class="current reference internal" href="#">Installation</a><ul>
5050
<li class="toctree-l2"><a class="reference internal" href="#python-package">Python package</a></li>
5151
<li class="toctree-l2"><a class="reference internal" href="#opm-flow">OPM Flow</a><ul>
52+
<li class="toctree-l3"><a class="reference internal" href="#binary-packages">Binary packages</a></li>
5253
<li class="toctree-l3"><a class="reference internal" href="#source-build-in-linux-windows">Source build in Linux/Windows</a></li>
54+
<li class="toctree-l3"><a class="reference internal" href="#brew-formula-for-macos">Brew formula for macOS</a></li>
5355
<li class="toctree-l3"><a class="reference internal" href="#source-build-in-macos">Source build in macOS</a></li>
5456
</ul>
5557
</li>
@@ -141,11 +143,17 @@ <h2>OPM Flow<a class="headerlink" href="#opm-flow" title="Link to this heading">
141143
<ul class="simple">
142144
<li><p>OPM Flow (<a class="reference external" href="https://opm-project.org">https://opm-project.org</a>, Release 2025.10 or current master branches)</p></li>
143145
</ul>
146+
<section id="binary-packages">
147+
<h3>Binary packages<a class="headerlink" href="#binary-packages" title="Link to this heading"></a></h3>
148+
<p>See the <a class="reference external" href="https://opm-project.org/?page_id=36">downloading and installing</a> OPM Flow online documentation for
149+
instructions to install the binary packages in Ubuntu and Red Hat Enterprise Linux, and for other platforms which are
150+
supported either via source builds or through running a virtual machine.</p>
144151
<div class="admonition tip">
145152
<p class="admonition-title">Tip</p>
146153
<p>See the <a class="reference external" href="https://github.com/cssr-tools/pyopmnearwell/blob/main/.github/workflows/CI.yml">CI.yml</a> script
147154
for installation of OPM Flow (binary packages) and the pyopmnearwell package in Ubuntu.</p>
148155
</div>
156+
</section>
149157
<section id="source-build-in-linux-windows">
150158
<h3>Source build in Linux/Windows<a class="headerlink" href="#source-build-in-linux-windows" title="Link to this heading"></a></h3>
151159
<p>If you are a Linux user (including the Windows subsystem for Linux, see <a class="reference external" href="https://learn.microsoft.com/en-us/windows/python/web-frameworks">this link</a>
@@ -174,26 +182,34 @@ <h3>Source build in Linux/Windows<a class="headerlink" href="#source-build-in-li
174182
<p>You can create a .sh file (e.g., build_opm_mpi.sh), copy the previous lines, and run in the terminal <strong>source build_opm_mpi.sh</strong></p>
175183
</div>
176184
</section>
185+
<section id="brew-formula-for-macos">
186+
<span id="macos"></span><h3>Brew formula for macOS<a class="headerlink" href="#brew-formula-for-macos" title="Link to this heading"></a></h3>
187+
<p>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
188+
been added in <a class="reference external" href="https://github.com/cssr-tools/homebrew-opm">https://github.com/cssr-tools/homebrew-opm</a>.
189+
Then, you can try to install flow (v2025.10) by simply typing:</p>
190+
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">brew install cssr-tools/opm/opm-simulators</span>
191+
</pre></div>
192+
</div>
193+
<p>You can check if the installation of OPM Flow succeded by typing in the terminal <strong>flow --help</strong>.</p>
194+
<div class="admonition tip">
195+
<p class="admonition-title">Tip</p>
196+
<p>See the actions in the <a class="reference external" href="https://github.com/cssr-tools/homebrew-opm/actions">cssr-tools/homebrew-opm</a> repository.</p>
197+
</div>
198+
</section>
177199
<section id="source-build-in-macos">
178-
<span id="macos"></span><h3>Source build in macOS<a class="headerlink" href="#source-build-in-macos" title="Link to this heading"></a></h3>
179-
<p>For macOS, there are no available binary packages, so OPM Flow needs to be built from source, in addition to the dune libraries
180-
(see the <a class="reference external" href="https://opm-project.org/?page_id=239">prerequisites</a>, which can be installed using macports or brew). For example,
181-
with brew the prerequisites can be installed by:</p>
200+
<h3>Source build in macOS<a class="headerlink" href="#source-build-in-macos" title="Link to this heading"></a></h3>
201+
<p>If you would like to build the latest OPM Flow from the master branch, then you can first install the prerequisites using brew:</p>
182202
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">brew install boost openblas suite-sparse python@3.13 cmake</span>
183203
</pre></div>
184204
</div>
185205
<p>In addition, it is recommended to uprade and update your macOS to the latest available versions (the following steps have
186-
worked for macOS Tahoe 26.1 with Apple clang version 17.0.0).
187-
After the prerequisites are installed and the vpyopmnearwell Python environment is created (see <a class="reference internal" href="#vpyopmnearwell"><span class="std std-ref">Python package</span></a>),
188-
then building OPM Flow can be achieved with the following bash lines:</p>
189-
<p>This can be achieved by the following lines:</p>
206+
worked for macOS Tahoe 26.2 with Apple clang version 17.0.0).
207+
After the prerequisites are installed, then building OPM Flow can be achieved with the following bash lines:</p>
190208
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">CURRENT_DIRECTORY=&quot;$PWD&quot;</span>
191209

192-
<span class="go">deactivate</span>
193-
<span class="go">source vpyopmnearwell/bin/activate</span>
194-
195210
<span class="go">for module in common geometry grid istl</span>
196-
<span class="go">do git clone https://gitlab.dune-project.org/core/dune-$module.git --branch v2.9.1</span>
211+
<span class="go">do git clone https://gitlab.dune-project.org/core/dune-$module.git</span>
212+
<span class="go"> cd dune-$module &amp;&amp; git checkout v2.10.0 &amp;&amp; cd ..</span>
197213
<span class="go"> ./dune-common/bin/dunecontrol --only=dune-$module cmake -DCMAKE_DISABLE_FIND_PACKAGE_MPI=1</span>
198214
<span class="go"> ./dune-common/bin/dunecontrol --only=dune-$module make -j5</span>
199215
<span class="go">done</span>
@@ -202,8 +218,7 @@ <h3>Source build in Linux/Windows<a class="headerlink" href="#source-build-in-li
202218

203219
<span class="go">for repo in common grid simulators</span>
204220
<span class="go">do git clone https://github.com/OPM/opm-$repo.git</span>
205-
<span class="go"> mkdir build/opm-$repo</span>
206-
<span class="go"> cd build/opm-$repo</span>
221+
<span class="go"> mkdir build/opm-$repo &amp;&amp; cd build/opm-$repo</span>
207222
<span class="go"> cmake -DUSE_MPI=0 -DWITH_NDEBUG=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=&quot;$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&quot; $CURRENT_DIRECTORY/opm-$repo</span>
208223
<span class="go"> if [[ $repo == simulators ]]; then</span>
209224
<span class="go"> make -j5 flow</span>
@@ -213,13 +228,11 @@ <h3>Source build in Linux/Windows<a class="headerlink" href="#source-build-in-li
213228
<span class="go"> cd ../..</span>
214229
<span class="go">done</span>
215230

216-
<span class="go">echo &quot;export PATH=\$PATH:$CURRENT_DIRECTORY/build/opm-simulators/bin&quot; &gt;&gt; $CURRENT_DIRECTORY/vpyopmnearwell/bin/activate</span>
217-
218-
<span class="go">deactivate</span>
219-
<span class="go">source vpyopmnearwell/bin/activate</span>
231+
<span class="go">echo &quot;export PATH=\$PATH:$CURRENT_DIRECTORY/build/opm-simulators/bin&quot; &gt;&gt; ~/.zprofile</span>
232+
<span class="go">source ~/.zprofile</span>
220233
</pre></div>
221234
</div>
222-
<p>This builds OPM Flow, and it exports the path to the flow executable (i.e., executing in the terminal <strong>which flow</strong> should print the path).</p>
235+
<p>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 <strong>flow --help</strong>.</p>
223236
<div class="admonition tip">
224237
<p class="admonition-title">Tip</p>
225238
<p>See <a class="reference external" href="https://github.com/daavid00/OPM-Flow_macOS">this repository</a> dedicated to build OPM Flow from source in the latest macOS (GitHub actions).</p>
@@ -239,7 +252,7 @@ <h3>Source build in Linux/Windows<a class="headerlink" href="#source-build-in-li
239252
<hr/>
240253

241254
<div role="contentinfo">
242-
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
255+
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
243256
</div>
244257

245258
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a

0 commit comments

Comments
 (0)