Skip to content

One-command launch, and publish to PyPI from tagged releases - #4

Merged
ftymoshchuk merged 2 commits into
mainfrom
claude/affectionate-dirac-bdukrw
Oct 16, 2026
Merged

ftymoshchuk merged 2 commits into
mainfrom
claude/affectionate-dirac-bdukrw

Conversation

@ftymoshchuk

Copy link
Copy Markdown
Owner

Launch

  • pasteup opens the app in the browser once the server answers. The console shows where it runs and how to stop it, without a log line per request.
  • Running it again while Pasteup runs reopens the running copy. If another program holds port 8000 it moves to the next free port and says so; a port chosen with --port is never swapped, and an out-of-range one is refused.
  • The browser is left alone with --no-browser, for a non-local address, and on Linux without a display (Python would fall back to a text browser in the terminal). A missing ffmpeg is mentioned at start.
  • pasteup --shortcut writes a double-click launcher that runs this installation by its full path: Pasteup.command on the macOS desktop, Pasteup.bat on the Windows desktop (registry-resolved, so a OneDrive desktop works), an applications-menu entry on Linux.
  • GET /api/jobs/health now also returns "app": "pasteup" and the version, which is how a second pasteup recognises the first. Additive.

Publishing

  • New release.yml, modelled on sigrix-io/mullion's: a pushed v* tag builds the sdist and wheel, then checks:

    • the tag matches the built version;
    • CHANGELOG.md names that version and nothing is left under Unreleased;
    • twine check --strict passes;
    • the test suite passes against the installed wheel.

    It then publishes by trusted publishing (no token; environment pypi) and installs the result back from PyPI to verify it. All actions are pinned to commits, and the reused mullion pins were checked against their tags.

  • CI gains a build job (sdist + wheel, twine check --strict, clean wheel install with templates and fonts) feeding ci-passed, and the test matrix adds Python 3.12.

  • Metadata: keywords, classifiers, issue and changelog links, and license = "Apache-2.0 AND OFL-1.1" so the bundled fonts are declared. The README installs from PyPI (pipx install pasteup, uv tool install pasteup, uvx pasteup), uses absolute links so they render on PyPI, and documents releasing. CHANGELOG.md starts at 0.1.0.

Before the first release

PyPI must trust this workflow. Add a pending publisher at https://pypi.org/manage/account/publishing/ with:

  • project pasteup
  • owner ftymoshchuk
  • repository pasteup
  • workflow release.yml
  • environment pypi

Then tag v0.1.0 on main.

Testing

  • ruff check .; pytest (158 tests) on Python 3.11, 3.12 and 3.13; actionlint (with shellcheck) on both workflows.
  • Real runs of pasteup (fake $BROWSER, proxy variables set):
    • first launch, reuse while running, Ctrl+C;
    • port 8000 held by another program, explicit busy port;
    • headless machine, the Linux shortcut, and the generated macOS launcher executed.
  • The documented installs, run for real:
    • uv tool install / uv tool upgrade and pipx install / pipx upgrade from a git URL, each picking up a new commit;
    • uvx --from git+https://github.com/ftymoshchuk/pasteup.git.
  • Release gates extracted from release.yml and run: a matching tag and changelog pass; a mismatched tag, a missing changelog version and a leftover Unreleased entry each fail with their message.
  • The release job's wheel test run locally: the wheel installs with [dev], imports from site-packages, and passes all 158 tests. The CI build job's wheel check passes too.
  • Not run here: the Windows .bat launcher on Windows and the macOS launcher on a Mac (covered by tests of the generated files), and the publish/verify jobs, which need the PyPI publisher.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E6aBDEnU4vqKQ4F9cnJMrL


Generated by Claude Code

`pasteup` now opens the app in the browser as soon as the server answers,
prints where it is running and how to stop it, and keeps request logs out of
the way. Running it again while Pasteup runs opens the running copy instead
of failing on a taken port; if another program holds port 8000, it moves to
the next free port and says so. A port chosen with --port is never swapped.
The browser is left alone with --no-browser, for a non-local address, and on
a Linux machine with no display, where Python would fall back to a text
browser in the terminal. When ffmpeg is missing, it says so at start.

`pasteup --shortcut` writes a double-click launcher that runs this
installation by its full path: Pasteup.command on the macOS desktop,
Pasteup.bat on the Windows desktop (wherever the registry says it is, often
OneDrive) and an applications-menu entry on Linux.

The health endpoint now names the app, which is how a second `pasteup`
recognises the first.

The README installs Pasteup with pipx or uv straight from GitHub, with no
clone or virtualenv, and shows a no-install run with uvx.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E6aBDEnU4vqKQ4F9cnJMrL
A pushed `v*` tag runs a Release workflow modelled on sigrix-io/mullion's:
it builds the sdist and wheel, refuses a tag that does not name the built
version or a changelog that does not name it (or still files entries under
Unreleased), checks the README renders on PyPI, runs the test suite against
the built wheel, uploads by trusted publishing (no stored token, from the
`pypi` environment), then installs the result back from PyPI by name to
check it. Every action there is pinned to a commit, including the publish
action, which holds the credential.

CI gains a build job (sdist and wheel, `twine check --strict`, a clean wheel
install with its templates and fonts), so packaging slips show up on pull
requests; it feeds `ci-passed`. The test matrix adds Python 3.12, which the
classifiers now name.

The package metadata gains keywords, classifiers, issue and changelog links,
and a licence expression that also covers the bundled OFL fonts. The README
installs from PyPI (`pipx install pasteup`, `uvx pasteup`), uses absolute
links so they work on PyPI, and says how to release. CHANGELOG.md starts at
0.1.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E6aBDEnU4vqKQ4F9cnJMrL
@ftymoshchuk
ftymoshchuk merged commit af3948f into main Oct 16, 2026
5 checks passed
@ftymoshchuk
ftymoshchuk deleted the claude/affectionate-dirac-bdukrw branch October 16, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants