Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge #1

Merged
merged 24 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
57f114e
Update boussinesq.py
Caastlefox Oct 22, 2024
a0a3bf7
use (newer) setup-python action also on macos-14 images (#466)
slayoo Oct 23, 2024
857f263
bump devops tests to include checks for badges and Colab header cell …
slayoo Oct 23, 2024
dc969ff
Adding pdoc-generated example gallery used as both example docs landi…
pawelmagnu Oct 24, 2024
8fff7ce
add Rust code snippets to the tutorial (incl. CI execution) (#450)
Sfonxu Oct 24, 2024
6100931
fixing inclusion of examples landing page in MANIFEST.in (for sdist t…
slayoo Oct 25, 2024
ca1b264
HTML syntax fix
slayoo Oct 25, 2024
14f0956
Merge branch 'open-atmos:main' into main
Caastlefox Nov 3, 2024
8b7a497
docs fixes (incl. rel->abs links in PyPI metadata) (#472)
slayoo Nov 5, 2024
9d72556
added first smoketest draft
Nov 5, 2024
1591524
disable attestations for PyPI uploads (cause HTTPError: 400 Bad Reque…
slayoo Nov 6, 2024
9784ee9
add Rust mention to pkg metadata
slayoo Nov 6, 2024
652ed86
fix pypa/gh-action-pypi-publish version
slayoo Nov 6, 2024
293a870
fix pypa/gh-action-pypi-publish branch name
slayoo Nov 7, 2024
c30971f
workaround flexparser frozen dataclass issue (#473)
AgnieszkaZaba Nov 7, 2024
0dd54e2
bump CI mac jobs to macos-13 from macos-12 (will be phased out in De…
slayoo Nov 8, 2024
1b951f4
comparison against trixi via 2d advection (#454)
pawelmagnu Nov 8, 2024
cbf9a8d
add badges to docs; remove nav from index.html (#477)
pawelmagnu Nov 11, 2024
facf954
more info in docs index (credits, paper, better pip-install hints)
slayoo Nov 12, 2024
4eede80
remove PySDM copy-paste leftovers
slayoo Nov 13, 2024
ce1b77f
remove version pin for flexparser (#478)
slayoo Nov 13, 2024
6d161a2
add animation to the docs landing site
slayoo Nov 13, 2024
a8f04f7
remove nogus array flip in 2D adv-diff example + code cleanup (#468)
AgnieszkaZaba Nov 22, 2024
23508be
Merge branch 'open-atmos:main' into main
Caastlefox Nov 23, 2024
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
43 changes: 43 additions & 0 deletions .github/workflows/readme_rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: readme_rust

defaults:
run:
shell: bash

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 13 * * 4'

jobs:
rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
components: rust-src
- uses: actions/setup-python@v5
with:
python-version: 3.9
- run: pip install -e .
- run: pip install pytest-codeblocks pytest

- run: |
cat >Cargo.toml <<EOF
[package]
name = "PyMPDATA"
version = "0.1.0"
edition = "2021"

[dependencies]
pyo3 = { version = "0.22.2", features=["auto-initialize"]}
EOF
- run: mkdir src
- run: python -c "import pytest_codeblocks; code=pytest_codeblocks.extract_from_file('docs/markdown/pympdata_landing.md'); f=open('src/main.rs', 'w'); f.writelines(block.code for block in code if block.syntax=='Rust'); f.close()"
- run: cat -n src/main.rs
- run: cargo run

80 changes: 28 additions & 52 deletions .github/workflows/tests+pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v5.2.0
with:
python-version: "3.10"
- run: |
Expand All @@ -37,7 +37,7 @@ jobs:
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@master
- uses: actions/setup-python@v5.2.0
with:
python-version: 3.9
- name: Generate coverage report
Expand All @@ -60,7 +60,7 @@ jobs:
submodules: recursive
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v5.2.0
with:
python-version: 3.9
- name: Install dependencies
Expand Down Expand Up @@ -89,16 +89,24 @@ jobs:
with:
submodules: recursive
persist-credentials: false
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5.2.0
with:
python-version: 3.9
- env:
JUPYTER_PLATFORM_DIRS: 1
run: |
pip3 install pdoc
pip3 install pdoc nbformat
pip install -e . -e ./examples
export PDOC_ALLOW_EXEC=1
python -We -m pdoc -o html PyMPDATA examples/PyMPDATA_examples -t docs/templates

python - <<EOF
import glob, nbformat
for notebook_path in glob.glob('examples/PyMPDATA_examples/*/*.ipynb'):
with open(notebook_path, encoding="utf8") as fin:
with open(notebook_path + ".badges.md", 'w') as fout:
fout.write(nbformat.read(fin, nbformat.NO_CONVERT).cells[0].source)
EOF

PDOC_ALLOW_EXEC=1 python -We -m pdoc -o html PyMPDATA examples/PyMPDATA_examples -t docs/templates --math
- if: ${{ github.ref == 'refs/heads/main' && matrix.platform == 'ubuntu-latest' }}
uses: JamesIves/[email protected]
with:
Expand All @@ -120,38 +128,22 @@ jobs:
needs: [nojit_and_codecov, pylint, pdoc, precommit, zenodo_json]
strategy:
matrix:
platform: [ubuntu-latest, macos-12, macos-14, windows-latest]
python-version: ["3.9", "3.12", "system"]
platform: [ubuntu-latest, macos-13, macos-14, windows-latest]
python-version: ["3.9", "3.12"]
exclude:
- platform: ubuntu-latest
python-version: system
- platform: macos-12
python-version: system
- platform: windows-latest
python-version: system
- platform: macos-14
python-version: "3.9"
- platform: macos-14
python-version: "3.12"
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0

- if: matrix.platform != 'macos-14'
uses: actions/setup-python@v1
- uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}

- if: matrix.platform == 'macos-14'
run: |
sudo ln -s `which python3` /usr/local/bin/python
echo "PIP_INSTALL_ARGS=--break-system-packages" >> $GITHUB_ENV

# Python 3.12 workaround
python -m pip install --break-system-packages setuptools
- run: |
python -m pip install $PIP_INSTALL_ARGS -e . # to check if usable without test/example dependencies
python -We -c "import PyMPDATA"
Expand All @@ -176,40 +168,20 @@ jobs:
needs: [pylint, precommit]
strategy:
matrix:
platform: [ubuntu-latest, macos-12, macos-14, windows-latest]
platform: [ubuntu-latest, macos-13, macos-14, windows-latest]
python-version: ["3.9", "3.12"]
exclude:
- platform: ubuntu-latest
python-version: system
- platform: macos-12
python-version: system
- platform: windows-latest
python-version: system
- platform: macos-14
python-version: "3.9"
- platform: macos-14
python-version: "3.12"
fail-fast: false
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
fetch-depth: 0

- if: matrix.platform != 'macos-14'
uses: actions/setup-python@v1
- uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}

- if: matrix.platform == 'macos-14'
run: |
sudo ln -s `which python3` /usr/local/bin/python
echo "PIP_INSTALL_ARGS=--break-system-packages" >> $GITHUB_ENV

# Python 3.12 workaround
python -m pip install --break-system-packages setuptools

- run: python -m pip install $PIP_INSTALL_ARGS -e .[tests] ./examples
- run: python -m pip install $PIP_INSTALL_ARGS -r tests/devops_tests/requirements.txt
- if: matrix.platform == 'ubuntu-latest'
Expand All @@ -223,6 +195,8 @@ jobs:
sudo make install
cd ../../../
rm -rf libmpdataxx
- uses: julia-actions/setup-julia@v2
- run: julia --version

# https://github.com/numba/numba/issues/6350#issuecomment-728174860
- if: matrix.platform == 'ubuntu-latest'
Expand Down Expand Up @@ -279,7 +253,7 @@ jobs:
with:
submodules: recursive
fetch-depth: 0 # https://github.com/pypa/setuptools_scm/issues/480
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5.2.0
with:
python-version: "3.10"

Expand All @@ -295,13 +269,15 @@ jobs:
cd ..

- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: pypa/gh-action-pypi-publish@unstable/v1
uses: pypa/gh-action-pypi-publish@release/v1.12
with:
attestations: false
repository_url: https://test.pypi.org/legacy/
packages-dir: ${{ matrix.package-dir }}/dist

- if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@unstable/v1
uses: pypa/gh-action-pypi-publish@release/v1.12
with:
attestations: false
packages-dir: ${{ matrix.package-dir }}/dist

24 changes: 0 additions & 24 deletions docs/markdown/pympdata_examples_landing.md

This file was deleted.

Loading
Loading