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
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
- os: ubuntu-24.04
python-version: "3.9"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install
Expand All @@ -42,8 +42,8 @@ jobs:
hooks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Hooks match samebytes
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## Unreleased

- **`--version`** prints `quietlaunch X.Y.Z`, read from
`quietlaunch.__version__`.
- README names each option's command-line flag beside its `LaunchConfig`
field, and the docs describe what happens rather than how much it matters.
- Tests pick ports below every OS's ephemeral range, so they pass on macOS,
and the fake server listens without a reverse-DNS lookup.
- `.githooks/` carries samebytes' stat-cache hook for working copies in a
synced folder; CI's `hooks` job checks the copies against the samebytes tag.
- CI runs `actions/checkout@v5` and `actions/setup-python@v6`, which run on
Node 24; the v4 and v5 they replace targeted the deprecated Node 20.
- Package metadata lists each supported Python version and macOS, and links
the issue tracker and this changelog.

## v0.1.0 (2026-10-20)

First release: economicspace's `launch_ui.py` (as of economicspace d9c6093),
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ sys.exit(quietlaunch.launch(quietlaunch.LaunchConfig(
)))
```

`python -m quietlaunch --help` lists every option; each sets a `LaunchConfig`
field:
`python -m quietlaunch --help` lists every option, and `--version` prints the
version. Each option sets a `LaunchConfig` field:

| field | flag | default | what |
|---|---|---|---|
Expand Down
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,22 @@ keywords = [
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: MacOS X",
"Environment :: Win32 (MS Windows)",
"Environment :: X11 Applications",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Desktop Environment",
"Topic :: Software Development :: User Interfaces",
]
Expand All @@ -40,6 +49,8 @@ test = ["pytest>=7.0"]

[project.urls]
Repository = "https://github.com/loggger101/quietlaunch"
Issues = "https://github.com/loggger101/quietlaunch/issues"
Changelog = "https://github.com/loggger101/quietlaunch/blob/main/CHANGELOG.md"

# A gui-script, so on Windows the installed `quietlaunch.exe` starts with no
# console, which is the point of the package.
Expand Down
8 changes: 8 additions & 0 deletions quietlaunch/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,14 @@ def _parser():
help="requirements file for the first-run install")
p.add_argument("--no-install", action="store_false", dest="auto_install",
help="never pip-install Streamlit")
# Read here, not at import: `__init__` imports this module, and run as a
# script there is no package to read it from.
try:
from . import __version__ as version
except ImportError:
version = "unknown"
p.add_argument("--version", action="version",
version="quietlaunch %s" % version)
return p


Expand Down
10 changes: 10 additions & 0 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,13 @@ def test_cli_defaults_match_the_dataclass(tmp_path, monkeypatch):
app = str(tmp_path / "ui.py")
launcher.main([app])
assert seen[0] == LaunchConfig(app=app)


def test_cli_version_is_the_package_version(capsys):
"""`--version` names the version pyproject.toml reads, and exits 0."""
import quietlaunch
with pytest.raises(SystemExit) as exc:
launcher.main(["--version"])
assert exc.value.code == 0
assert capsys.readouterr().out.strip() == (
"quietlaunch " + quietlaunch.__version__)
Loading