-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
123 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,4 @@ | ||
|
||
<h1 align="center"> | ||
<img src="docs/imgs/exponax_logo.png" width="200"> | ||
<br> | ||
Exponax | ||
<br> | ||
</h1> | ||
⚠️ ⚠️ ⚠️ 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. ⚠️ ⚠️ ⚠️ | ||
|
||
<h4 align="center">Efficient Differentiable PDE solvers built on top of <a href="https://github.com/google/jax" target="_blank">JAX</a> & <a href="https://github.com/patrick-kidger/equinox" target="_blank">Equinox</a>.</h4> | ||
|
||
|
@@ -15,7 +9,7 @@ | |
<a href="#documentation">Documentation</a> • | ||
<a href="#background">Background</a> • | ||
<a href="#related">Related</a> • | ||
<a href="#license">License</a> | ||
<a href="#acknowledgements">Acknowledgements</a> | ||
</p> | ||
|
||
<p align="center"> | ||
|
@@ -25,10 +19,10 @@ | |
## Installation | ||
|
||
```bash | ||
pip install git+ssh://[email protected]/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) |