Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 2 additions & 8 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,10 @@ jobs:
path: releases
merge-multiple: true

- name: Remove conflicting dev release assets
- name: Clear dev release assets
if: needs.get-version.outputs.is-dev == 'true'
continue-on-error: true
run: |
for asset in $(gh release view dev --json assets -q '.assets[].name' 2>/dev/null); do
case "$asset" in
*-full.nupkg|*-delta.nupkg) ;; # Keep old nupkgs for delta chain
*) gh release delete-asset dev "$asset" --yes ;;
esac
done
run: gh release view dev --json assets -q '.assets[].name' | xargs -I {} gh release delete-asset dev {} --yes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"cSpell.words": [
"qasync"
],
}
61 changes: 36 additions & 25 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 15 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,29 @@ requires-python = ">=3.14, <3.15"
dependencies = [
"pyside6>=6.10.2",
"packaging>=26.0",
"porringer>=0.2.1.dev20",
"porringer>=0.2.1.dev31",
"qasync>=0.28.0",
"velopack>=0.0.1369.dev7516",
"typer>=0.23.1",
"typer>=0.24.0",
]

[project.urls]
homepage = "https://github.com/synodic/synodic-client"
repository = "https://github.com/synodic/synodic-client"

[dependency-groups]
build = ["pyinstaller>=6.19.0"]
lint = ["ruff>=0.15.1", "pyrefly>=0.52.0"]
test = ["pytest>=9.0.2", "pytest-cov>=7.0.0", "pytest-mock>=3.15.1"]
build = [
"pyinstaller>=6.19.0",
]
lint = [
"ruff>=0.15.1",
"pyrefly>=0.53.0",
]
test = [
"pytest>=9.0.2",
"pytest-cov>=7.0.0",
"pytest-mock>=3.15.1",
]

[project.scripts]
synodic-c = "synodic_client.cli:app"
Expand Down
2 changes: 0 additions & 2 deletions synodic_client/application/icon.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
so every caller shares the same instance.
"""

from __future__ import annotations

from PySide6.QtGui import QIcon, QPixmap

from synodic_client.client import Client
Expand Down
14 changes: 9 additions & 5 deletions synodic_client/application/qt.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
"""GUI entry point for the Synodic Client application."""

import asyncio
import ctypes
import logging
import signal
import sys
import types
from collections.abc import Callable

import qasync
from porringer.api import API
from porringer.schema import LocalConfiguration
from PySide6.QtCore import Qt, QTimer
Expand Down Expand Up @@ -48,8 +50,6 @@ def _init_services(logger: logging.Logger) -> tuple[Client, API, GlobalConfigura
update_config.repo_url,
)

porringer.plugin.list()

return client, porringer, config


Expand Down Expand Up @@ -142,6 +142,9 @@ def application(*, uri: str | None = None, dev_mode: bool = False) -> None:

app = _init_app()

loop = qasync.QEventLoop(app)
asyncio.set_event_loop(loop)

instance = SingleInstance(app)
if instance.try_send_to_existing(uri or ''):
logger.info('Another instance is already running, exiting')
Expand All @@ -168,9 +171,10 @@ def _handle_install_uri(manifest_url: str) -> None:
if uri:
_process_uri(uri, _handle_install_uri)

# sys.exit ensures proper cleanup and exit code propagation
# Leading underscore indicates references kept alive intentionally until exec() returns
sys.exit(app.exec())
# qasync integrates the asyncio event loop with Qt's event loop,
# enabling async/await usage in the GUI layer without dedicated threads.
with loop:
loop.run_forever()


_PROTOCOL_SCHEME = 'synodic'
Expand Down
3 changes: 2 additions & 1 deletion synodic_client/application/screen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

from __future__ import annotations

from porringer.schema import PluginKind, SkipReason
from porringer.schema import SkipReason
from porringer.schema.plugin import PluginKind

ACTION_KIND_LABELS: dict[PluginKind | None, str] = {
PluginKind.PACKAGE: 'Package',
Expand Down
Loading
Loading