s2t 0.1.8__tar.gz → 0.1.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {s2t-0.1.8 → s2t-0.1.9}/AGENTS.md +1 -1
  2. s2t-0.1.9/CONTRIBUTING.md +36 -0
  3. {s2t-0.1.8 → s2t-0.1.9}/Makefile +3 -2
  4. {s2t-0.1.8/src/s2t.egg-info → s2t-0.1.9}/PKG-INFO +6 -5
  5. {s2t-0.1.8 → s2t-0.1.9}/README.md +3 -3
  6. s2t-0.1.9/docs/RELEASING.md +18 -0
  7. s2t-0.1.9/docs/SESSION_STATE.md +35 -0
  8. {s2t-0.1.8 → s2t-0.1.9}/pyproject.toml +3 -2
  9. {s2t-0.1.8 → s2t-0.1.9}/scripts/tag.sh +7 -1
  10. {s2t-0.1.8 → s2t-0.1.9}/src/s2t/cli.py +1 -1
  11. {s2t-0.1.8 → s2t-0.1.9/src/s2t.egg-info}/PKG-INFO +6 -5
  12. s2t-0.1.8/CONTRIBUTING.md +0 -37
  13. s2t-0.1.8/docs/RELEASING.md +0 -19
  14. s2t-0.1.8/docs/SESSION_STATE.md +0 -35
  15. {s2t-0.1.8 → s2t-0.1.9}/.gitignore +0 -0
  16. {s2t-0.1.8 → s2t-0.1.9}/.pre-commit-config.yaml +0 -0
  17. {s2t-0.1.8 → s2t-0.1.9}/MANIFEST.in +0 -0
  18. {s2t-0.1.8 → s2t-0.1.9}/scripts/bench_transcribe.py +0 -0
  19. {s2t-0.1.8 → s2t-0.1.9}/setup.cfg +0 -0
  20. {s2t-0.1.8 → s2t-0.1.9}/src/s2t/__init__.py +0 -0
  21. {s2t-0.1.8 → s2t-0.1.9}/src/s2t/config.py +0 -0
  22. {s2t-0.1.8 → s2t-0.1.9}/src/s2t/outputs.py +0 -0
  23. {s2t-0.1.8 → s2t-0.1.9}/src/s2t/py.typed +0 -0
  24. {s2t-0.1.8 → s2t-0.1.9}/src/s2t/recorder.py +0 -0
  25. {s2t-0.1.8 → s2t-0.1.9}/src/s2t/translator/__init__.py +0 -0
  26. {s2t-0.1.8 → s2t-0.1.9}/src/s2t/translator/argos_backend.py +0 -0
  27. {s2t-0.1.8 → s2t-0.1.9}/src/s2t/types.py +0 -0
  28. {s2t-0.1.8 → s2t-0.1.9}/src/s2t/utils.py +0 -0
  29. {s2t-0.1.8 → s2t-0.1.9}/src/s2t/whisper_engine.py +0 -0
  30. {s2t-0.1.8 → s2t-0.1.9}/src/s2t.egg-info/SOURCES.txt +0 -0
  31. {s2t-0.1.8 → s2t-0.1.9}/src/s2t.egg-info/dependency_links.txt +0 -0
  32. {s2t-0.1.8 → s2t-0.1.9}/src/s2t.egg-info/entry_points.txt +0 -0
  33. {s2t-0.1.8 → s2t-0.1.9}/src/s2t.egg-info/requires.txt +0 -0
  34. {s2t-0.1.8 → s2t-0.1.9}/src/s2t.egg-info/top_level.txt +0 -0
@@ -18,7 +18,7 @@ Prefer Make targets when available:
18
18
  If no Makefile: `python -m venv .venv && source .venv/bin/activate && pip install -e .[dev]`, then `pytest -q`, `ruff check .`, `black --check .`.
19
19
 
20
20
  ## Coding Style & Naming Conventions
21
- - Python 3.11+, 4-space indentation, type hints required.
21
+ - Python 3.11–3.12, 4-space indentation, type hints required.
22
22
  - Naming: `snake_case` for modules/functions/vars, `PascalCase` for classes.
23
23
  - Docstrings: concise, Google-style; include argument/return types when helpful.
24
24
  - Tools: `black` (format), `ruff` (lint), `mypy` (types). Keep imports sorted.
@@ -0,0 +1,36 @@
1
+ # Contributing
2
+
3
+ Thanks for contributing! This guide summarizes the setup and common development commands.
4
+
5
+ ## Requirements
6
+ - Python 3.11–3.12
7
+ - Recommended: project virtualenv via Makefile
8
+
9
+ ## Setup
10
+ ```
11
+ make setup
12
+ ```
13
+
14
+ ## Common Commands
15
+ - Format (auto-fix): `make format` (Ruff fixes + Ruff formatter)
16
+ - Lint + type check: `make lint` (Ruff + mypy)
17
+ - Tests: `make test`
18
+ - Full gate (pre-release): `make check`
19
+
20
+ ## Pre-commit Hooks
21
+ Install optional Git hooks locally:
22
+ ```
23
+ make precommit-install
24
+ ```
25
+ Hooks include Ruff (`--fix`), Ruff formatter, mypy, and basic checks.
26
+
27
+ ## Style & Typing
28
+ - Formatter: Ruff formatter (Black is not used)
29
+ - Linting: Ruff (including import sorting and quality rules)
30
+ - Types: mypy; please use type hints consistently
31
+
32
+ ## Project Structure
33
+ - App code: `src/s2t/` (CLI, modules, utils)
34
+ - Tests: `tests/`
35
+ - Scripts: `scripts/`
36
+ - Docs: `docs/`
@@ -47,7 +47,7 @@ format: guard-venv ensure-dev
47
47
  $(PYTHON) -m ruff format .
48
48
 
49
49
  test: guard-venv ensure-dev
50
- $(PYTHON) -m pytest -q
50
+ @$(PYTHON) -m pytest -q || { code=$$?; if [ $$code -eq 5 ]; then echo "No tests collected; treating as success."; exit 0; else exit $$code; fi; }
51
51
 
52
52
  check: guard-venv ensure-dev lint test
53
53
 
@@ -113,5 +113,6 @@ guard-venv:
113
113
  # make tag TAG_PREFIX=v # default prefix 'v'
114
114
  # make tag REMOTE=origin # default remote 'origin'
115
115
  # make tag # auto-bump patch from latest tag
116
- tag:
116
+ # Create and push a git tag only after checks pass
117
+ tag: check
117
118
  @VERSION="$(VERSION)" scripts/tag.sh
@@ -1,15 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: s2t
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: Speech to Text (s2t): Record audio, run Whisper, export formats, and copy transcript to clipboard.
5
5
  Author: Maintainers
6
6
  License-Expression: LicenseRef-Proprietary
7
7
  Classifier: Programming Language :: Python :: 3
8
8
  Classifier: Programming Language :: Python :: 3 :: Only
9
9
  Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
10
11
  Classifier: Environment :: Console
11
12
  Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.11
13
+ Requires-Python: <3.13,>=3.11
13
14
  Description-Content-Type: text/markdown
14
15
  Requires-Dist: sounddevice>=0.4.6
15
16
  Requires-Dist: soundfile>=0.12.1
@@ -36,7 +37,7 @@ Record audio from your microphone, run Whisper to transcribe it, export common f
36
37
  - Editable: `pip install -e .`
37
38
  - Standard: `pip install .`
38
39
 
39
- Requirements: Python 3.11+. No mandatory external binaries. ffmpeg is optional (only for MP3 encoding/decoding).
40
+ Requirements: Python 3.11–3.12. No mandatory external binaries. ffmpeg is optional (only for MP3 encoding/decoding).
40
41
 
41
42
  System requirements (Linux)
42
43
  - Some environments need system libraries for audio I/O:
@@ -91,5 +92,5 @@ Notes on models
91
92
  - The name `turbo` refers to OpenAI’s hosted model family and is not provided by the local `whisper` CLI. If you pass `-m turbo`, the command may fail; choose a supported local model instead.
92
93
 
93
94
  ## Development & Release
94
- - Für Entwickler-Setup und Beitragshinweise siehe `CONTRIBUTING.md`.
95
- - Für den Release-Prozess siehe `docs/RELEASING.md`.
95
+ - For developer setup and contribution guidelines, see `CONTRIBUTING.md`.
96
+ - For the release process, see `docs/RELEASING.md`.
@@ -7,7 +7,7 @@ Record audio from your microphone, run Whisper to transcribe it, export common f
7
7
  - Editable: `pip install -e .`
8
8
  - Standard: `pip install .`
9
9
 
10
- Requirements: Python 3.11+. No mandatory external binaries. ffmpeg is optional (only for MP3 encoding/decoding).
10
+ Requirements: Python 3.11–3.12. No mandatory external binaries. ffmpeg is optional (only for MP3 encoding/decoding).
11
11
 
12
12
  System requirements (Linux)
13
13
  - Some environments need system libraries for audio I/O:
@@ -62,5 +62,5 @@ Notes on models
62
62
  - The name `turbo` refers to OpenAI’s hosted model family and is not provided by the local `whisper` CLI. If you pass `-m turbo`, the command may fail; choose a supported local model instead.
63
63
 
64
64
  ## Development & Release
65
- - Für Entwickler-Setup und Beitragshinweise siehe `CONTRIBUTING.md`.
66
- - Für den Release-Prozess siehe `docs/RELEASING.md`.
65
+ - For developer setup and contribution guidelines, see `CONTRIBUTING.md`.
66
+ - For the release process, see `docs/RELEASING.md`.
@@ -0,0 +1,18 @@
1
+ # Releasing
2
+
3
+ Versioning and releases are powered by `setuptools-scm` (PEP 621 dynamic version):
4
+
5
+ - Versions are derived from Git tags (e.g., `v0.1.0`).
6
+ - During development (without a tag) a fallback version is used; with a tag the package gets the exact version.
7
+
8
+ ## Steps
9
+ 1. Create and push a tag, for example:
10
+ - `git tag v0.1.1`
11
+ - `git push --tags`
12
+ 2. Publish to TestPyPI or PyPI:
13
+ - `make publish-test` or `make publish`
14
+ - These targets build artifacts first (`make build`) and run checks (`make check`).
15
+
16
+ ## Build Details
17
+ - `make check` runs formatting/linting/type checking and tests.
18
+ - `make build` creates the sdist and wheel.
@@ -0,0 +1,35 @@
1
+ # Session State
2
+
3
+ Status: Preparing deployment; the package builds and passes type checks. Upload to TestPyPI is pending.
4
+
5
+ ## Changes This Session (Summary)
6
+ - Switched to Ruff-only formatting (removed Black); `make format`/`make lint` perform auto-fixes.
7
+ - Fixed mypy issues strictly (TypedDicts in `src/s2t/types.py`).
8
+ - Moved third‑party stubs to `stubs/` (`sounddevice`, `soundfile`, `pyperclip`, `whisper`).
9
+ - Marked package as typed (`src/s2t/py.typed`) and excluded stubs from the sdist via `MANIFEST.in`.
10
+ - Updated pyproject: Ruff configuration and license field to SPDX style (`LicenseRef-Proprietary`).
11
+ - Docs: streamlined README; added `CONTRIBUTING.md` and `docs/RELEASING.md`. Added Linux system library notes.
12
+ - Build verified: `make build` produces a valid wheel + sdist; `twine check dist/*` passes.
13
+
14
+ ## Open Steps (for TestPyPI/PyPI)
15
+ 1) Provide TestPyPI credentials (one of):
16
+ - Project-local `.env.twine` (gitignored) with:
17
+ - `TWINE_USERNAME=__token__`
18
+ - `TWINE_PASSWORD=your_testpypi_api_token`
19
+ - or configure `~/.pypirc` (testpypi section).
20
+ 2) Trigger upload:
21
+ - `make publish-test`
22
+ 3) Validate installation in a fresh venv:
23
+ - `python -m venv .venv-test && source .venv-test/bin/activate`
24
+ - `pip install --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple s2t`
25
+ - Smoke test: `s2t -h`, optionally `s2t -L`
26
+ 4) If OK: upload to PyPI
27
+ - `make publish` (with PyPI token analogous to TestPyPI)
28
+
29
+ ## Notes
30
+ - Linux: install `libportaudio2` and `libsndfile1` if needed; ffmpeg is optional for MP3.
31
+ - No secrets in the repo: `.env.twine` is excluded via `.gitignore`.
32
+
33
+ ## Re-entry
34
+ - If `.env.twine` already exists: run `make publish-test` directly.
35
+ - Then test the installation as above; if successful, run `make publish`.
@@ -11,7 +11,7 @@ name = "s2t"
11
11
  dynamic = ["version"]
12
12
  description = "Speech to Text (s2t): Record audio, run Whisper, export formats, and copy transcript to clipboard."
13
13
  readme = "README.md"
14
- requires-python = ">=3.11"
14
+ requires-python = ">=3.11,<3.13"
15
15
  license = "LicenseRef-Proprietary"
16
16
  authors = [
17
17
  { name = "Maintainers" }
@@ -27,6 +27,7 @@ classifiers = [
27
27
  "Programming Language :: Python :: 3",
28
28
  "Programming Language :: Python :: 3 :: Only",
29
29
  "Programming Language :: Python :: 3.11",
30
+ "Programming Language :: Python :: 3.12",
30
31
  "Environment :: Console",
31
32
  "Operating System :: OS Independent",
32
33
  ]
@@ -72,7 +73,7 @@ select = ["E", "F", "I", "B", "UP"]
72
73
  ignore = ["E501"]
73
74
 
74
75
  [tool.ruff.format]
75
- # Ruff-Formatter übernimmt die Formatierung (Black ersetzt)
76
+ # Ruff formatter handles formatting (replaces Black)
76
77
  quote-style = "preserve"
77
78
 
78
79
  [tool.pytest.ini_options]
@@ -34,6 +34,13 @@ fi
34
34
  TAG="${TAG_PREFIX}${VER}"
35
35
  echo "Preparing tag ${TAG} (remote ${REMOTE})"
36
36
 
37
+ # Ensure clean working tree (no uncommitted changes or untracked files)
38
+ if [[ -n "$(git status --porcelain)" ]]; then
39
+ echo "Error: working tree is not clean. Commit, stash, or remove changes before tagging." >&2
40
+ git status --porcelain
41
+ exit 1
42
+ fi
43
+
37
44
  # Remove existing tag locally/remote if present
38
45
  git tag -d "${TAG}" >/dev/null 2>&1 || true
39
46
  git push "${REMOTE}" --delete "${TAG}" >/dev/null 2>&1 || true
@@ -42,4 +49,3 @@ git push "${REMOTE}" --delete "${TAG}" >/dev/null 2>&1 || true
42
49
  git tag -a "${TAG}" -m "Release ${TAG}"
43
50
  git push "${REMOTE}" "${TAG}"
44
51
  echo "Tag ${TAG} pushed to ${REMOTE}"
45
-
@@ -446,7 +446,7 @@ def main(argv: list[str] | None = None) -> int:
446
446
  parser.add_argument(
447
447
  "--silence-sec",
448
448
  type=float,
449
- default=1.0,
449
+ default=2.0,
450
450
  help="Auto-split when continuous silence >= this many seconds (0 disables)",
451
451
  )
452
452
  parser.add_argument(
@@ -1,15 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: s2t
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: Speech to Text (s2t): Record audio, run Whisper, export formats, and copy transcript to clipboard.
5
5
  Author: Maintainers
6
6
  License-Expression: LicenseRef-Proprietary
7
7
  Classifier: Programming Language :: Python :: 3
8
8
  Classifier: Programming Language :: Python :: 3 :: Only
9
9
  Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
10
11
  Classifier: Environment :: Console
11
12
  Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.11
13
+ Requires-Python: <3.13,>=3.11
13
14
  Description-Content-Type: text/markdown
14
15
  Requires-Dist: sounddevice>=0.4.6
15
16
  Requires-Dist: soundfile>=0.12.1
@@ -36,7 +37,7 @@ Record audio from your microphone, run Whisper to transcribe it, export common f
36
37
  - Editable: `pip install -e .`
37
38
  - Standard: `pip install .`
38
39
 
39
- Requirements: Python 3.11+. No mandatory external binaries. ffmpeg is optional (only for MP3 encoding/decoding).
40
+ Requirements: Python 3.11–3.12. No mandatory external binaries. ffmpeg is optional (only for MP3 encoding/decoding).
40
41
 
41
42
  System requirements (Linux)
42
43
  - Some environments need system libraries for audio I/O:
@@ -91,5 +92,5 @@ Notes on models
91
92
  - The name `turbo` refers to OpenAI’s hosted model family and is not provided by the local `whisper` CLI. If you pass `-m turbo`, the command may fail; choose a supported local model instead.
92
93
 
93
94
  ## Development & Release
94
- - Für Entwickler-Setup und Beitragshinweise siehe `CONTRIBUTING.md`.
95
- - Für den Release-Prozess siehe `docs/RELEASING.md`.
95
+ - For developer setup and contribution guidelines, see `CONTRIBUTING.md`.
96
+ - For the release process, see `docs/RELEASING.md`.
s2t-0.1.8/CONTRIBUTING.md DELETED
@@ -1,37 +0,0 @@
1
- # Contributing
2
-
3
- Danke für deinen Beitrag! Hier findest du die wichtigsten Hinweise für Entwicklung und Checks.
4
-
5
- ## Voraussetzungen
6
- - Python 3.11+
7
- - Empfohlen: Projekt-venv via Makefile
8
-
9
- ## Setup
10
- ```
11
- make setup
12
- ```
13
-
14
- ## Wichtige Befehle
15
- - Formatieren (auto-fix): `make format` (Ruff Lint-Fixes + Ruff Formatter)
16
- - Lint + Typprüfung (auto-fix + mypy): `make lint`
17
- - Tests: `make test`
18
- - Kombiniert (Gate vor Build/Release): `make check`
19
-
20
- ## Pre-commit Hooks
21
- Installiere optionale Git-Hooks lokal:
22
- ```
23
- make precommit-install
24
- ```
25
- Aktive Hooks: Ruff (`--fix`), Ruff Formatter, mypy und Basis-Hooks.
26
-
27
- ## Stil & Typen
28
- - Formatter: Ruff Formatter (Black wurde entfernt)
29
- - Linting: Ruff (Importsortierung, Qualitätsregeln)
30
- - Typen: mypy; bitte durchgängig Typannotationen nutzen
31
-
32
- ## Struktur
33
- - App-Code: `src/transcriber/` (CLI, Module)
34
- - Tests: `tests/`
35
- - Scripts: `scripts/`
36
- - Docs: `docs/`
37
-
@@ -1,19 +0,0 @@
1
- # Releasing
2
-
3
- Versionierung und Releases basieren auf `setuptools-scm` (PEP 621, dynamische Version):
4
-
5
- - Versionen werden über Git-Tags abgeleitet (z. B. `v0.1.0`).
6
- - Während der Entwicklung (ohne Tag) wird eine Fallback-Version genutzt; mit Tag erhält das Paket die exakte Version.
7
-
8
- ## Schritte
9
- 1. Tag erstellen und pushen, z. B.:
10
- - `git tag v0.1.1`
11
- - `git push --tags`
12
- 2. Optional TestPyPI, sonst direkt PyPI:
13
- - `make publish-test` oder `make publish`
14
- - Diese Targets bauen zuvor (`make build`) und führen Checks aus (`make check`).
15
-
16
- ## Build-Details
17
- - `make check` führt Format/Lint/Typprüfung und Tests aus.
18
- - `make build` erzeugt sdist und Wheel.
19
-
@@ -1,35 +0,0 @@
1
- # Session State
2
-
3
- Stand: Deployment vorbereiten, Paket ist baubar und typgeprüft. Upload zu TestPyPI steht aus.
4
-
5
- ## Änderungen dieser Session (Kurzfassung)
6
- - Formatter auf nur Ruff umgestellt (Black entfernt); Makefile `format`/`lint` fixen automatisch.
7
- - mypy-Fehler streng behoben (TypedDicts in `src/s2t/types.py`).
8
- - Drittanbieter-Stubs nach `stubs/` verschoben (`sounddevice`, `soundfile`, `pyperclip`, `whisper`).
9
- - Paket als "typed" markiert (`src/s2t/py.typed`) und Stubs via `MANIFEST.in` vom sdist ausgeschlossen.
10
- - pyproject: Ruff-Konfig aktualisiert, Lizenzfeld auf SPDX-Form (`LicenseRef-Proprietary`).
11
- - Doku: README verschlankt; `CONTRIBUTING.md`, `docs/RELEASING.md` hinzugefügt. Linux Systemlibs-Hinweis ergänzt.
12
- - Build geprüft: `make build` erzeugt gültiges Wheel + sdist; `twine check dist/*` ist grün.
13
-
14
- ## Offene Schritte (für TestPyPI/PyPI)
15
- 1) TestPyPI-Creds bereitstellen (eine der Optionen):
16
- - `.env.twine` im Projekt (gitignored) mit:
17
- - `TWINE_USERNAME=__token__`
18
- - `TWINE_PASSWORD=dein_testpypi_api_token`
19
- - oder `~/.pypirc` konfigurieren (testpypi Sektion).
20
- 2) Upload anstoßen:
21
- - `make publish-test`
22
- 3) Installation validieren in frischem venv:
23
- - `python -m venv .venv-test && source .venv-test/bin/activate`
24
- - `pip install --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple s2t`
25
- - Smoke: `s2t -h`, optional `s2t -L`
26
- 4) Wenn ok: PyPI-Upload
27
- - `make publish` (mit PyPI-Token analog zu TestPyPI)
28
-
29
- ## Hinweise
30
- - Linux: ggf. `libportaudio2` und `libsndfile1` installieren; ffmpeg optional für MP3.
31
- - Keine Secrets im Repo: `.env.twine` ist per `.gitignore` ausgeschlossen.
32
-
33
- ## Wiedereinstieg
34
- - Falls `.env.twine` schon existiert: direkt `make publish-test` ausführen.
35
- - Danach Installation wie oben testen; bei Erfolg `make publish`.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes