Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
kounelisagis committed Dec 12, 2024
1 parent e2c8ab4 commit cc60884
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 89 deletions.
87 changes: 3 additions & 84 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,52 +23,6 @@ env:
TILEDB_TOKEN: ${{ secrets.TILEDB_TOKEN }}

jobs:
build_wheels:
name: Wheel ${{ matrix.buildplat[0] }}-${{ matrix.buildplat[1] }}-${{ matrix.python }}
runs-on: ${{ matrix.buildplat[0] }}
strategy:
matrix:
buildplat:
- [ubuntu-22.04, manylinux_x86_64]
- [linux-arm64-ubuntu24, manylinux_aarch64]
- [macos-13, macosx_x86_64]
- [macos-14, macosx_arm64]
- [windows-2022, win_amd64]
python: ["cp39", "cp310", "cp311", "cp312", "cp313"]

steps:
- uses: actions/checkout@v4

- name: "Brew setup on macOS" # x-ref c8e49ba8f8b9ce
if: ${{ startsWith(matrix.buildplat[0], 'macos-') == true }}
run: |
set -e pipefail
brew update
brew install automake pkg-config ninja llvm
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD_VERBOSITY: 3
CIBW_ENVIRONMENT_PASS_LINUX: SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TILEDB S3_BUCKET TILEDB_TOKEN TILEDB_NAMESPACE
CIBW_ENVIRONMENT_MACOS: >
CC=clang
CXX=clang++
MACOSX_DEPLOYMENT_TARGET: "11.0"
CIBW_ARCHS: all
CIBW_PRERELEASE_PYTHONS: True
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
# __init__.py interferes with the tests and is included as local file instead of
# used from wheels. To be honest, tests should not be in the source folder at all.
CIBW_BEFORE_TEST: rm {project}/tiledb/__init__.py
with:
output-dir: wheelhouse

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.buildplat[0] }}-${{ matrix.buildplat[1] }}-${{ matrix.python }}
path: "./wheelhouse/*.whl"

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
Expand Down Expand Up @@ -96,13 +50,11 @@ jobs:
strategy:
matrix:
os:
- macos-13
- macos-14
- windows-2022
- ubuntu-22.04
- linux-arm64-ubuntu24
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python: ["3.12"]
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
Expand All @@ -129,37 +81,4 @@ jobs:
PROJECT_CWD=$PWD
rm tiledb/__init__.py
cd ..
pytest -vv --showlocals $PROJECT_CWD
- name: "Re-run tests without pandas"
run: |
pip uninstall -y pandas
pytest -vv --showlocals $PROJECT_CWD
upload_pypi:
needs: [build_wheels, test_sdist]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
outputs:
package_version: ${{ steps.get_package_version.outputs.package_version }}
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true

- id: get_package_version
run: |
echo "package_version=$(ls dist/ | head -n 1 | cut -d - -f 2)" >> "$GITHUB_OUTPUT"
- name: Upload to test-pypi
if: inputs.test_pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

- name: Upload to pypi
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1
pytest -o log_cli=true --log-cli-level=10 $PROJECT_CWD/tiledb/tests/test_schema_evolution.py -k test_schema_evolution_drop_fixed_attribute_and_add_back_as_var_sized
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ if (NOT TileDB_FOUND)
message(STATUS "Downloading TileDB default version ...")
# Download latest release
fetch_prebuilt_tiledb(
VERSION 2.26.2
RELLIST_HASH SHA256=86c19d7c5246cb18e370a4272cead63ea84bd651789842e618de4d57d4510522
)
VERSION 2.27.0
RELLIST_HASH SHA256=8056514b1949cdab19405376e32e299578491a6d3e953321d12d761f94dc19b9
)
endif()
find_package(TileDB REQUIRED)
set(TILEDB_DOWNLOADED TRUE)
Expand Down
11 changes: 11 additions & 0 deletions tiledb/core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,17 @@ class PyQuery {
now - start_submit;
}

for (const auto& bp : buffers_) {
py::print("buffer name: ", bp.first);
py::print("data: ", bp.second.data);
std::cout << "data_type: " << bp.second.type << std::endl;
py::print("dtype: ", bp.second.dtype);
py::print("offsets: ", bp.second.offsets);
py::print("validity: ", bp.second.validity);
py::print("isvar: ", bp.second.isvar);
py::print("isnullable: ", bp.second.isnullable);
}

// update the BufferInfo read-counts to match the query results read
update_read_elem_num();

Expand Down
4 changes: 2 additions & 2 deletions tiledb/fragment.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import tiledb
from tiledb.libtiledb import version as libtiledb_version

from .main import PyFragmentInfo

"""
Classes and functions relating to TileDB fragments.
"""
Expand Down Expand Up @@ -105,6 +103,8 @@ def __init__(self, array_uri, include_mbrs=False, ctx=None):

self.array_uri = array_uri

from .main import PyFragmentInfo

fi = PyFragmentInfo(self.array_uri, schema, include_mbrs, ctx)

self.__nums = fi.get_num_fragments()
Expand Down

0 comments on commit cc60884

Please sign in to comment.