From 55d65103f132f163e6737fefbfc42c8fe2f3b7cd Mon Sep 17 00:00:00 2001 From: Ali Asadpoor Date: Tue, 8 Sep 2026 23:52:02 -0400 Subject: [PATCH 1/8] Publish SDK docs content and unify Docker Hub credentials --- .github/workflows/dependencies.yml | 4 +-- .github/workflows/develop.yml | 8 +++--- .github/workflows/main.yml | 39 ++++++++++++++++-------------- .github/workflows/nightly.yml | 4 +-- .github/workflows/pr.yaml | 8 +++--- .github/workflows/release.yaml | 8 +++--- docs-content/Dockerfile | 7 ++++++ docs-content/publish.sh | 32 ++++++++++++++++++++++++ 8 files changed, 76 insertions(+), 34 deletions(-) create mode 100644 docs-content/Dockerfile create mode 100755 docs-content/publish.sh diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index dc66e4ee..8d4cc92f 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -18,8 +18,8 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} + username: ${{ fromJson(secrets.DOCKERHUB).username }} + password: ${{ fromJson(secrets.DOCKERHUB).password }} - name: Build and Push Dependencies Image env: diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 295f4d26..9c689e02 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -25,8 +25,8 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} + username: ${{ fromJson(secrets.DOCKERHUB).username }} + password: ${{ fromJson(secrets.DOCKERHUB).password }} - name: Authenticate to Google Cloud uses: google-github-actions/auth@v2 @@ -75,8 +75,8 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} + username: ${{ fromJson(secrets.DOCKERHUB).username }} + password: ${{ fromJson(secrets.DOCKERHUB).password }} - name: Build Notebook,docs Docker env: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5cfe6340..5d626540 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,8 +23,8 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} + username: ${{ fromJson(secrets.DOCKERHUB).username }} + password: ${{ fromJson(secrets.DOCKERHUB).password }} - name: Authenticate to Google Cloud uses: google-github-actions/auth@v2 @@ -69,8 +69,8 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} + username: ${{ fromJson(secrets.DOCKERHUB).username }} + password: ${{ fromJson(secrets.DOCKERHUB).password }} - name: Build Notebook env: @@ -102,23 +102,26 @@ jobs: run: 'TOKEN=${{ secrets.GITHUBPAT }} ./github-release.sh' shell: bash - trigger_demos_buils: - runs-on: ubuntu-latest - needs: - - build_notebooks_and_publish_pypi - steps: - - uses: actions/checkout@v3 - - name: repository dispatch + - name: Publish docs content image run: | - curl -X POST https://api.github.com/repos/aperture-data/demos/actions/workflows/13727133/dispatches \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.GITHUBPAT }}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - -d '{"ref":"master","inputs":{}}' + source version.sh + read_version + docker build -f docs-content/Dockerfile -t "aperturedata/aperturedb-python-docs:v$BUILD_VERSION" . + docker push "aperturedata/aperturedb-python-docs:v$BUILD_VERSION" + shell: bash + - name: Update docs provider version in infra + env: + GH_TOKEN: ${{ secrets.PAT_INFRA }} + run: | + source version.sh + read_version + jq -n --arg tag "v$BUILD_VERSION" \ + '{event_type:"update-tag",client_payload:{environment:"develop",component:"python-client",tag:$tag}}' \ + | gh api repos/aperture-data/infra/dispatches --input - shell: bash - trigger_docs_deploy: + trigger_demos_buils: runs-on: ubuntu-latest needs: - build_notebooks_and_publish_pypi @@ -126,7 +129,7 @@ jobs: - uses: actions/checkout@v3 - name: repository dispatch run: | - curl -X POST https://api.github.com/repos/aperture-data/docs/actions/workflows/64451786/dispatches \ + curl -X POST https://api.github.com/repos/aperture-data/demos/actions/workflows/13727133/dispatches \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer ${{ secrets.GITHUBPAT }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 25401e54..ec251662 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -20,8 +20,8 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} + username: ${{ fromJson(secrets.DOCKERHUB).username }} + password: ${{ fromJson(secrets.DOCKERHUB).password }} - name: Authenticate to Google Cloud uses: google-github-actions/auth@v2 diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 0e680ff3..7a213b07 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -28,8 +28,8 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} + username: ${{ fromJson(secrets.DOCKERHUB).username }} + password: ${{ fromJson(secrets.DOCKERHUB).password }} - name: Authenticate to Google Cloud uses: google-github-actions/auth@v2 @@ -94,8 +94,8 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} + username: ${{ fromJson(secrets.DOCKERHUB).username }} + password: ${{ fromJson(secrets.DOCKERHUB).password }} - name: Authenticate to Google Cloud uses: google-github-actions/auth@v2 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b1597095..d44f9e87 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -27,8 +27,8 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} + username: ${{ fromJson(secrets.DOCKERHUB).username }} + password: ${{ fromJson(secrets.DOCKERHUB).password }} - name: Authenticate to Google Cloud uses: google-github-actions/auth@v2 @@ -67,8 +67,8 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} + username: ${{ fromJson(secrets.DOCKERHUB).username }} + password: ${{ fromJson(secrets.DOCKERHUB).password }} - name: Build Notebook Docker run: BUILD_COMPLETE=true NO_PUSH=true ./ci.sh diff --git a/docs-content/Dockerfile b/docs-content/Dockerfile new file mode 100644 index 00000000..12ebb11b --- /dev/null +++ b/docs-content/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:3 +RUN apk add --no-cache bash rsync +COPY aperturedb/ /content/aperturedb/ +COPY examples/ /content/examples/ +COPY docs-content/publish.sh /publish.sh +ENV DOCS_PROVIDER=aperturedb-python +ENTRYPOINT ["bash", "/publish.sh"] diff --git a/docs-content/publish.sh b/docs-content/publish.sh new file mode 100755 index 00000000..98539673 --- /dev/null +++ b/docs-content/publish.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# Upload a complete content generation to docs over its internal rsync service. +set -euo pipefail + +: "${DOCS_PROVIDER:?DOCS_PROVIDER must be set}" +target=${DOCS_RSYNC_URL-rsync://docs-connections:873/content} +while [[ "$target" == */ ]]; do + target=${target%/} +done +command=(rsync -rlt --mkpath --timeout=120 --contimeout=10) +temporary=$(mktemp -d) +trap 'rm -rf -- "$temporary"' EXIT +trap 'exit 130' INT +trap 'exit 143' TERM +touch "$temporary/.ready" + +while true; do + read -r generation < /proc/sys/kernel/random/uuid + generation=${generation//-/} + destination="$target/$DOCS_PROVIDER/$generation" + + # The receiver ignores this generation until the separate marker arrives. + if "${command[@]}" /content/ "$destination/data/" && + "${command[@]}" "$temporary/.ready" "$destination/"; then + printf 'Uploaded %s %s\n' "$DOCS_PROVIDER" "$generation" + break + else + status=$? + printf 'Upload failed (rsync exit %s); retrying in 10 seconds\n' "$status" >&2 + sleep 10 + fi +done From 4e3532c7028724b04e86e12a1b6412b99f817b4d Mon Sep 17 00:00:00 2001 From: Ali Asadpoor Date: Wed, 9 Sep 2026 01:42:26 -0400 Subject: [PATCH 2/8] Bump version to 0.4.61 --- aperturedb/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aperturedb/__init__.py b/aperturedb/__init__.py index a4fccee9..f61134d4 100644 --- a/aperturedb/__init__.py +++ b/aperturedb/__init__.py @@ -10,7 +10,7 @@ import signal import sys -__version__ = "0.4.60" +__version__ = "0.4.61" logger = logging.getLogger(__name__) From eec0e369c227ebb8e3c85fdeaca50d89b6fd33f7 Mon Sep 17 00:00:00 2001 From: Vishakha Gupta-Cledat Date: Mon, 13 Jul 2026 06:57:41 -0700 Subject: [PATCH 3/8] feat(Constraints): add contains() method for substring matching --- aperturedb/Constraints.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aperturedb/Constraints.py b/aperturedb/Constraints.py index 10ed92c1..95f3ae6b 100644 --- a/aperturedb/Constraints.py +++ b/aperturedb/Constraints.py @@ -47,6 +47,10 @@ def is_in(self, key, val_array) -> Constraints: self.constraints[self._conjunction][key] = ["in", val_array] return self + def contains(self, key, value) -> Constraints: + self.constraints[self._conjunction][key] = ["contains", value] + return self + def check(self, entity): for key, op in self.constraints.items(): if key not in entity: From d551e18562629da43de8e271271206b1392f7b4a Mon Sep 17 00:00:00 2001 From: Vishakha Gupta-Cledat Date: Mon, 13 Jul 2026 08:22:25 -0700 Subject: [PATCH 4/8] feat(Constraints): add icontains() method for case-insensitive substring matching --- aperturedb/Constraints.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aperturedb/Constraints.py b/aperturedb/Constraints.py index 95f3ae6b..0d64339d 100644 --- a/aperturedb/Constraints.py +++ b/aperturedb/Constraints.py @@ -51,6 +51,10 @@ def contains(self, key, value) -> Constraints: self.constraints[self._conjunction][key] = ["contains", value] return self + def icontains(self, key, value) -> Constraints: + self.constraints[self._conjunction][key] = ["icontains", value] + return self + def check(self, entity): for key, op in self.constraints.items(): if key not in entity: From 5171572d8431f5ef7dfb2538c6d8edd2a50ef4f9 Mon Sep 17 00:00:00 2001 From: Vishakha Gupta-Cledat Date: Mon, 13 Jul 2026 08:50:06 -0700 Subject: [PATCH 5/8] feat(Constraints): add startswith() method for prefix matching --- aperturedb/Constraints.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aperturedb/Constraints.py b/aperturedb/Constraints.py index 0d64339d..4c71f78e 100644 --- a/aperturedb/Constraints.py +++ b/aperturedb/Constraints.py @@ -55,6 +55,10 @@ def icontains(self, key, value) -> Constraints: self.constraints[self._conjunction][key] = ["icontains", value] return self + def startswith(self, key, value) -> Constraints: + self.constraints[self._conjunction][key] = ["startswith", value] + return self + def check(self, entity): for key, op in self.constraints.items(): if key not in entity: From 23325af9f4d3259e32a3d9c1233f0df2fa1c693f Mon Sep 17 00:00:00 2001 From: Vishakha Gupta-Cledat Date: Mon, 13 Jul 2026 08:59:36 -0700 Subject: [PATCH 6/8] feat(Constraints): add istartswith() method for case-insensitive prefix matching --- aperturedb/Constraints.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aperturedb/Constraints.py b/aperturedb/Constraints.py index 4c71f78e..a6fd93e7 100644 --- a/aperturedb/Constraints.py +++ b/aperturedb/Constraints.py @@ -59,6 +59,10 @@ def startswith(self, key, value) -> Constraints: self.constraints[self._conjunction][key] = ["startswith", value] return self + def istartswith(self, key, value) -> Constraints: + self.constraints[self._conjunction][key] = ["istartswith", value] + return self + def check(self, entity): for key, op in self.constraints.items(): if key not in entity: From e332f8bf151434429bcd2d557ad2814e3ff027eb Mon Sep 17 00:00:00 2001 From: Vishakha Gupta-Cledat Date: Mon, 13 Jul 2026 09:10:20 -0700 Subject: [PATCH 7/8] feat(Constraints): add like() method for SQL-style wildcard matching --- aperturedb/Constraints.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aperturedb/Constraints.py b/aperturedb/Constraints.py index a6fd93e7..f39fb327 100644 --- a/aperturedb/Constraints.py +++ b/aperturedb/Constraints.py @@ -63,6 +63,10 @@ def istartswith(self, key, value) -> Constraints: self.constraints[self._conjunction][key] = ["istartswith", value] return self + def like(self, key, value) -> Constraints: + self.constraints[self._conjunction][key] = ["like", value] + return self + def check(self, entity): for key, op in self.constraints.items(): if key not in entity: From ca6ee673e934b85583f3631b5eca21fb6349ae37 Mon Sep 17 00:00:00 2001 From: Vishakha Gupta-Cledat Date: Mon, 13 Jul 2026 09:14:37 -0700 Subject: [PATCH 8/8] feat(Constraints): add ilike() method for case-insensitive wildcard matching --- aperturedb/Constraints.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aperturedb/Constraints.py b/aperturedb/Constraints.py index f39fb327..b85b88cb 100644 --- a/aperturedb/Constraints.py +++ b/aperturedb/Constraints.py @@ -67,6 +67,10 @@ def like(self, key, value) -> Constraints: self.constraints[self._conjunction][key] = ["like", value] return self + def ilike(self, key, value) -> Constraints: + self.constraints[self._conjunction][key] = ["ilike", value] + return self + def check(self, entity): for key, op in self.constraints.items(): if key not in entity: