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

Release 0.19.0 Against 2.13.0 #1487

Merged
merged 10 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-11, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
fail-fast: false
env:
MACOSX_DEPLOYMENT_TARGET: "10.15"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/daily-test-build-numpy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-11, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
include:
# https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg
- python-version: "3.11"
numpy-version: "1.23.2"
- python-version: "3.10"
numpy-version: "1.21.6"
- python-version: "3.9"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily-test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
python-version: "3.11"

- name: Print Python version
run: |
Expand Down
9 changes: 8 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# In Progress
# Release 0.19.0

## Packaging Notes
* Added support for Python 3.11

## TileDB Embedded updates:
* TileDB-Py 0.19.0 includes TileDB Embedded [TileDB 2.13.0](https://github.com/TileDB-Inc/TileDB/releases/tag/2.13.0)

## API Changes
* Support Boolean types for query conditions [#1432](https://github.com/TileDB-Inc/TileDB-Py/pull/1432)
Expand All @@ -10,6 +16,7 @@
## Bug Fixes
* Fix issue where queries in delete mode error out on arrays with string dimensions [#1473](https://github.com/TileDB-Inc/TileDB-Py/pull/1473)
* Fix representation of nullable integers in dataframe when using PyArrow path [#1439](https://github.com/TileDB-Inc/TileDB-Py/pull/1439)
* Check for uninitialized query state after submit and error out if uninitialized [#1483](https://github.com/TileDB-Inc/TileDB-Py/pull/1483)

# Release 0.18.3

Expand Down
6 changes: 2 additions & 4 deletions examples/query_condition_dense.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
import tiledb
import numpy as np
from pprint import pprint
import tempfile
import string

uri = "query_condition_dense"

Expand Down Expand Up @@ -67,14 +65,14 @@ def read_array(path):
print()

with tiledb.open(uri) as arr:
qc = tiledb.QueryCondition("(2 < attr1 < 6) and (attr2 < 0.5 or attr2 > 0.85)")
qc = "(2 < attr1 < 6) and (attr2 < 0.5 or attr2 > 0.85)"
print(f"--- with query condition {qc}:")

print(f"--- the fill value for attr1 is {arr.attr('attr1').fill}")
print(f"--- the fill value for attr1 is {arr.attr('attr2').fill}")

print()
res = arr.query(attr_cond=qc)[:]
res = arr.query(cond=qc)[:]
pprint(res)


Expand Down
6 changes: 2 additions & 4 deletions examples/query_condition_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
import tiledb
import numpy as np
from pprint import pprint
import tempfile
import string

uri = "query_condition_sparse"

Expand Down Expand Up @@ -67,10 +65,10 @@ def read_array(path):
print()

with tiledb.open(uri) as arr:
qc = tiledb.QueryCondition("(2 < attr1 < 6) and (attr2 < 0.5 or attr2 > 0.85)")
qc = "(2 < attr1 < 6) and (attr2 < 0.5 or attr2 > 0.85)"
print(f"--- with query condition {qc}:")
print()
res = arr.query(attr_cond=qc)[:]
res = arr.query(cond=qc)[:]
pprint(res)


Expand Down
6 changes: 2 additions & 4 deletions examples/query_condition_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ def create_array(path):

def read_array(path, cond):
with tiledb.open(path) as arr:
qc = tiledb.QueryCondition(cond)

print("QueryCondition is: ", qc)
res = arr.query(attr_cond=qc)[:]
print("QueryCondition is: ", cond)
res = arr.query(cond=cond)[:]
return res


Expand Down
33 changes: 15 additions & 18 deletions examples/vfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,37 +76,34 @@ def write():
# Create TileDB VFS
vfs = tiledb.VFS()

# Create VFS file handle
f = vfs.open("tiledb_vfs.bin", "wb")

# Write binary data
vfs.write(f, struct.pack("f", 153.0))
vfs.write(f, "abcd".encode("utf-8"))
vfs.close(f)
with vfs.open("tiledb_vfs.bin", "wb") as f:
f.write(struct.pack("f", 153.0))
f.write("abcd".encode("utf-8"))

# Write binary data again - this will overwrite the previous file
f = vfs.open("tiledb_vfs.bin", "wb")
vfs.write(f, struct.pack("f", 153.1))
vfs.write(f, "abcdef".encode("utf-8"))
vfs.close(f)
with vfs.open("tiledb_vfs.bin", "wb") as f:
f.write(struct.pack("f", 153.1))
f.write("abcdef".encode("utf-8"))

# Append binary data to existing file (this will NOT work on S3)
f = vfs.open("tiledb_vfs.bin", "ab")
vfs.write(f, "ghijkl".encode("utf-8"))
vfs.close(f)
with vfs.open("tiledb_vfs.bin", "ab") as f:
f.write("ghijkl".encode("utf-8"))


def read():
# Create TileDB VFS
vfs = tiledb.VFS()

# Read binary data
f = vfs.open("tiledb_vfs.bin", "rb")
f1 = struct.unpack("f", vfs.read(f, 0, 4))[0]
s1 = bytes.decode(vfs.read(f, 4, 12), "utf-8")
print("Binary read:\n{}\n{}".format(f1, s1))
with vfs.open("tiledb_vfs.bin", "rb") as f:
# Read the first 4 bytes (bytes [0:4])
f1 = struct.unpack("f", f.read(4))[0]

# Read the next 8 bytes (bytes [4:12])
s1 = bytes.decode(f.read(8), "utf-8")

vfs.close(f)
print(f"Binary read:\n{f1}\n{s1}")


dirs_files()
Expand Down
6 changes: 3 additions & 3 deletions misc/azure-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ stages:
matrix:
mac:
imageName: "macOS-11"
python.version: "3.10"
python.version: "3.11"
MACOSX_DEPLOYMENT_TARGET: 10.15
windows:
imageName: "windows-latest"
python.version: "3.10"
python.version: "3.11"
linux_py3:
imageName: "ubuntu-latest"
python.version: "3.10"
python.version: "3.11"
maxParallel: 4
timeoutInMinutes: 120

Expand Down
8 changes: 4 additions & 4 deletions misc/azure-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ stages:
LIBTILEDB_VERSION: dev
LIBTILEDB_SHA: dev
${{ else }}:
TILEDBPY_VERSION: 0.18.3
LIBTILEDB_VERSION: 2.12.3
LIBTILEDB_SHA: fdfc2ee106caffe7e3a373b8728a04eabc4d89a5
TILEDBPY_VERSION: 0.19.0
LIBTILEDB_VERSION: 2.13.0
LIBTILEDB_SHA: db00e709701fa1787dce68c7563f775d6a0770ad
LIBTILEDB_REPO: https://github.com/TileDB-Inc/TileDB
TILEDB_SRC: "$(Build.Repository.Localpath)/tiledb_src"
TILEDB_BUILD: "$(Build.Repository.Localpath)/tiledb_build"
Expand Down Expand Up @@ -70,7 +70,7 @@ stages:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.10"
versionSpec: "3.11"
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))

- script: git tag -f $(TILEDBPY_VERSION)
Expand Down
13 changes: 13 additions & 0 deletions misc/pypi_linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,21 @@ auditwheel repair dist/*.whl
/opt/python/cp310-cp310/bin/python3.10 -m pip install wheelhouse/*.whl
cd tiledb/tests

# build python311 wheel
cd /home/tiledb
git clone $TILEDB_PY_REPO TileDB-Py311
git -C TileDB-Py311 checkout $TILEDBPY_VERSION

cd /home/tiledb/TileDB-Py311
/opt/python/cp311-cp311m/bin/python3.10 -m pip install -r misc/requirements_wheel.txt
/opt/python/cp311-cp311/bin/python3.10 setup.py build_ext bdist_wheel --tiledb=/usr/local
auditwheel repair dist/*.whl
/opt/python/cp311-cp311/bin/python3.10 -m pip install wheelhouse/*.whl
cd tiledb/tests

# copy build products out
cp /home/tiledb/TileDB-Py37/wheelhouse/* /wheels
cp /home/tiledb/TileDB-Py38/wheelhouse/* /wheels
cp /home/tiledb/TileDB-Py39/wheelhouse/* /wheels
cp /home/tiledb/TileDB-Py310/wheelhouse/* /wheels
cp /home/tiledb/TileDB-Py311/wheelhouse/* /wheels
1 change: 1 addition & 0 deletions misc/requirements_wheel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ numpy==1.19.4 ; python_version == "3.9" and platform_machine !='aarch64'
# NOTE: oldest-supported-numpy (1.19.2) had forward ABI compat problems
numpy==1.20.* ; python_version < "3.10" and platform_machine=='aarch64'
numpy==1.21.* ; python_version >= "3.10"
numpy>=1.23.0 ; python_version >= "3.11"

#-------------------------------
# Note 11/23/2021: the current version of the AWS sdk does not work with cmake 3.22
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
numpy>=1.16.5 ; python_version < "3.10" and platform_machine != 'aarch64'
numpy>=1.19.2 ; python_version < "3.10" and platform_machine == 'aarch64'
numpy>=1.21.0 ; python_version >= "3.10"
numpy>=1.23.0 ; python_version >= "3.11"
packaging

contextvars ;python_version<"3.7"
Expand Down