From eb6a209d38d63e09df4450a8984808e1a135e226 Mon Sep 17 00:00:00 2001 From: Adrian Chang <601268+adrian-chang@users.noreply.github.com> Date: Fri, 29 Mar 2024 11:34:03 -0700 Subject: [PATCH] [PLT-0] move to manual release (#1520) Co-authored-by: sfendell-labelbox <150080555+sfendell-labelbox@users.noreply.github.com> --- .github/workflows/publish.yaml | 40 ++++++++++++++++++++--- .github/workflows/python-package-main.yml | 37 --------------------- Dockerfile | 3 +- README.md | 4 ++- 4 files changed, 40 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/python-package-main.yml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 62cbabf4f..6648c2b51 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,17 +1,47 @@ -# Triggers a pypi publication when a release is created - name: Publish Python Package on: - release: - types: [created] + workflow_dispatch: + inputs: + tag: + description: 'Release Tag' + required: true jobs: + test-prod: + strategy: + fail-fast: false + matrix: + include: + - python-version: 3.8 + api-key: PROD_LABELBOX_API_KEY_2 + da-test-key: DA_GCP_LABELBOX_API_KEY + - python-version: 3.9 + api-key: PROD_LABELBOX_API_KEY_3 + da-test-key: DA_GCP_LABELBOX_API_KEY + - python-version: "3.10" + api-key: PROD_LABELBOX_API_KEY_4 + da-test-key: DA_GCP_LABELBOX_API_KEY + - python-version: 3.11 + api-key: LABELBOX_API_KEY + da-test-key: DA_GCP_LABELBOX_API_KEY + - python-version: 3.12 + api-key: PROD_LABELBOX_API_KEY_5 + da-test-key: DA_GCP_LABELBOX_API_KEY + uses: ./.github/workflows/python-package-shared.yml + with: + python-version: ${{ matrix.python-version }} + api-key: ${{ matrix.api-key }} + da-test-key: ${{ matrix.da-test-key }} + fixture-profile: false + test-env: 'prod' + secrets: inherit build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + with: + tag: ${{ inputs.tag }} - uses: actions/setup-python@v5 with: python-version: '3.x' diff --git a/.github/workflows/python-package-main.yml b/.github/workflows/python-package-main.yml deleted file mode 100644 index b96c867bf..000000000 --- a/.github/workflows/python-package-main.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Labelbox Python SDK Main - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build: - strategy: - fail-fast: false - matrix: - include: - - python-version: 3.8 - api-key: PROD_LABELBOX_API_KEY_2 - da-test-key: DA_GCP_LABELBOX_API_KEY - - python-version: 3.9 - api-key: PROD_LABELBOX_API_KEY_3 - da-test-key: DA_GCP_LABELBOX_API_KEY - - python-version: "3.10" - api-key: PROD_LABELBOX_API_KEY_4 - da-test-key: DA_GCP_LABELBOX_API_KEY - - python-version: 3.11 - api-key: LABELBOX_API_KEY - da-test-key: DA_GCP_LABELBOX_API_KEY - - python-version: 3.12 - api-key: PROD_LABELBOX_API_KEY_5 - da-test-key: DA_GCP_LABELBOX_API_KEY - uses: ./.github/workflows/python-package-shared.yml - with: - python-version: ${{ matrix.python-version }} - api-key: ${{ matrix.api-key }} - da-test-key: ${{ matrix.da-test-key }} - fixture-profile: false - test-env: 'prod' - secrets: inherit diff --git a/Dockerfile b/Dockerfile index 51fc5949f..a07696486 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,5 @@ RUN pip install -r requirements.txt COPY . /usr/src/ RUN python setup.py install -CMD tox -e py -- tests/integration tests/data \ No newline at end of file +RUN tox -e no +CMD tox -e py -- tests/integration tests/data diff --git a/README.md b/README.md index e94e5641e..2909aa43b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Labelbox Python SDK [![Release Notes](https://img.shields.io/github/release/labelbox/labelbox-python)](https://github.com/Labelbox/labelbox-python/releases) -[![CI](https://github.com/labelbox/labelbox-python/actions/workflows/python-package.yml/badge.svg)](https://github.com/labelbox/labelbox-python/actions) +[![CI](https://github.com/Labelbox/labelbox-python/actions/workflows/python-package-develop.yaml/badge.svg)](https://github.com/Labelbox/labelbox-python/actions/workflows/python-package-develop.yaml) [![Downloads](https://pepy.tech/badge/labelbox)](https://pepy.tech/project/labelbox) [![Dependency Status](https://img.shields.io/librariesio/github/labelbox/labelbox-python)](https://libraries.io/github/labelbox/labelbox-python) [![Open Issues](https://img.shields.io/github/issues-raw/labelbox/labelbox-python)](https://github.com/labelbox/labelbox-python/issues) @@ -44,6 +44,8 @@ If you'd like to install the SDK with enhanced functionality, which additional o pip install "labelbox[data]" ``` +**If you want to installed a version of Labelbox built locally, be aware that only tagged commits have been validated to fully work! Installing the latest from develop is at your own risk!** + ### Validate Installation and API Key After installing the SDK and getting an API Key, it's time to validate them both.