Skip to content
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
13918ef
WIP: Setting up a new build process for breadbox_client
invalid-email-address Oct 17, 2025
71df4c3
github workflow fix
pgm Oct 17, 2025
78cdbb5
added yaml as a file to monitor
pgm Oct 17, 2025
51daeba
Changed breadbox_client tests to spin up a breadbox instance on demand
pgm Oct 18, 2025
fe958ae
fixed pyright errors
pgm Oct 18, 2025
7434898
If reading settings fails, leave celery unconfigured
pgm Oct 18, 2025
b16631a
added httpx dependency
pgm Oct 18, 2025
13d1aca
added install of breadbox
pgm Oct 18, 2025
50d03a4
Bumping poetry version in case that helps
pgm Oct 18, 2025
98385ec
more debugging build
pgm Oct 18, 2025
7fd1c0f
more debugging build
pgm Oct 18, 2025
6bf82c2
more debugging build
pgm Oct 18, 2025
152fdf0
more debugging build
pgm Oct 18, 2025
ee6cc36
more debugging
pgm Oct 18, 2025
7305b1b
more debugging
pgm Oct 18, 2025
c31c4b5
more debugging
pgm Oct 18, 2025
ea35d8c
more debugging build
pgm Oct 18, 2025
59f76f6
more debugging build
pgm Oct 18, 2025
dfedb15
more debugging build
pgm Oct 18, 2025
80262f3
more debugging build
pgm Oct 18, 2025
ed2a3ac
more debugging build
pgm Oct 18, 2025
3f5da6f
more debugging build
pgm Oct 18, 2025
b0d6d59
added a new function for running a poetry command in virtual env
pgm Oct 18, 2025
456067b
added a new function for running a poetry command in virtual env
pgm Oct 18, 2025
d7adc02
added a new function for running a poetry command in virtual env
pgm Oct 18, 2025
9a83409
added a new function for running a poetry command in virtual env
pgm Oct 18, 2025
5892807
added a new function for running a poetry command in virtual env
pgm Oct 19, 2025
50afb4d
added a new function for running a poetry command in virtual env
pgm Oct 19, 2025
4d73e62
Dropped unused settings variables for configuring broker url and backend
pgm Oct 19, 2025
6906bc0
If reading settings fails, leave celery unconfigured
pgm Oct 18, 2025
b4c3d25
Added documentation and reverted some unneeded changes.
pgm Oct 19, 2025
bd77d14
Added documentation and reverted some unneeded changes.
pgm Oct 19, 2025
f747f87
removed all cz references from pyproject files
pgm Oct 21, 2025
bd3214f
feat: add version bumping script for breadbox-client package
pgm Oct 21, 2025
76a3cb7
refactor: update version bumping and publishing scripts with improved…
pgm Oct 21, 2025
40cbe05
fix: resolve syntax errors in version bump script
pgm Oct 21, 2025
759e814
feat: add detailed print statements for better script debugging and u…
pgm Oct 21, 2025
200cac4
feat: add --dryrun option to skip commits and publishing in version b…
pgm Oct 21, 2025
07d0077
docs: add script documentation and usage overview
pgm Oct 21, 2025
5320ac7
refactor: update conventional commit types and handling
pgm Oct 21, 2025
7d88e12
Removal of cz and in its place, run the new bump_version_and_publish …
pgm Oct 21, 2025
ad945ca
feat: add `--dry-run-if-not-branch` option to conditionally run in dr…
pgm Oct 21, 2025
2a3e976
refactor: remove unused import from version bump script
pgm Oct 21, 2025
2dc5873
fix: raise assertion error when no previous version tag is found
pgm Oct 21, 2025
c887cd1
refactor: print original commit subject instead of rule number
pgm Oct 21, 2025
8f61ea9
fix(breadbox): Added fixes to bump script
pgm Oct 21, 2025
3a4a9cf
Added --dry-run-if-not-branch to github workflow for breadbox client
pgm Oct 21, 2025
9dbaa00
removed unneeded build yamls
pgm Oct 21, 2025
f7cb481
Removed spurious comment
pgm Oct 21, 2025
62a2ba9
added debugging statement
pgm Oct 21, 2025
b59ecc1
Revert "added debugging statement"
pgm Oct 21, 2025
9f00134
Removed debugging print statements as well as spurious "todo" comment
pgm Oct 21, 2025
68bd052
Merge branch 'master' into new-bb-client-publisher
pgm Oct 24, 2025
d3c2f63
Merge branch 'master' into new-bb-client-publisher
pgm Oct 24, 2025
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
3 changes: 2 additions & 1 deletion .github/actions/prepare-breadbox/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ runs:
- name: "Install and configure Poetry"
uses: snok/install-poetry@v1
with:
version: 1.8.2
version: 2.2.1
virtualenvs-create: true
virtualenvs-in-project: true

- name: "Set up poetry cache"
uses: actions/cache@v3
Expand Down
91 changes: 0 additions & 91 deletions .github/workflows/build_breadbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,6 @@ jobs:
- name: Check PR title
run: poetry run cz check -m '${{ github.event.pull_request.title }}'

pyright-breadbox-client:
runs-on: ubuntu-latest
steps:
- name: "Check out"
uses: actions/checkout@v3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
fetch-depth: 0

- name: Prepare breadbox client
uses: ./.github/actions/prepare-breadbox-client # checks out and generates breadbox client code

- name: Check that the breadbox client passes pyright
working-directory: ./breadbox-client
run: "poetry install && poetry run pyright breadbox_facade"

build-docker:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -141,78 +125,3 @@ jobs:
chmod +x ./.github/push_docker.py
# GITHUB_REF##*/ is github actions magic which expands to the branch name
./.github/push_docker.py ${{ env.DOCKER_REPO }} ${{ env.DOCKER_REPO }}:${{ env.DOCKER_TAG }} ${GITHUB_REF##*/}

bump-versions:
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') && (!startsWith(github.actor, 'github-actions') || !startsWith(github.event.pusher.name, 'github-actions')) && (github.ref_name == 'master') && (github.event_name == 'push') }}
needs: push-docker-tag
runs-on: ubuntu-latest
name: "Bump breadbox and breadbox-client version and create changelog with commitizen"
outputs:
# Map the step outputs to job outputs
current_version: ${{ steps.current-version.outputs.current_version }}
bumped_version: ${{ steps.bumped-version.outputs.bumped_version }}
defaults:
run:
working-directory: ./breadbox
steps:
- name: Check out
uses: actions/checkout@v3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.7.20"

- name: Store current version
id: current-version
run: echo "current_version=$(uvx --from commitizen cz version -p)" >> $GITHUB_OUTPUT

- name: Get current version
run: echo "${{ steps.current-version.outputs.current_version}}"

- name: config git for tagging
run: |
git config user.name github-actions
git config user.email [email protected]
git pull origin HEAD:master

- name: run cz bump
run: uvx --from commitizen cz --no-raise 21 bump --check-consistency

- name: git push tags
run: |
git push origin HEAD:master
git push origin HEAD:master --tags

- name: Store bumped version
id: bumped-version
run: echo "bumped_version=$(uvx --from commitizen cz version -p)" >> $GITHUB_OUTPUT
- name: Get bumped version
run: echo "${{ steps.current-version.outputs.bumped_version}}"

publish-breadbox-client:
needs: bump-versions
if: ${{ (needs.bump-versions.outputs.current_version != needs.bump-versions.outputs.bumped_version) && (github.ref_name == 'master') }}
runs-on: ubuntu-latest
steps:
- name: "Check out"
uses: actions/checkout@v3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
fetch-depth: 0
# pulls latest changes from head
- run: |
git pull origin HEAD:master
- name: "Authenticate to Google Cloud"
uses: google-github-actions/auth@v2
with:
credentials_json: "${{ secrets.DEPMAP_ARTIFACTS_SVC_ACCT }}"

- name: Prepare breadbox client
uses: ./.github/actions/prepare-breadbox-client # checks out and generates breadbox client code

- name: Publish breadbox client
uses: ./.github/actions/publish-breadbox-client
50 changes: 50 additions & 0 deletions .github/workflows/build_breadbox_client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Build breadbox client

on:
push:
paths:
- "breadbox/**"
- "breadbox-client/**"
- ".github/workflows/build_breadbox_client.yaml"

# 2
#permissions:
# contents: write

env:
DOCKER_REPO: us.gcr.io/broad-achilles/depmap-breadbox
DOCKER_TAG: ga2-build-${{ github.run_number }}

jobs:
build-breadbox-client:
runs-on: ubuntu-latest
steps:
- name: "Check out"
uses: actions/checkout@v3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
fetch-depth: 0

- name: Prepare breadbox client
uses: ./.github/actions/prepare-breadbox-client # checks out and generates breadbox client code

- name: "Install breadbox and dependencies"
working-directory: ./breadbox
run: "poetry install"

- name: "Install breadbox_client and dependencies"
working-directory: ./breadbox-client
run: "poetry install"

- name: Running pyright
working-directory: ./breadbox-client
run: "poetry run pyright breadbox_facade"

- name: Running pytest
working-directory: ./breadbox-client
run: "poetry run pytest"

- name: Bump version and publish
working-directory: ./breadbox-client
run: "python bump_version_and_publish.py --dry-run-if-not-branch master"
5 changes: 5 additions & 0 deletions breadbox-client/breadbox_facade/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import pandas as pd

from breadbox_client import Client
from breadbox_client.api.health_check import ok
from breadbox_client.api.api import get_task_status as get_task_status_client
from breadbox_client.api.compute import compute_univariate_associations as compute_univariate_associations_client
from breadbox_client.api.data_types import add_data_type as add_data_type_client
Expand Down Expand Up @@ -644,3 +645,7 @@ def await_task_result(self, task_id: str, timeout=None):
return task_response["result"]
else:
raise ValueError(f"Unexpected task state: {task_state}")

def is_ok(self):
response = ok.sync_detailed(client=self.client)
return response
Loading
Loading