Skip to content

Commit e9868d1

Browse files
committed
Docs for opm flow in macos
1 parent a966d7f commit e9868d1

9 files changed

Lines changed: 12 additions & 132 deletions

File tree

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
4343
- name: Check code style and linting
4444
run: |
45-
black --check src/ tests/
45+
black --target-version py312 --check src/ tests/
4646
pylint src/ tests/
4747
mypy --ignore-missing-imports src/ tests/
4848

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Contributions are more than welcome using the fork and pull request approach
1414
1. In the main repo execute:
1515
1. **pip install -r dev-requirements.txt** (this installs the [_dev-requirements.txt_](https://github.com/cssr-tools/pyopmnearwell/blob/main/dev-requirements.txt))
1616
1. **pip install tensorflow** (this install [_tensorflow_](https://www.tensorflow.org) for the machine learning near well funcitonality; tensorflow is not yet available for Python 3.14, then Python 3.12 or Python 3.13 are currently needed to run the tests)
17-
1. **black src/ tests/** (this formats the code)
17+
1. **black --target-version py312 src/ tests/** (this formats the code)
1818
1. **pylint src/ tests/** (this analyses the code, and might rise issues that need to be fixed before the pull request)
1919
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)
2020
1. **pytest --cov=pyopmnearwell --cov-report term-missing tests/** (this runs locally the tests, and might rise issues that need to be fixed before the pull request; to save the files, add the flag **--basetemp=test_outputs**)

docs/_sources/contributing.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Contribute to the software
2323

2424
#. **pip install -r dev-requirements.txt** (this installs the `dev-requirements.txt <https://github.com/cssr-tools/pyopmnearwell/blob/main/dev-requirements.txt>`_)
2525
#. **pip install tensorflow** (this installs `tensorflow <https://www.tensorflow.org>`_ for the machine learning near well funcitonality); tensorflow is not yet available for Python 3.14, then Python 3.12 or Python 3.13 are currently needed to run the tests
26-
#. **black src/ tests/** (this formats the code)
26+
#. **black --target-version py312 src/ tests/** (this formats the code)
2727
#. **pylint src/ tests/** (this analyses the code, and might rise issues that need to be fixed before the pull request)
2828
#. **mypy -\-ignore-missing-imports src/ tests/** (this is a static checker, and might rise issues that need to be fixed before the pull request)
2929
#. **pytest -\-cov=pyopmnearwell -\-cov-report term-missing tests/** (this runs locally the tests, and might rise issues that need to be fixed before the pull request; to save the files, add the flag **-\-basetemp=test_outputs**)

docs/_sources/installation.rst.txt

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Brew formula for macOS
110110
++++++++++++++++++++++
111111
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
112112
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:
113+
Then, you can try to install flow (v2026.02) by simply typing:
114114

115115
.. code-block:: console
116116
@@ -123,45 +123,4 @@ You can check if the installation of OPM Flow succeded by typing in the terminal
123123

124124
Source build in macOS
125125
+++++++++++++++++++++
126-
If you would like to build the latest OPM Flow from the master branch, then you can first install the prerequisites using brew:
127-
128-
.. code-block:: console
129-
130-
brew install cjson boost openblas suite-sparse python@3.13 cmake
131-
132-
In addition, it is recommended to uprade and update your macOS to the latest available versions (the following steps have
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:
135-
136-
.. code-block:: console
137-
138-
CURRENT_DIRECTORY="$PWD"
139-
140-
for module in common geometry grid istl
141-
do git clone https://gitlab.dune-project.org/core/dune-$module.git
142-
cd dune-$module && git checkout v2.10.0 && cd ..
143-
./dune-common/bin/dunecontrol --only=dune-$module cmake -DCMAKE_DISABLE_FIND_PACKAGE_MPI=1
144-
./dune-common/bin/dunecontrol --only=dune-$module make -j5
145-
done
146-
147-
mkdir build
148-
149-
for repo in common grid simulators
150-
do git clone https://github.com/OPM/opm-$repo.git
151-
mkdir build/opm-$repo && cd build/opm-$repo
152-
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
153-
if [[ $repo == simulators ]]; then
154-
make -j5 flow
155-
else
156-
make -j5 opm$repo
157-
fi
158-
cd ../..
159-
done
160-
161-
echo "export PATH=\$PATH:$CURRENT_DIRECTORY/build/opm-simulators/bin" >> ~/.zprofile
162-
source ~/.zprofile
163-
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**.
165-
166-
.. tip::
167-
See `this repository <https://github.com/daavid00/OPM-Flow_macOS>`_ dedicated to build OPM Flow from source in the latest macOS (GitHub actions).
126+
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.

docs/contributing.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ <h2>Contribute to the software<a class="headerlink" href="#contribute-to-the-sof
108108
<div><ol class="arabic simple">
109109
<li><p><strong>pip install -r dev-requirements.txt</strong> (this installs the <a class="reference external" href="https://github.com/cssr-tools/pyopmnearwell/blob/main/dev-requirements.txt">dev-requirements.txt</a>)</p></li>
110110
<li><p><strong>pip install tensorflow</strong> (this installs <a class="reference external" href="https://www.tensorflow.org">tensorflow</a> for the machine learning near well funcitonality); tensorflow is not yet available for Python 3.14, then Python 3.12 or Python 3.13 are currently needed to run the tests</p></li>
111-
<li><p><strong>black src/ tests/</strong> (this formats the code)</p></li>
111+
<li><p><strong>black –target-version py312 src/ tests/</strong> (this formats the code)</p></li>
112112
<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>
113113
<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>
114114
<li><p><strong>pytest --cov=pyopmnearwell --cov-report term-missing tests/</strong> (this runs locally the tests, and might rise issues that need to be fixed before the pull request; to save the files, add the flag <strong>--basetemp=test_outputs</strong>)</p></li>

docs/installation.html

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ <h3>Source build in Linux/Windows<a class="headerlink" href="#source-build-in-li
186186
<span id="macos"></span><h3>Brew formula for macOS<a class="headerlink" href="#brew-formula-for-macos" title="Link to this heading"></a></h3>
187187
<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
188188
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>
189+
Then, you can try to install flow (v2026.02) by simply typing:</p>
190190
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">brew install cssr-tools/opm/opm-simulators</span>
191191
</pre></div>
192192
</div>
@@ -198,45 +198,7 @@ <h3>Source build in Linux/Windows<a class="headerlink" href="#source-build-in-li
198198
</section>
199199
<section id="source-build-in-macos">
200200
<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>
202-
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">brew install cjson boost openblas suite-sparse python@3.13 cmake</span>
203-
</pre></div>
204-
</div>
205-
<p>In addition, it is recommended to uprade and update your macOS to the latest available versions (the following steps have
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>
208-
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">CURRENT_DIRECTORY=&quot;$PWD&quot;</span>
209-
210-
<span class="go">for module in common geometry grid istl</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>
213-
<span class="go"> ./dune-common/bin/dunecontrol --only=dune-$module cmake -DCMAKE_DISABLE_FIND_PACKAGE_MPI=1</span>
214-
<span class="go"> ./dune-common/bin/dunecontrol --only=dune-$module make -j5</span>
215-
<span class="go">done</span>
216-
217-
<span class="go">mkdir build</span>
218-
219-
<span class="go">for repo in common grid simulators</span>
220-
<span class="go">do git clone https://github.com/OPM/opm-$repo.git</span>
221-
<span class="go"> mkdir build/opm-$repo &amp;&amp; cd build/opm-$repo</span>
222-
<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>
223-
<span class="go"> if [[ $repo == simulators ]]; then</span>
224-
<span class="go"> make -j5 flow</span>
225-
<span class="go"> else</span>
226-
<span class="go"> make -j5 opm$repo</span>
227-
<span class="go"> fi</span>
228-
<span class="go"> cd ../..</span>
229-
<span class="go">done</span>
230-
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>
233-
</pre></div>
234-
</div>
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>
236-
<div class="admonition tip">
237-
<p class="admonition-title">Tip</p>
238-
<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-
</div>
201+
<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), and tested with <strong>pycopm</strong>, another repository in cssr-tools.</p>
240202
</section>
241203
</section>
242204
</section>

docs/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/text/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Contribute to the software
2323

2424
#. **pip install -r dev-requirements.txt** (this installs the `dev-requirements.txt <https://github.com/cssr-tools/pyopmnearwell/blob/main/dev-requirements.txt>`_)
2525
#. **pip install tensorflow** (this installs `tensorflow <https://www.tensorflow.org>`_ for the machine learning near well funcitonality); tensorflow is not yet available for Python 3.14, then Python 3.12 or Python 3.13 are currently needed to run the tests
26-
#. **black src/ tests/** (this formats the code)
26+
#. **black --target-version py312 src/ tests/** (this formats the code)
2727
#. **pylint src/ tests/** (this analyses the code, and might rise issues that need to be fixed before the pull request)
2828
#. **mypy -\-ignore-missing-imports src/ tests/** (this is a static checker, and might rise issues that need to be fixed before the pull request)
2929
#. **pytest -\-cov=pyopmnearwell -\-cov-report term-missing tests/** (this runs locally the tests, and might rise issues that need to be fixed before the pull request; to save the files, add the flag **-\-basetemp=test_outputs**)

docs/text/installation.rst

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Brew formula for macOS
110110
++++++++++++++++++++++
111111
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
112112
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:
113+
Then, you can try to install flow (v2026.02) by simply typing:
114114

115115
.. code-block:: console
116116
@@ -123,45 +123,4 @@ You can check if the installation of OPM Flow succeded by typing in the terminal
123123

124124
Source build in macOS
125125
+++++++++++++++++++++
126-
If you would like to build the latest OPM Flow from the master branch, then you can first install the prerequisites using brew:
127-
128-
.. code-block:: console
129-
130-
brew install cjson boost openblas suite-sparse python@3.13 cmake
131-
132-
In addition, it is recommended to uprade and update your macOS to the latest available versions (the following steps have
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:
135-
136-
.. code-block:: console
137-
138-
CURRENT_DIRECTORY="$PWD"
139-
140-
for module in common geometry grid istl
141-
do git clone https://gitlab.dune-project.org/core/dune-$module.git
142-
cd dune-$module && git checkout v2.10.0 && cd ..
143-
./dune-common/bin/dunecontrol --only=dune-$module cmake -DCMAKE_DISABLE_FIND_PACKAGE_MPI=1
144-
./dune-common/bin/dunecontrol --only=dune-$module make -j5
145-
done
146-
147-
mkdir build
148-
149-
for repo in common grid simulators
150-
do git clone https://github.com/OPM/opm-$repo.git
151-
mkdir build/opm-$repo && cd build/opm-$repo
152-
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
153-
if [[ $repo == simulators ]]; then
154-
make -j5 flow
155-
else
156-
make -j5 opm$repo
157-
fi
158-
cd ../..
159-
done
160-
161-
echo "export PATH=\$PATH:$CURRENT_DIRECTORY/build/opm-simulators/bin" >> ~/.zprofile
162-
source ~/.zprofile
163-
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**.
165-
166-
.. tip::
167-
See `this repository <https://github.com/daavid00/OPM-Flow_macOS>`_ dedicated to build OPM Flow from source in the latest macOS (GitHub actions).
126+
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.

0 commit comments

Comments
 (0)