Skip to content

Commit

Permalink
Merge branch 'main' into healpix-grid
Browse files Browse the repository at this point in the history
  • Loading branch information
benbovy committed Oct 10, 2024
2 parents ccf2caf + 80334ab commit de9be92
Show file tree
Hide file tree
Showing 34 changed files with 1,990 additions and 2,211 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: pipx run build --sdist

- name: Upload SDist
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz

Expand All @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.16
uses: pypa/cibuildwheel@v2.21
env:
# skip PyPy and muslinux (for now)
CIBW_SKIP: "pp* *musllinux*"
Expand All @@ -60,7 +60,7 @@ jobs:
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- name: Get dist files
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: artifact
path: dist
Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-20.04", "ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout repo
uses: actions/checkout@v3
Expand All @@ -95,3 +95,24 @@ jobs:
- name: Run tests
run: |
pytest python/fastscapelib/tests -vv --color=yes
test_npy:
name: Test Python (Numpy 1.xx compat)
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Build and install Fastscapelib Python (Numpy 2.x)
run: |
python -m pip install . --config-settings=cmake.define.FS_DOWNLOAD_XTENSOR_PYTHON=ON
- name: Run tests (Numpy 1.xx)
run: |
python -m pip install numpy==1.26.4 pytest
pytest python/fastscapelib/tests -vv --color=yes
12 changes: 8 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: debug-statements
- id: mixed-line-ending
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.10.0
hooks:
- id: black
args: [--safe, --quiet]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.2
rev: v19.1.1
hooks:
- id: clang-format
args: [--style=file]

ci:
autofix_prs: false
autoupdate_schedule: monthly
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ if(SKBUILD AND FS_DOWNLOAD_XTENSOR_PYTHON)

FetchContent_Declare(xtensor
GIT_REPOSITORY https://github.com/xtensor-stack/xtensor
GIT_TAG 0.24.6
GIT_TAG 0.25.0
GIT_SHALLOW TRUE)
set(CPP17 ON CACHE BOOL "Enable C++17 for xtensor" FORCE)
FetchContent_MakeAvailable(xtensor)

FetchContent_Declare(xtensor-python
GIT_REPOSITORY https://github.com/xtensor-stack/xtensor-python
GIT_TAG 0.26.1
GIT_TAG 0.27.0
GIT_SHALLOW TRUE)
FetchContent_MakeAvailable(xtensor-python)

Expand Down
3 changes: 2 additions & 1 deletion doc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ name: fastscapelib-docs
channels:
- conda-forge
dependencies:
- python=3.9
- python=3.11
- breathe
- cmake
- healpix_cxx
- xtensor-python
- pybind11
- scikit-build-core
- numpy
- numba
- matplotlib-base
- pygalmesh
- sphinx
Expand Down
4 changes: 2 additions & 2 deletions doc/source/api_python/hidden.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

MSTMethod
MSTRouteMethod
flow.numba_flow_kernel.NumbaFlowKernel
flow.numba_flow_kernel.NumbaFlowKernelData
flow.numba.flow_kernel.NumbaFlowKernel
flow.numba.flow_kernel.NumbaFlowKernelData
Loading

0 comments on commit de9be92

Please sign in to comment.