-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Housekeeping: build with numpy 2.0; update JAX lowering syntax; etc. (#…
…129) * update deps * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * disable unstable test * Don't print * Faster building; slower running * fast run wheels * building --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
b4c25b1
commit 657d0d7
Showing
15 changed files
with
1,577 additions
and
1,518 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
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,24 +1,34 @@ | ||
name: Wheels | ||
on: | ||
release: | ||
types: [published] | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "*" | ||
workflow_dispatch: | ||
inputs: | ||
prerelease: | ||
description: "Run a pre-release, testing the build" | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
build_wheels: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
os: | ||
- "ubuntu-22.04" | ||
- "macos-12" | ||
- "macos-14" | ||
- "windows-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
- uses: pypa/[email protected] | ||
env: | ||
CIBW_SKIP: "pp* *-win32 *-manylinux_i686 *-musllinux*" | ||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | ||
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64" | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: binary-${{ matrix.os }} | ||
|
@@ -34,28 +44,32 @@ jobs: | |
- uses: actions/setup-python@v5 | ||
name: Install Python | ||
with: | ||
python-version: "3.9" | ||
- name: Build sdist | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -U build | ||
python -m build --sdist . | ||
python -m pip install -U build twine | ||
- name: Build sdist | ||
run: python -m build --sdist . | ||
- name: Check the sdist | ||
run: python -m twine check dist/*.tar.gz | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: sdist | ||
path: dist/*.tar.gz | ||
|
||
upload_pypi: | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/celerite2 | ||
permissions: | ||
id-token: write | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
path: dist | ||
merge-multiple: true | ||
|
||
- uses: pypa/[email protected] | ||
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
cmake_minimum_required(VERSION 3.15...3.27) | ||
project( | ||
${SKBUILD_PROJECT_NAME} | ||
VERSION ${SKBUILD_PROJECT_VERSION} | ||
LANGUAGES CXX) | ||
|
||
set(PYBIND11_NEWPYTHON ON) | ||
find_package(pybind11 CONFIG REQUIRED) | ||
|
||
include_directories( | ||
"c++/include" | ||
"c++/vendor/eigen" | ||
"python/celerite2") | ||
|
||
pybind11_add_module(driver "python/celerite2/driver.cpp") | ||
target_compile_features(driver PUBLIC cxx_std_14) | ||
install(TARGETS driver LIBRARY DESTINATION ${SKBUILD_PROJECT_NAME}) | ||
|
||
pybind11_add_module(backprop "python/celerite2/backprop.cpp") | ||
target_compile_features(backprop PUBLIC cxx_std_14) | ||
install(TARGETS backprop LIBRARY DESTINATION ${SKBUILD_PROJECT_NAME}) | ||
|
||
pybind11_add_module(xla_ops "python/celerite2/jax/xla_ops.cpp") | ||
target_compile_features(xla_ops PUBLIC cxx_std_14) | ||
install(TARGETS xla_ops LIBRARY DESTINATION "${SKBUILD_PROJECT_NAME}/jax") |
Submodule eigen
updated
from 0fd6b4 to d791d4
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,61 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=40.6.0", | ||
"wheel", | ||
"setuptools_scm", | ||
"oldest-supported-numpy", | ||
"pybind11>=2.4", | ||
[project] | ||
name = "celerite2" | ||
description = "Fast and scalable Gaussian Processes in 1D" | ||
authors = [{ name = "Dan Foreman-Mackey", email = "[email protected]" }] | ||
readme = "README.md" | ||
requires-python = ">=3.9" | ||
license = { text = "MIT License" } | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
] | ||
dynamic = ["version"] | ||
dependencies = ["numpy"] | ||
|
||
[project.optional-dependencies] | ||
test = ["pytest", "scipy", "celerite"] | ||
pymc3 = ["pymc3>=3.9", "numpy<1.22", "xarray<2023.10.0"] | ||
theano = ["pymc3>=3.9", "numpy<1.22", "xarray<2023.10.0"] | ||
pymc = ["pymc>=5.9.2"] | ||
jax = ["jax"] | ||
docs = [ | ||
"sphinx", | ||
"sphinx-material", | ||
"sphinx_copybutton", | ||
"breathe", | ||
"myst-nb", | ||
"matplotlib", | ||
"scipy", | ||
"emcee", | ||
"pymc>=5", | ||
"tqdm", | ||
"numpyro", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
tutorials = ["matplotlib", "scipy", "emcee", "pymc>=5", "tqdm", "numpyro"] | ||
|
||
[project.urls] | ||
"Homepage" = "https://celerite2.readthedocs.io" | ||
"Source" = "https://github.com/exoplanet-dev/celerite2" | ||
"Bug Tracker" = "https://github.com/exoplanet-dev/celerite2/issues" | ||
|
||
[build-system] | ||
requires = ["scikit-build-core", "numpy", "pybind11"] | ||
build-backend = "scikit_build_core.build" | ||
|
||
[tool.scikit-build] | ||
sdist.exclude = [] | ||
sdist.include = ["python/celerite2/celerite2_version.py"] | ||
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" | ||
|
||
[tool.setuptools_scm] | ||
write_to = "python/celerite2/celerite2_version.py" | ||
|
||
[tool.cibuildwheel] | ||
skip = "pp* *-win32 *-musllinux_* *-manylinux_i686" | ||
|
||
[tool.black] | ||
line-length = 79 | ||
|
Oops, something went wrong.