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
38 changes: 13 additions & 25 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,32 @@ jobs:
run-pymm-local:
permissions:
contents: read
pull-requests: write
timeout-minutes: 30
runs-on: ubuntu-latest
runs-on: ubuntu-26.04

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/checkout@v5

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

- name: Install OpenFOAM
- name: Install OpenFOAM and gmsh
run: |
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key > /etc/apt/trusted.gpg.d/openfoam.asc"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
sudo apt -y install openfoam14

- name: Install gmsh
run: |
sudo add-apt-repository "http://dl.openfoam.org/ubuntu main dev"
sudo sed -i "s/^\(deb\).*\(http\)/\1 [arch=amd64] \2/" /etc/apt/sources.list.d/*dl_openfoam_org*list
sudo apt-get update
sudo apt-get -y install gmsh
sudo apt -y install openfoam14 gmsh

- name: Install test dependecies
- name: Install pymm and python requirements
run: |
python3.14 -m venv vpymm
. vpymm/bin/activate
echo "$PWD/vpymm/bin" >> $GITHUB_PATH
pip install --upgrade pip setuptools wheel
pip install -r dev-requirements.txt

- name: Install pymm
run: |
pip install .
pip install -r dev-requirements.txt

- name: Check code style and linting
run: |
black --target-version py312 src/ tests/ --check
black --target-version py314 src/ tests/ --check
pylint src/ tests/
ruff check src/ tests/
mypy --ignore-missing-imports src/ tests/
Expand All @@ -59,4 +47,4 @@ jobs:
- name: Build documentation
run: |
pushd docs
make html
make html SPHINXOPTS="-W"
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ 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/pymm/blob/main/dev-requirements.txt))
1. **black --target-version py312 src/ tests/** (this formats the code)
1. **black --target-version py314 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. **ruff check src/ tests/** (this also 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=pymm --cov-report term-missing tests/ -n auto** (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/pymm/tree/main/docs) folder)
* Tip: See the [_CI.yml_](https://github.com/cssr-tools/pymm/blob/main/.github/workflows/CI.yml) script and the [_Actions_](https://github.com/cssr-tools/pymm/actions) for installation of _pymm_, as well as the execution of the six previous steps in Ubuntu 24.04 using Python 3.12.
* Tip: See the [_CI.yml_](https://github.com/cssr-tools/pymm/blob/main/.github/workflows/CI.yml) script and the [_Actions_](https://github.com/cssr-tools/pymm/actions) for installation of _pymm_, as well as the execution of the six previous steps in Ubuntu 26.04 using Python 3.14.
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
1. The maintainers will review the pull request, and if the contribution is accepted, then it will be merge to the main repo
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,15 +22,15 @@ 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/pymm/blob/main/dev-requirements.txt>`_)
#. **black \-\-target-version py312 src/ tests/** (this formats the code)
#. **black \-\-target-version py314 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)
#. **ruff check src/ tests/** (this also 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=pymm \-\-cov-report term-missing tests/ -n auto** (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/pymm/tree/main/docs>`_ folder)

.. tip::
See the `CI.yml <https://github.com/cssr-tools/pymm/blob/main/.github/workflows/CI.yml>`_ script and the `Actions <https://github.com/cssr-tools/pymm/actions>`_ for installation of pymm, as well as the execution of the six previous steps in Ubuntu 24.04.
See the `CI.yml <https://github.com/cssr-tools/pymm/blob/main/.github/workflows/CI.yml>`_ script and the `Actions <https://github.com/cssr-tools/pymm/actions>`_ for installation of pymm, as well as the execution of the six previous steps in Ubuntu 26.04 and Python 3.14.

#. Squash your commits into a single commit (see this `nice tutorial <https://gist.github.com/lpranam/4ae996b0a4bc37448dc80356efbca7fa>`_ if you are not familiar with this)
#. Push your commit and make a pull request
Expand Down
4 changes: 2 additions & 2 deletions docs/_sources/installation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ install the Python requirements in a virtual environment with the following comm
OpenFOAM
--------

See the `OpenFOAM page <https://openfoam.org/download/13-ubuntu/>`_, where from OpenFOAM-12 the simulator is available via apt get,
See the `OpenFOAM page <https://openfoam.org/download/14-ubuntu/>`_, where from OpenFOAM-12 the simulator is available via apt get,
and OpenFOAM-14 is the latest release. To test if OpenFoam is installed and working, you could type in the terminal:

.. code-block:: console
Expand All @@ -62,4 +62,4 @@ See the `Gmsh page <https://gmsh.info/#Download>`_.
.. tip::

See the `CI.yml <https://github.com/cssr-tools/pymm/blob/main/.github/workflows/CI.yml>`_ script
for installation of pymm, gmsh, and OpenFOAM-14 in Ubuntu using Python 3.14.
for installation of pymm, gmsh, and OpenFOAM-14 in Ubuntu 26.04 using Python 3.14.
4 changes: 2 additions & 2 deletions docs/contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ <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/pymm/blob/main/dev-requirements.txt">dev-requirements.txt</a>)</p></li>
<li><p><strong>black --target-version py312 src/ tests/</strong> (this formats the code)</p></li>
<li><p><strong>black --target-version py314 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>ruff check src/ tests/</strong> (this also 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>
Expand All @@ -116,7 +116,7 @@ <h2>Contribute to the software<a class="headerlink" href="#contribute-to-the-sof
</ol>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>See the <a class="reference external" href="https://github.com/cssr-tools/pymm/blob/main/.github/workflows/CI.yml">CI.yml</a> script and the <a class="reference external" href="https://github.com/cssr-tools/pymm/actions">Actions</a> for installation of pymm, as well as the execution of the six previous steps in Ubuntu 24.04.</p>
<p>See the <a class="reference external" href="https://github.com/cssr-tools/pymm/blob/main/.github/workflows/CI.yml">CI.yml</a> script and the <a class="reference external" href="https://github.com/cssr-tools/pymm/actions">Actions</a> for installation of pymm, as well as the execution of the six previous steps in Ubuntu 26.04 and Python 3.14.</p>
</div>
</div></blockquote>
</li>
Expand Down
4 changes: 2 additions & 2 deletions docs/installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ <h2>Python package<a class="headerlink" href="#python-package" title="Link to th
</section>
<section id="openfoam">
<h2>OpenFOAM<a class="headerlink" href="#openfoam" title="Link to this heading"></a></h2>
<p>See the <a class="reference external" href="https://openfoam.org/download/13-ubuntu/">OpenFOAM page</a>, where from OpenFOAM-12 the simulator is available via apt get,
<p>See the <a class="reference external" href="https://openfoam.org/download/14-ubuntu/">OpenFOAM page</a>, where from OpenFOAM-12 the simulator is available via apt get,
and OpenFOAM-14 is the latest release. To test if OpenFoam is installed and working, you could type in the terminal:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">source /opt/openfoam14/etc/bashrc</span>
<span class="go">foamRun -help</span>
Expand All @@ -136,7 +136,7 @@ <h2>Gmsh<a class="headerlink" href="#gmsh" title="Link to this heading"></a><
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>See the <a class="reference external" href="https://github.com/cssr-tools/pymm/blob/main/.github/workflows/CI.yml">CI.yml</a> script
for installation of pymm, gmsh, and OpenFOAM-14 in Ubuntu using Python 3.14.</p>
for installation of pymm, gmsh, and OpenFOAM-14 in Ubuntu 26.04 using Python 3.14.</p>
</div>
</section>
</section>
Expand Down
Loading