Skip to content

Commit 7009b56

Browse files
author
deeleeramone
committed
workflow update
1 parent 5a0d1de commit 7009b56

3 files changed

Lines changed: 38 additions & 52 deletions

File tree

.github/workflows/publish-pywry.yml

Lines changed: 33 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -458,46 +458,12 @@ jobs:
458458
retention-days: 30
459459

460460
# =============================================================================
461-
# Step 4: Publish to TestPyPI (workflow_dispatch only)
461+
# Step 4: Test built wheels on all platforms
462462
# =============================================================================
463-
publish-testpypi:
464-
name: Publish to TestPyPI
463+
test-wheels:
464+
name: Test wheel - ${{ matrix.os }}
465465
needs: [merge-artifacts]
466466
if: always() && needs.merge-artifacts.result == 'success' && github.event_name == 'workflow_dispatch'
467-
runs-on: ubuntu-24.04
468-
defaults:
469-
run:
470-
working-directory: .
471-
environment:
472-
name: testpypi
473-
url: https://test.pypi.org/p/pywry
474-
permissions:
475-
id-token: write
476-
477-
steps:
478-
- name: Download dist artifacts
479-
uses: actions/download-artifact@v4
480-
with:
481-
name: dist
482-
path: dist/
483-
484-
- name: Display dist contents
485-
run: ls -la dist/
486-
487-
- name: Publish to TestPyPI
488-
uses: pypa/gh-action-pypi-publish@release/v1
489-
with:
490-
repository-url: https://test.pypi.org/legacy/
491-
print-hash: true
492-
skip-existing: true
493-
494-
# =============================================================================
495-
# Step 5: Test package from TestPyPI on all platforms
496-
# =============================================================================
497-
test-testpypi:
498-
name: Test from TestPyPI - ${{ matrix.os }}
499-
needs: [merge-artifacts, publish-testpypi]
500-
if: always() && needs.publish-testpypi.result == 'success' && github.event_name == 'workflow_dispatch'
501467
runs-on: ${{ matrix.os }}
502468
permissions:
503469
contents: read
@@ -578,23 +544,44 @@ jobs:
578544
echo "OPENSSL_DIR=$opensslDir" >> $env:GITHUB_ENV
579545
}
580546
581-
- name: Wait for TestPyPI propagation
582-
run: sleep 60
547+
- name: Download dist artifacts
548+
uses: actions/download-artifact@v4
549+
with:
550+
name: dist
551+
path: dist/
583552

584-
- name: Install from TestPyPI
553+
- name: Install from built wheel with dev dependencies
585554
shell: bash
586555
run: |
587-
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pywry==${{ needs.merge-artifacts.outputs.version }}
556+
pip install --find-links dist/ "pywry[dev]==${{ needs.merge-artifacts.outputs.version }}"
588557
589558
- name: Verify installation
590559
shell: bash
591560
run: |
592-
python -c "import pywry; print(f'✅ pywry {pywry.__version__} installed successfully')"
593-
python -c "from pywry import PyWry; print('✅ PyWry class imported')"
594-
python -c "from pywry.toolbar import Button, Toolbar; print('✅ Toolbar components imported')"
561+
python -c "import pywry; print(f'pywry {pywry.__version__} installed successfully')"
562+
python -c "from pywry import PyWry; print('PyWry class imported')"
563+
python -c "from pywry.toolbar import Button, Toolbar; print('Toolbar components imported')"
564+
565+
- name: Run tests (Linux)
566+
if: runner.os == 'Linux'
567+
working-directory: pywry
568+
env:
569+
PYWRY_HEADLESS: "1"
570+
NO_AT_BRIDGE: "1"
571+
run: |
572+
dbus-run-session -- xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" python -m pytest -c pytest.ini tests/ -v --tb=short -x
573+
574+
- name: Run tests (Windows/macOS)
575+
if: runner.os != 'Linux'
576+
working-directory: pywry
577+
env:
578+
PYWRY_HEADLESS: "1"
579+
PYWRY_DEPLOY__STATE_BACKEND: "memory"
580+
run: |
581+
python -m pytest -c pytest.ini tests/ -v --tb=short -x --ignore=tests/test_state_redis_integration.py --ignore=tests/test_auth_rbac_integration.py --ignore=tests/test_deploy_mode_integration.py --ignore=tests/test_e2e_deploy_mode.py --ignore=tests/test_e2e_rbac_widgets.py -m "not redis and not container"
595582
596583
# =============================================================================
597-
# Step 6: Create draft release with all artifacts (workflow_dispatch only)
584+
# Step 5: Create draft release with all artifacts (workflow_dispatch only)
598585
# =============================================================================
599586
create-release:
600587
name: Create Draft Release
@@ -659,7 +646,7 @@ jobs:
659646
*This is a draft release. Review and publish to trigger PyPI upload.*
660647
661648
# =============================================================================
662-
# Step 7: Publish to PyPI (on release publish) - Trusted Publisher
649+
# Step 6: Publish to PyPI (on release publish) - Trusted Publisher
663650
# =============================================================================
664651
publish-pypi:
665652
name: Publish to PyPI
@@ -668,9 +655,6 @@ jobs:
668655
defaults:
669656
run:
670657
working-directory: .
671-
environment:
672-
name: pypi
673-
url: https://pypi.org/p/pywry
674658
permissions:
675659
id-token: write
676660

pywry/examples/pywry_demo_chat_magentic.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,14 +330,14 @@ def get_context(name: str) -> str:
330330
"I can see the sales dashboard next to me. Type **@** to attach \n"
331331
"the **Sales Data** grid or **Revenue Chart** \u2014 I'll read the \n"
332332
"live data from the component and analyze it.\n\n"
333-
"You can also **drag-and-drop files** (CSV, JSON, PDF, XLSX, etc.) "
333+
"You can also **drag-and-drop files** (CSV, JSON, TXT, MD) "
334334
"into this chat for analysis."
335335
),
336336
toolbar_width="420px",
337337
toolbar_min_width="320px",
338338
enable_context=True,
339339
enable_file_attach=True,
340-
file_accept_types=[".csv", ".json", ".txt", ".md", ".xlsx", ".pdf"],
340+
file_accept_types=[".csv", ".json", ".txt", ".md"],
341341
include_plotly=True,
342342
include_aggrid=True,
343343
)
@@ -356,6 +356,8 @@ def get_context(name: str) -> str:
356356

357357
widget = app.show(
358358
content,
359+
width=1600,
360+
height=900,
359361
include_plotly=True,
360362
include_aggrid=True,
361363
toolbars=[chat.toolbar()],

pywry/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pywry"
3-
version = "2.0.0"
3+
version = "2.0.0rc1"
44
description = "A lightweight and blazingly fast, cross-platform, WebView rendering engine and desktop UI toolkit for Python."
55
authors = [{ name = "PyWry", email = "pywry2@gmail.com" }]
66
license = { text = "Apache 2.0" }

0 commit comments

Comments
 (0)