fix: make dashkit_table a required dependency #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # name: Smoke Test | |
| # on: | |
| # push: | |
| # tags: | |
| # - 'dashkit-v*' | |
| # - 'dashkit_table-v*' | |
| # - 'dashkit_kiboui-v*' | |
| # workflow_dispatch: | |
| # inputs: | |
| # tag_name: | |
| # description: 'Tag to smoke test' | |
| # required: true | |
| # jobs: | |
| # smoke-main: | |
| # if: startsWith(github.ref_name, 'dashkit-v') || (github.event_name == 'release' && startsWith(github.event.release.tag_name, 'dashkit-v')) || (github.event_name == 'workflow_dispatch' && startsWith(inputs.tag_name, 'dashkit-v')) | |
| # name: Smoke dash-dashkit | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/setup-python@v5 | |
| # with: | |
| # python-version: '3.11' | |
| # - uses: astral-sh/setup-uv@v3 | |
| # - name: Compute version | |
| # id: v | |
| # shell: bash | |
| # run: | | |
| # if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then RAW="${{ inputs.tag_name }}"; else RAW="$GITHUB_REF_NAME"; fi | |
| # echo "version=${RAW#dashkit-v}" >> $GITHUB_OUTPUT | |
| # - name: Install package | |
| # run: | | |
| # NAME="dash-dashkit" | |
| # VER="${{ steps.v.outputs.version }}" | |
| # for i in {1..60}; do | |
| # python - <<PY | |
| # import json, sys, urllib.request | |
| # url=f"https://pypi.org/pypi/${NAME}/json" | |
| # try: | |
| # with urllib.request.urlopen(url, timeout=5) as r: | |
| # data=json.load(r) | |
| # sys.exit(0 if "${VER}" in data.get("releases", {}) else 1) | |
| # except Exception: | |
| # sys.exit(1) | |
| # PY | |
| # status=$? | |
| # if [ $status -eq 0 ]; then | |
| # echo "Found ${NAME} ${VER} on PyPI" | |
| # break | |
| # fi | |
| # echo "Waiting for ${NAME} ${VER} to appear on PyPI... ($i/60)" | |
| # sleep 10 | |
| # done | |
| # if [ $status -ne 0 ]; then | |
| # echo "Timed out waiting for ${NAME} ${VER} on PyPI" | |
| # exit 1 | |
| # fi | |
| # uv venv | |
| # uv pip install --quiet "${NAME}==${VER}" | |
| # - name: Run smoke script | |
| # run: | | |
| # uv run python - <<'PY' | |
| # from dash import Dash, html | |
| # import dashkit | |
| # from dashkit import Table, create_layout | |
| # app = Dash(__name__) | |
| # dashkit.setup_app(app) | |
| # data = [{"name": "Alice", "score": 10}, {"name": "Bob", "score": 20}] | |
| # cols = [{"data": "name", "title": "Name"}, {"data": "score", "title": "Score"}] | |
| # table = Table(id="t", data=data, columns=cols, height=200) | |
| # app.layout = create_layout(content=html.Div([html.H3("Smoke"), table])) | |
| # print("OK dash-dashkit:", getattr(dashkit, "__version__", "n/a")) | |
| # PY | |
| # smoke-table: | |
| # if: startsWith(github.ref_name, 'dashkit_table-v') || (github.event_name == 'release' && startsWith(github.event.release.tag_name, 'dashkit_table-v')) || (github.event_name == 'workflow_dispatch' && startsWith(inputs.tag_name, 'dashkit_table-v')) | |
| # name: Smoke dashkit_table | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/setup-python@v5 | |
| # with: | |
| # python-version: '3.11' | |
| # - uses: astral-sh/setup-uv@v3 | |
| # - name: Compute version | |
| # id: v | |
| # shell: bash | |
| # run: | | |
| # if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then RAW="${{ inputs.tag_name }}"; else RAW="$GITHUB_REF_NAME"; fi | |
| # echo "version=${RAW#dashkit_table-v}" >> $GITHUB_OUTPUT | |
| # - name: Install package | |
| # run: | | |
| # NAME="dashkit_table" | |
| # VER="${{ steps.v.outputs.version }}" | |
| # for i in {1..60}; do | |
| # python - <<PY | |
| # import json, sys, urllib.request | |
| # url=f"https://pypi.org/pypi/${NAME}/json" | |
| # try: | |
| # with urllib.request.urlopen(url, timeout=5) as r: | |
| # data=json.load(r) | |
| # sys.exit(0 if "${VER}" in data.get("releases", {}) else 1) | |
| # except Exception: | |
| # sys.exit(1) | |
| # PY | |
| # status=$? | |
| # if [ $status -eq 0 ]; then | |
| # echo "Found ${NAME} ${VER} on PyPI" | |
| # break | |
| # fi | |
| # echo "Waiting for ${NAME} ${VER} to appear on PyPI... ($i/60)" | |
| # sleep 10 | |
| # done | |
| # if [ $status -ne 0 ]; then | |
| # echo "Timed out waiting for ${NAME} ${VER} on PyPI" | |
| # exit 1 | |
| # fi | |
| # uv venv | |
| # uv pip install --quiet "${NAME}==${VER}" | |
| # - name: Run smoke script | |
| # run: | | |
| # uv run python - <<'PY' | |
| # from dashkit_table import DashkitTable | |
| # t = DashkitTable(id="t", data=[["Alice", 10]], columns=[{"data":0},{"data":1}], height=200) | |
| # print("OK dashkit_table") | |
| # PY | |
| # smoke-kiboui: | |
| # if: startsWith(github.ref_name, 'dashkit_kiboui-v') || (github.event_name == 'release' && startsWith(github.event.release.tag_name, 'dashkit_kiboui-v')) || (github.event_name == 'workflow_dispatch' && startsWith(inputs.tag_name, 'dashkit_kiboui-v')) | |
| # name: Smoke dashkit_kiboui | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/setup-python@v5 | |
| # with: | |
| # python-version: '3.11' | |
| # - uses: astral-sh/setup-uv@v3 | |
| # - name: Compute version | |
| # id: v | |
| # shell: bash | |
| # run: | | |
| # if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then RAW="${{ inputs.tag_name }}"; else RAW="$GITHUB_REF_NAME"; fi | |
| # echo "version=${RAW#dashkit_kiboui-v}" >> $GITHUB_OUTPUT | |
| # - name: Install package | |
| # run: | | |
| # NAME="dashkit_kiboui" | |
| # VER="${{ steps.v.outputs.version }}" | |
| # for i in {1..60}; do | |
| # python - <<PY | |
| # import json, sys, urllib.request | |
| # url=f"https://pypi.org/pypi/${NAME}/json" | |
| # try: | |
| # with urllib.request.urlopen(url, timeout=5) as r: | |
| # data=json.load(r) | |
| # sys.exit(0 if "${VER}" in data.get("releases", {}) else 1) | |
| # except Exception: | |
| # sys.exit(1) | |
| # PY | |
| # status=$? | |
| # if [ $status -eq 0 ]; then | |
| # echo "Found ${NAME} ${VER} on PyPI" | |
| # break | |
| # fi | |
| # echo "Waiting for ${NAME} ${VER} to appear on PyPI... ($i/60)" | |
| # sleep 10 | |
| # done | |
| # if [ $status -ne 0 ]; then | |
| # echo "Timed out waiting for ${NAME} ${VER} on PyPI" | |
| # exit 1 | |
| # fi | |
| # uv venv | |
| # uv pip install --quiet "${NAME}==${VER}" | |
| # - name: Run smoke script | |
| # run: | | |
| # uv run python - <<'PY' | |
| # from dashkit_kiboui import ContributionGraph | |
| # cg = ContributionGraph(id="cg", data=[{"date":"2025-01-01","count":1}]) | |
| # print("OK dashkit_kiboui") | |
| # PY |