Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python tests (1) #11

Merged
merged 22 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d6d47cf
bindings created
aliddell Oct 8, 2024
e85d185
pip install . working
aliddell Oct 9, 2024
2b648c1
python -m build working (on Windows anyway)
aliddell Oct 9, 2024
2ef675c
get it building on linux
aliddell Oct 9, 2024
9a44c42
Remove test stub (save for the next PR)
aliddell Oct 9, 2024
3978d55
Undo an overzealous rename
aliddell Oct 9, 2024
2a4c0a8
Add Python wheel build job
aliddell Oct 9, 2024
7ed144e
Prepare for Python bindings
aliddell Oct 9, 2024
68d3b0b
Merge branch 'python-bindings-prep' into python-bindings
aliddell Oct 9, 2024
c160d7c
Don't export the enum values into the module base namespace.
aliddell Oct 9, 2024
7e51977
(wip) some basic tests
aliddell Oct 9, 2024
8c76e2d
Revert CMake minimum version and use cmake_policy. Using builtin `BUI…
aliddell Oct 9, 2024
60a0bd5
Update build.yml
aliddell Oct 9, 2024
9c5c6bf
Update release.yml
aliddell Oct 9, 2024
1a9d1be
Merge branch 'python-bindings-prep' into python-bindings
aliddell Oct 9, 2024
2dc2fa6
Merge remote-tracking branch 'upstream/python-bindings-prep' into pyt…
aliddell Oct 9, 2024
f3b1e84
Merge branch 'python-bindings' into python-tests
aliddell Oct 9, 2024
40b14ad
Merge remote-tracking branch 'upstream/main' into python-bindings
aliddell Oct 9, 2024
50f889d
Merge remote-tracking branch 'upstream/python-bindings' into python-t…
aliddell Oct 9, 2024
8faabe5
some simple tests
aliddell Oct 10, 2024
7e97dd7
add python tests to CI
aliddell Oct 10, 2024
e219b0b
Merge remote-tracking branch 'upstream/main' into python-tests
aliddell Oct 10, 2024
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
54 changes: 48 additions & 6 deletions .github/workflows/test_pr.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ jobs:
submodules: true
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install minio and mcli
run: |
apt update && apt install -y tmux wget
Expand Down Expand Up @@ -137,4 +132,51 @@ jobs:
ZARR_S3_BUCKET_NAME: ${{ env.MINIO_BUCKET }}
ZARR_S3_ACCESS_KEY_ID: ${{ env.MINIO_ACCESS_KEY }}
ZARR_S3_SECRET_ACCESS_KEY: ${{ env.MINIO_SECRET_KEY }}
run: ctest -C ${{env.BUILD_TYPE}} -L s3 --output-on-failure
run: ctest -C ${{env.BUILD_TYPE}} -L s3 --output-on-failure

test_python:
name: Test on ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
platform:
- "ubuntu-latest"
- "windows-latest"
- "macos-latest"

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3
with:
submodules: true
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg && ./bootstrap-vcpkg.sh
echo "VCPKG_ROOT=${{github.workspace}}/vcpkg" >> $GITHUB_ENV
echo "${{github.workspace}}/vcpkg" >> $GITHUB_PATH
./vcpkg integrate install
shell: bash

- name: Install dependencies
run: python -m pip install -U pip "pybind11[global]" cmake build numpy pytest

- name: Build and install Python bindings
run: python -m pip install .

- name: Run tests
run: python -m pytest -v

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ build-backend = "setuptools.build_meta"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
addopts = "-ra -q --color=yes"
log_cli = true # when true, messages are printed immediately
testpaths = [
"python/tests",
]
1 change: 0 additions & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
project(acquire-zarr-py)
cmake_policy(SET CMP0057 NEW)

execute_process(COMMAND python3 -m pybind11 --cmakedir
RESULT_VARIABLE pybind11_NOT_FOUND
Expand Down
Loading
Loading