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
33 changes: 19 additions & 14 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,30 @@ on: [push, pull_request]

jobs:
tests:
if: contains(github.event.head_commit.message, '[run-tests]')
if: |
github.event_name == 'push' && contains(github.event.head_commit.message, '[run-tests]') ||
github.event_name == 'pull_request'
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
os: [ubuntu-latest, windows-latest, macos-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[dev]

- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev]

- name: Run tests
run: |
python tests/runtests.py
- name: Run tests
run: |
python tests/runtests.py
103 changes: 67 additions & 36 deletions .github/workflows/upload-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,75 +9,106 @@ on:
jobs:
make_sdist:
if: contains(github.event.head_commit.message, '[upload-to-pypi]')
name: Make SDist
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Install deps
run: python -m pip install build twine
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Build SDist
run: python -m build --sdist
- name: Build sdist
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build
python -m build --sdist

- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz

- name: Check metadata
run: twine check dist/*
- name: Upload sdist artifact
uses: actions/upload-artifact@v4
with:
name: dist-sdist
path: dist/*.tar.gz

build_wheels:
if: contains(github.event.head_commit.message, '[upload-to-pypi]')
name: Build wheels on ${{ matrix.os }}
name: Build wheels (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# Allows building non-amd64 wheels on Linux.
- name: Set up QEMU
- name: Set up QEMU (Linux only)
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- uses: actions/setup-python@v2

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install cibuildwheel
run: python -m pip install cibuildwheel
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade cibuildwheel

- name: Build wheels
env:
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"

CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_*"
CIBW_ARCHS_MACOS: "x86_64 arm64"

CIBW_PRERELEASE_PYTHONS: "1"

CIBW_ARCHS_LINUX: "auto aarch64"
run: python -m cibuildwheel --output-dir wheelhouse

- uses: actions/upload-artifact@v2
CIBW_ARCHS_MACOS: "arm64"
run: |
python -m cibuildwheel --output-dir dist

- name: Upload wheel artifacts
uses: actions/upload-artifact@v4
with:
path: wheelhouse/*.whl
name: dist-wheels-${{ matrix.os }}
path: dist/*.whl

upload_all:
if: contains(github.event.head_commit.message, '[upload-to-pypi]')
needs: [build_wheels, make_sdist]
name: Upload to PyPI
runs-on: ubuntu-latest
needs: [make_sdist, build_wheels]

steps:
- name: Download all dists
uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: dist

- name: Install modern twine (avoid metadata parser issues)
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade "twine>=6.2.0" "packaging>=24.2" "pkginfo>=1.12.0"
python -m twine --version
python -m pip show twine packaging pkginfo

- uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- name: Check metadata
run: |
ls -lah dist
python -m twine check dist/*

- uses: pypa/gh-action-pypi-publish@v1.4.1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Upload to PyPI (twine)
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m twine upload \
--non-interactive \
dist/*
113 changes: 74 additions & 39 deletions .github/workflows/upload-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,82 +1,117 @@
name: Upload package to Pypi
name: Upload package to TestPyPI

on:
push:
branches:
- '**'
branches:
- main
- 'release*'
- dev

jobs:
make_sdist:
if: contains(github.event.head_commit.message, '[upload-to-test-pypi]')
name: Make SDist
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Install deps
run: python -m pip install build twine
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Build SDist
run: python -m build --sdist
- name: Build sdist
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build
python -m build --sdist

- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz

- name: Check metadata
run: twine check dist/*
- name: Upload sdist artifact
uses: actions/upload-artifact@v4
with:
name: dist-sdist
path: dist/*.tar.gz

build_wheels:
if: contains(github.event.head_commit.message, '[upload-to-test-pypi]')
name: Build wheels on ${{ matrix.os }}
name: Build wheels (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up QEMU
- name: Set up QEMU (Linux only)
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- uses: actions/setup-python@v2

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install cibuildwheel
run: python -m pip install cibuildwheel
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade cibuildwheel

- name: Build wheels
env:
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"

CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_*"
CIBW_ARCHS_MACOS: "x86_64 arm64"

CIBW_PRERELEASE_PYTHONS: "1"

CIBW_ARCHS_LINUX: "auto aarch64"
run: python -m cibuildwheel --output-dir wheelhouse

- uses: actions/upload-artifact@v2
CIBW_ARCHS_MACOS: "arm64"
run: |
python -m cibuildwheel --output-dir dist

- name: Upload wheel artifacts
uses: actions/upload-artifact@v4
with:
path: wheelhouse/*.whl
name: dist-wheels-${{ matrix.os }}
path: dist/*.whl

upload_all:
if: contains(github.event.head_commit.message, '[upload-to-test-pypi]')
needs: [build_wheels, make_sdist]
name: Upload to TestPyPI
runs-on: ubuntu-latest
needs: [make_sdist, build_wheels]

steps:
- name: Download all dists
uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: dist

- name: Install modern twine (avoid metadata parser issues)
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade "twine>=6.2.0" "packaging>=24.2" "pkginfo>=1.12.0"
python -m twine --version
python -m pip show twine packaging pkginfo

- uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- name: Check metadata
run: |
ls -lah dist
python -m twine check dist/*

- uses: pypa/gh-action-pypi-publish@v1.4.1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Upload to TestPyPI (twine)
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: |
python -m twine upload \
--repository-url https://test.pypi.org/legacy/ \
--non-interactive \
--skip-existing \
dist/*
7 changes: 7 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include LICENSE
include README.md
include pyproject.toml
include setup.py

recursive-include rocket_fft *.py *.pyi *.h *.cpp py.typed
recursive-include tests *.py
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![status](https://img.shields.io/pypi/status/rocket-fft?color=%2376519B)](https://pypi.org/project/rocket-fft/)
[![downloads](https://img.shields.io/pypi/dm/rocket-fft?color=%2376519B)](https://pypi.org/project/rocket-fft/)

![](https://raw.githubusercontent.com/styfenschaer/rocket-fft/release0.2.5/assets/fourier.gif)
![](https://raw.githubusercontent.com/styfenschaer/rocket-fft/release0.3.0/assets/fourier.gif)

Rocket-FFT makes [Numba](https://numba.pydata.org/) aware of `numpy.fft` and `scipy.fft`. It takes its name from the [PocketFFT](https://github.com/mreineck/pocketfft) Fast Fourier Transformation library that powers it, and Numba's goal of making your scientific Python code blazingly fast - like a rocket.

Expand Down
Loading