diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 20620441..bfaa10ce 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -36,7 +36,7 @@ jobs: GO_CONFIG_FILE: ".golangci.yaml" PROTOBUF_CONFIG_FILE: ".protolintrc.yml" TRIVY_CONFIG_FILE: ".trivy.yml" - FILTER_REGEX_EXCLUDE: "(.*/charts/.*)" + FILTER_REGEX_EXCLUDE: "(.*/charts/.*)|(sdk/python/outshift/.*)|(sdk/python/google/.*)|(sdk/python/openapiv3/.*)" VALIDATE_ALL_CODEBASE: false VALIDATE_MARKDOWN_PRETTIER: false VALIDATE_YAML_PRETTIER: false @@ -49,6 +49,7 @@ jobs: VALIDATE_PYTHON_BLACK: false VALIDATE_PYTHON_PYINK: false VALIDATE_PYTHON_ISORT: false + VALIDATE_PYTHON_FLAKE8: false MULTI_STATUS: false VALIDATE_JSON_PRETTIER: false VALIDATE_CSS: false diff --git a/.github/workflows/release-python-sdk.yml b/.github/workflows/release-python-sdk.yml new file mode 100644 index 00000000..0f27cf26 --- /dev/null +++ b/.github/workflows/release-python-sdk.yml @@ -0,0 +1,47 @@ +# Copyright 2025 Cisco Systems, Inc. and its affiliates +# SPDX-License-Identifier: Apache-2.0 + +--- +name: Release Python SDK + +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + workflow_dispatch: + +jobs: + pypi-publish: + name: Upload release to PyPI + runs-on: ubuntu-latest + environment: pypi + permissions: + # IMPORTANT: this permission is mandatory for Trusted Publishing + id-token: write + contents: read + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build package + run: | + cd python && python -m build + + - name: Show files + run: ls -l ./python/dist + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: ./python/dist + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/samples/agent/a2a/currency_exchange/Dockerfile b/samples/agent/a2a/currency_exchange/Dockerfile index c1543492..677b6a27 100644 --- a/samples/agent/a2a/currency_exchange/Dockerfile +++ b/samples/agent/a2a/currency_exchange/Dockerfile @@ -6,7 +6,7 @@ FROM python:3.12-slim RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* WORKDIR /code -COPY ./agent/a2a/currency_exchange/* . +COPY ./samples/agent/a2a/currency_exchange/* . RUN pip install --no-cache-dir . CMD ["python", "main.py"] diff --git a/samples/agent/oasf/financial_assistant/Dockerfile b/samples/agent/oasf/financial_assistant/Dockerfile index 548d4fcf..78a448fa 100644 --- a/samples/agent/oasf/financial_assistant/Dockerfile +++ b/samples/agent/oasf/financial_assistant/Dockerfile @@ -6,11 +6,11 @@ FROM python:3.12-slim RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* WORKDIR /code -COPY ./agent/oasf/financial_assistant/* . +COPY ./samples/agent/oasf/financial_assistant/* . RUN pip install --no-cache-dir . # Copy UI files to ui directory -COPY ./agent/oasf/financial_assistant/ui/ ./ui/ +COPY ./samples/agent/oasf/financial_assistant/ui/ ./ui/ # Expose only one port for uvicorn EXPOSE 9093 diff --git a/samples/mcp/currency_exchange/Dockerfile b/samples/mcp/currency_exchange/Dockerfile index 43aa572e..22a6f6f7 100644 --- a/samples/mcp/currency_exchange/Dockerfile +++ b/samples/mcp/currency_exchange/Dockerfile @@ -6,7 +6,7 @@ FROM python:3.12-slim RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* WORKDIR /code -COPY ./mcp/currency_exchange/* . +COPY ./samples/mcp/currency_exchange/* . RUN pip install --no-cache-dir . CMD ["python", "main.py"]