-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added support for 3.13
- Loading branch information
Showing
8 changed files
with
105 additions
and
68 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 |
---|---|---|
|
@@ -6,19 +6,17 @@ on: | |
- "*" | ||
|
||
jobs: | ||
test: | ||
build_docs: | ||
name: Build docs | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
- name: Set up python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
python-version: 3.12 | ||
cache: 'pip' | ||
|
||
- name: Set up HDF5 | ||
|
@@ -29,7 +27,10 @@ jobs: | |
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
pip install cmake pybind11 numpy tox | ||
DEPENDENCIES=$(python -c 'from setuptools.config.setupcfg import read_configuration as c; a = c("setup.cfg"); print(" ".join(a["options"]["install_requires"][1:]))') | ||
pip install ${DEPENDENCIES} | ||
DOCDEPENDENCIES=$(python -c 'with open("docs/requirements.txt") as a: available = list(a); print(" ".join(map(lambda x : x.strip(), filter(lambda x : not x.startswith("#"), available))))') | ||
pip install ${DOCDEPENDENCIES} | ||
- name: Build docs | ||
run: | | ||
|
@@ -39,8 +40,9 @@ jobs: | |
touch ./docs/_build/html/.nojekyll | ||
- name: GH Pages Deployment | ||
uses: JamesIves/[email protected] | ||
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages # The branch the action should deploy to. | ||
folder: ./docs/_build/html | ||
clean: true # Automatically remove deleted files from the deploy branch | ||
clean: true # Automatically remove deleted files from the deploy branch |
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 |
---|---|---|
|
@@ -11,27 +11,28 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS: x86_64 | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8" | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9" | ||
CIBW_MANYLINUX_X86_64_IMAGE: ghcr.io/artifactdb/prebuilt-hdf5/manylinux_x86_64:0.0.4 | ||
CIBW_MUSLLINUX_X86_64_IMAGE: ghcr.io/artifactdb/prebuilt-hdf5/musllinux_x86_64:0.0.4 | ||
CIBW_SKIP: pp* | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-ubuntu-x86_64 | ||
path: ./wheelhouse/*.whl | ||
|
||
build_macosx_x86_64: | ||
name: Build wheels for macosx x86_64 | ||
runs-on: macos-13 | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Grab prebuilt dependencies | ||
run: | | ||
|
@@ -42,22 +43,23 @@ jobs: | |
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS: x86_64 | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8" | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9" | ||
CIBW_ENVIRONMENT: "MORE_CMAKE_OPTIONS=\"-DCMAKE_INSTALL_PREFIX=$(pwd)/installed -DCMAKE_OSX_ARCHITECTURES=x86_64\"" | ||
CIBW_BUILD_VERBOSITY: 3 | ||
CIBW_SKIP: pp* | ||
MACOSX_DEPLOYMENT_TARGET: 11.7 | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-macos-x86_64 | ||
path: ./wheelhouse/*.whl | ||
|
||
build_macosx_arm64: | ||
name: Build wheels for macosx arm64 | ||
runs-on: macos-13 | ||
runs-on: macos-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Grab prebuilt dependencies | ||
run: | | ||
|
@@ -68,79 +70,77 @@ jobs: | |
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS: arm64 | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8" | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9" | ||
CIBW_ENVIRONMENT: "MORE_CMAKE_OPTIONS=\"-DCMAKE_INSTALL_PREFIX=$(pwd)/installed -DCMAKE_OSX_ARCHITECTURES=arm64\"" | ||
CIBW_BUILD_VERBOSITY: 3 | ||
MACOSX_DEPLOYMENT_TARGET: 13.0 | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-maxos_arm64 | ||
path: ./wheelhouse/*.whl | ||
|
||
# build_windows_x86_64: | ||
# name: Build wheels for windows x86_64 | ||
# runs-on: windows-2019 | ||
# steps: | ||
# - name: Check out repository | ||
# uses: actions/checkout@v3 | ||
|
||
# uses: actions/checkout@v4 | ||
# | ||
# - name: Grab prebuilt dependencies | ||
# run: | | ||
# curl -L https://github.com/ArtifactDB/prebuilt-hdf5/releases/download/0.0.4/windows_x86_64.tar.gz > bundle.tar.gz | ||
# tar -xvf bundle.tar.gz | ||
# shell: bash | ||
|
||
# | ||
# - name: Store path | ||
# run: | | ||
# $wd = pwd | ||
# echo "INSTALL_DIR=$wd\\installed" >> $env:GITHUB_ENV | ||
# shell: powershell | ||
|
||
# | ||
# - name: Build wheels | ||
# uses: pypa/[email protected] | ||
# env: | ||
# CIBW_ARCHS: AMD64 | ||
# CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8" | ||
# CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9" | ||
# CIBW_ENVIRONMENT: "MORE_CMAKE_OPTIONS=\"-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}\" VERBOSE=1" | ||
# CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel" | ||
# CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}" | ||
# CIBW_TEST_EXTRAS: "testing" | ||
# CIBW_TEST_COMMAND: "pytest {package}/tests" | ||
# CIBW_BUILD_VERBOSITY: 3 | ||
|
||
# - uses: actions/upload-artifact@v3 | ||
# with: | ||
# path: ./wheelhouse/*.whl | ||
# - uses: actions/upload-artifact@v3 | ||
# with: | ||
# path: ./wheelhouse/*.whl | ||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Build sdist | ||
run: pipx run build --sdist | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-sdist | ||
path: dist/*.tar.gz | ||
|
||
upload_pypi: | ||
needs: [build_linux_x86_64, build_macosx_x86_64, build_macosx_arm64, build_sdist] | ||
runs-on: ubuntu-latest | ||
# upload to PyPI on every tag starting with 'v' | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
# unpacks default artifact into dist/ | ||
# if `name: artifact` is omitted, the action will create extra parent dir | ||
name: artifact | ||
pattern: cibw-* | ||
path: dist | ||
merge-multiple: true | ||
|
||
- uses: pypa/gh-action-pypi-publish@v1.8.3 | ||
- uses: pypa/gh-action-pypi-publish@v1.12.2 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_PASSWORD }} |
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,56 +1,37 @@ | ||
name: Run unit tests | ||
name: Test the library | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
branches: | ||
- master | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
test: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] | ||
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | ||
|
||
name: Python ${{ matrix.python-version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache: "pip" | ||
|
||
- name: Set up HDF5 | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libhdf5-dev | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
DEPENDENCIES=$(python -c 'from setuptools.config.setupcfg import read_configuration as c; a = c("setup.cfg"); print(" ".join(a["options"]["install_requires"][1:] + a["options"]["extras_require"]["testing"][1:]))') | ||
pip install ${DEPENDENCIES} pybind11 | ||
- name: Get latest CMake | ||
uses: lukka/get-cmake@latest | ||
|
||
# We do proper tests if we're on the master branch, or if we're creating a new release. | ||
- name: Test with tox | ||
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
pip install tox | ||
tox | ||
# Otherwise we do some cached builds and tests for faster merging of PRs. | ||
- name: Set up ccache | ||
if: github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags') | ||
uses: hendrikmuhs/[email protected] | ||
|
||
- name: Quickly build and test | ||
if: github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags') | ||
run: | | ||
CC="ccache gcc" python setup.py install | ||
pytest |
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,32 @@ | ||
exclude: '^docs/conf.py' | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: check-xml | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: requirements-txt-fixer | ||
- id: mixed-line-ending | ||
args: ['--fix=auto'] # replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.8.2 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- id: ruff-format | ||
|
||
## Check for misspells in documentation files: | ||
# - repo: https://github.com/codespell-project/codespell | ||
# rev: v2.2.5 | ||
# hooks: | ||
# - id: codespell |
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
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
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
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