diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..f5a7e15 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,71 @@ +name: Publish Python Package + +on: + release: + types: [created] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: pip + cache-dependency-path: pyproject.toml + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r ./tests/requirements.txt + + - name: Run tests + run: | + python -m pip install . + python -m pytest tests/ + build: + runs-on: ubuntu-latest + needs: [test] + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: pip + cache-dependency-path: pyproject.toml + - name: Install dependencies + run: | + pip install setuptools wheel build + - name: Build + run: | + python -m build + - name: Store the distribution packages + uses: actions/upload-artifact@v4 + with: + name: python-packages + path: dist/ + publish: + name: Publish to PyPI + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + needs: [build] + environment: release + permissions: + id-token: write + steps: + - name: Download distribution packages + uses: actions/download-artifact@v4 + with: + name: python-packages + path: dist/ + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..38457ee --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: Run tests + +on: [push, pull_request] + +permissions: + contents: read + +jobs: + run-test: + strategy: + matrix: + python-version: [ "3.10", "3.11", "3.12" ] + os: [ ubuntu-latest ] + fail-fast: false + runs-on: ${{ matrix.os }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r ./tests/requirements.txt + + - name: Test with pytest + run: | + python -m pip install . + python -m pytest tests/ \ No newline at end of file diff --git a/README.md b/README.md index 3f5832c..92ecd80 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,4 @@ - -

- -
- Exponax -
-

+ ⚠️ ⚠️ ⚠️ This is a pre-release version of the package to test the PyPI workflow. Proper release **with breaking API changes** will be by end of October. ⚠️ ⚠️ ⚠️

Efficient Differentiable PDE solvers built on top of JAX & Equinox.

@@ -15,7 +9,7 @@ DocumentationBackgroundRelated • - License + Acknowledgements

@@ -25,10 +19,10 @@ ## Installation ```bash -pip install git+ssh://git@github.com/Ceyron/exponax@main +pip install exponax ``` -Requires Python 3.10+ and JAX 0.4.13+ (and Equinox & Matplotlib). 👉 [JAX install guide](https://jax.readthedocs.io/en/latest/installation.html). +Requires Python 3.10+ and JAX 0.4.13+. 👉 [JAX install guide](https://jax.readthedocs.io/en/latest/installation.html). ## Quickstart @@ -90,13 +84,7 @@ For a next step, check out the [simple_advection_example_1d.ipynb](examples/simp ## Documentation -The following Jupyter notebooks showcase the usage of the package: - -1. [Simple Advection Example in 1d](docs/examples/simple_advection_example_1d.ipynb) -2. ... - -The documentation is still in progress. For now, the best way to get started is -to look at the examples and the docstrings in the code. +Documentation is available at [fkoehler.site/exponax](https://fkoehler.site/exponax/). ## Background @@ -168,12 +156,23 @@ This package also took much inspiration from the integral method of [2] and how to handle (de)aliasing. -## License +## Acknowledgements + +### Citation + +This package was developed as part of the `APEBench paper` (accepted at Neurips 2024), we will soon add the citation here. + +### Funding + +The main author (Felix Koehler) is a PhD student in the group of [Prof. Thuerey at TUM](https://ge.in.tum.de/) and his research is funded by the [Munich Center for Machine Learning](https://mcml.ai/). + +### License -MIT, see [here](LICENSE.txt) +MIT, see [here](https://github.com/Ceyron/exponax/blob/main/LICENSE.txt) --- > [fkoehler.site](https://fkoehler.site/)  ·  > GitHub [@ceyron](https://github.com/ceyron)  ·  -> X [@felix_m_koehler](https://twitter.com/felix_m_koehler) +> X [@felix_m_koehler](https://twitter.com/felix_m_koehler)  ·  +> LinkedIn [Felix Köhler](www.linkedin.com/in/felix-koehler)