diff --git a/.github/workflows/release.yml b/.github/workflows/ndelement-release.yml similarity index 85% rename from .github/workflows/release.yml rename to .github/workflows/ndelement-release.yml index 8faacde..6b7296e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/ndelement-release.yml @@ -1,6 +1,6 @@ # This file is based on one that was autogenerated by maturin v1.7.1 using: # maturin generate-ci github -name: 📦 +name: ndelement 📦 on: push: @@ -13,7 +13,7 @@ permissions: jobs: linux: - name: Build linux wheel + name: Build linux wheel for ndelement runs-on: ubuntu-latest strategy: matrix: @@ -44,16 +44,18 @@ jobs: ${{ matrix.platform.python }} -m pip install cffi - name: Build wheel - run: ${{ matrix.platform.python }} -m maturin build --release --out dist -i ${{ matrix.platform.python }} --target ${{ matrix.platform.target }} + run: | + cd ndelement + ${{ matrix.platform.python }} -m maturin build --release --out dist -i ${{ matrix.platform.python }} --target ${{ matrix.platform.target }} - name: Upload wheels uses: actions/upload-artifact@v4 with: name: ${{ matrix.platform.wheel }} - path: dist + path: ndelement/dist macos: - name: Build MacOS wheel + name: Build MacOS wheel for ndelement runs-on: ${{ matrix.platform.runner }} strategy: matrix: @@ -72,11 +74,12 @@ jobs: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter sccache: 'true' + working-directory: ndelement - name: Upload wheels uses: actions/upload-artifact@v4 with: name: wheels-macos-${{ matrix.platform.target }} - path: dist + path: ndelement/dist sdist: name: Make sdist @@ -89,16 +92,17 @@ jobs: rust-toolchain: nightly command: sdist args: --out dist + working-directory: ndelement - name: Upload sdist uses: actions/upload-artifact@v4 with: name: wheels-sdist - path: dist + path: ndelement/dist release: permissions: id-token: write - name: Push to PyPI + name: Push ndelement to PyPI runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/') needs: [linux, macos, sdist] diff --git a/.github/workflows/style-checks.yml b/.github/workflows/style-checks.yml index 1a27ceb..9d93689 100644 --- a/.github/workflows/style-checks.yml +++ b/.github/workflows/style-checks.yml @@ -44,11 +44,14 @@ jobs: with: python-version: "3.14" - run: | - python3 -m pip install ruff - python3 -m ruff check ndelement/python - python3 -m ruff format --check ndelement/python + python3 -m pip install ruff mypy + name: Install Ruff and mypy + - run: | + cd ndelement + python3 -m ruff check python + python3 -m ruff format --check python name: Run ruff checks - run: | - python3 -m pip install mypy - python3 -m mypy ndelement/python + cd ndelement + python3 -m mypy python name: Run mypy checks diff --git a/README.md b/README.md index 0bc0a42..82d35dc 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ method. ## The crates -### ndelement +### [ndelement](ndelement/) [![DefElement verification](https://defelement.org/badges/ndelement.svg)](https://defelement.org/verification/ndelement.html) [![crates.io](https://img.shields.io/crates/v/ndelement?color=blue)](https://crates.io/crates/ndelement) [![docs.rs](https://img.shields.io/docsrs/ndelement?label=docs.rs)](https://docs.rs/ndelement/latest/ndelement/) @@ -34,7 +34,7 @@ The Python functionality of the library can be tested by running: python -m pytest ndelement/python/test ``` -### ndgrid +### [ndgrid](ndgrid/) [![crates.io](https://img.shields.io/crates/v/ndgrid?color=blue)](https://crates.io/crates/ndgrid) ndgrid is an open-source library written in Rust for handling finite element grids/meshes. diff --git a/ndelement/Cargo.toml b/ndelement/Cargo.toml index 148a93d..ea0445a 100644 --- a/ndelement/Cargo.toml +++ b/ndelement/Cargo.toml @@ -13,7 +13,7 @@ description = "Finite element definition library." license = "BSD-3-Clause" homepage = "https://github.com/bempp/nd" repository = "https://github.com/bempp/nd" -readme = "../README.md" +readme = "README.md" keywords = ["numerics"] categories = ["mathematics", "science"] diff --git a/ndelement/LICENSE b/ndelement/LICENSE new file mode 100644 index 0000000..a295cc6 --- /dev/null +++ b/ndelement/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2022-, Timo Betcke, Matthew Scroggs +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/ndelement/README.md b/ndelement/README.md new file mode 100644 index 0000000..0ca17c6 --- /dev/null +++ b/ndelement/README.md @@ -0,0 +1,50 @@ +# ndelement + +[![DefElement verification](https://defelement.org/badges/ndelement.svg)](https://defelement.org/verification/ndelement.html) +[![crates.io](https://img.shields.io/crates/v/ndelement?color=blue)](https://crates.io/crates/ndelement) +[![docs.rs](https://img.shields.io/docsrs/ndelement?label=docs.rs)](https://docs.rs/ndelement/latest/ndelement/) +[![PyPI](https://img.shields.io/pypi/v/ndelement?color=blue&label=PyPI&logo=pypi&logoColor=white)](https://pypi.org/project/ndelement/) + +ndelement is an open-source library written in Rust that can be used to create finite elements on 1D, 2D, or 3D reference cells. + +## Using ndelement +### Rust +You can use the latest release of ndelement by adding the following to `[dependencies]` section of your Cargo.toml file: + +```toml +ndelement = "0.3.0" +``` + +### Python +You can install the latest release of ndelement by running: + +```bash +pip3 install ndelement +``` + +The Python functionality of the library can be tested by running: +```bash +python -m pytest ndelement/python/test +``` + +## Documentation +The latest documentation of nelement is available at +[bempp.github.io/nd/rust/ndelement](https://bempp.github.io/nd/rust/ndelement/) (Rust) +and [bempp.github.io/nd/python/ndelement](https://bempp.github.io/nd/python/ndelement/) (Python). + +## Testing +The Rust functionality of the library can be tested by running: +```bash +cargo test +``` + +## Examples +Examples of use can be found in the [examples](examples/) folder. + +## Getting help +Errors in should be added to the [nd GitHub issue tracker](https://github.com/bempp/nd/issues). + +Questions about use can be asked on the [Bempp Discourse](https://bempp.discourse.group). + +## Licence +ndelement is licensed under a BSD 3-Clause licence. diff --git a/ndelement/pyproject.toml b/ndelement/pyproject.toml index f87f607..97142e5 100644 --- a/ndelement/pyproject.toml +++ b/ndelement/pyproject.toml @@ -6,9 +6,9 @@ build-backend = "maturin" name = "ndelement" version = "0.3.0-dev" description = "Finite element definition library." -readme = "../README.md" +readme = "README.md" requires-python = ">=3.9" -license = { file = "../LICENSE" } +license = { file = "LICENSE" } authors = [{ name = "Matthew Scroggs", email = "rust@mscroggs.co.uk" }] classifiers = [ "Programming Language :: Rust", diff --git a/ndgrid/Cargo.toml b/ndgrid/Cargo.toml index d643980..31ef714 100644 --- a/ndgrid/Cargo.toml +++ b/ndgrid/Cargo.toml @@ -19,7 +19,7 @@ description = "Finite element grid library." license = "BSD-3-Clause" homepage = "https://github.com/bempp/nd" repository = "https://github.com/bempp/nd" -readme = "../README.md" +readme = "README.md" keywords = ["numerics"] categories = ["mathematics", "science"] diff --git a/ndgrid/LICENSE b/ndgrid/LICENSE new file mode 100644 index 0000000..a295cc6 --- /dev/null +++ b/ndgrid/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2022-, Timo Betcke, Matthew Scroggs +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/ndgrid/README.md b/ndgrid/README.md new file mode 100644 index 0000000..4948167 --- /dev/null +++ b/ndgrid/README.md @@ -0,0 +1,31 @@ +# ndgrid +[![crates.io](https://img.shields.io/crates/v/ndgrid?color=blue)](https://crates.io/crates/ndgrid) + +ndgrid is an open-source library written in Rust for handling finite element grids/meshes. + +## Using ndgrid +You can use the latest release of ndgrid by adding the following to `[dependencies]` section of your Cargo.toml file: + +```toml +ndgrid = "0.1.5" +``` + +## Documentation +The latest documentation of ngrid is available at [bempp.github.io/nd/rust/ndgrid](https://bempp.github.io/nd/rust/ndgrid/). + +## Testing +The Rust functionality of the library can be tested by running: +```bash +cargo test +``` + +## Examples +Examples of use can be found in the [examples](examples/) folder. + +## Getting help +Errors in should be added to the [nd GitHub issue tracker](https://github.com/bempp/nd/issues). + +Questions about use can be asked on the [Bempp Discourse](https://bempp.discourse.group). + +## Licence +ndgrid is licensed under a BSD 3-Clause licence.