s2t 0.1.8__tar.gz → 0.1.10__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.10}/AGENTS.md +1 -1
  2. s2t-0.1.10/CONTRIBUTING.md +36 -0
  3. {s2t-0.1.8 → s2t-0.1.10}/Makefile +3 -2
  4. {s2t-0.1.8/src/s2t.egg-info → s2t-0.1.10}/PKG-INFO +6 -5
  5. {s2t-0.1.8 → s2t-0.1.10}/README.md +3 -3
  6. s2t-0.1.10/docs/RELEASING.md +18 -0
  7. s2t-0.1.10/docs/SESSION_STATE.md +35 -0
  8. {s2t-0.1.8 → s2t-0.1.10}/pyproject.toml +3 -2
  9. {s2t-0.1.8 → s2t-0.1.10}/scripts/tag.sh +7 -1
  10. {s2t-0.1.8 → s2t-0.1.10}/src/s2t/cli.py +16 -5
  11. {s2t-0.1.8 → s2t-0.1.10}/src/s2t/recorder.py +25 -11
  12. {s2t-0.1.8 → s2t-0.1.10/src/s2t.egg-info}/PKG-INFO +6 -5
  13. s2t-0.1.8/CONTRIBUTING.md +0 -37
  14. s2t-0.1.8/docs/RELEASING.md +0 -19
  15. s2t-0.1.8/docs/SESSION_STATE.md +0 -35
  16. {s2t-0.1.8 → s2t-0.1.10}/.gitignore +0 -0
  17. {s2t-0.1.8 → s2t-0.1.10}/.pre-commit-config.yaml +0 -0
  18. {s2t-0.1.8 → s2t-0.1.10}/MANIFEST.in +0 -0
  19. {s2t-0.1.8 → s2t-0.1.10}/scripts/bench_transcribe.py +0 -0
  20. {s2t-0.1.8 → s2t-0.1.10}/setup.cfg +0 -0
  21. {s2t-0.1.8 → s2t-0.1.10}/src/s2t/__init__.py +0 -0
  22. {s2t-0.1.8 → s2t-0.1.10}/src/s2t/config.py +0 -0
  23. {s2t-0.1.8 → s2t-0.1.10}/src/s2t/outputs.py +0 -0
  24. {s2t-0.1.8 → s2t-0.1.10}/src/s2t/py.typed +0 -0
  25. {s2t-0.1.8 → s2t-0.1.10}/src/s2t/translator/__init__.py +0 -0
  26. {s2t-0.1.8 → s2t-0.1.10}/src/s2t/translator/argos_backend.py +0 -0
  27. {s2t-0.1.8 → s2t-0.1.10}/src/s2t/types.py +0 -0
  28. {s2t-0.1.8 → s2t-0.1.10}/src/s2t/utils.py +0 -0
  29. {s2t-0.1.8 → s2t-0.1.10}/src/s2t/whisper_engine.py +0 -0
  30. {s2t-0.1.8 → s2t-0.1.10}/src/s2t.egg-info/SOURCES.txt +0 -0
  31. {s2t-0.1.8 → s2t-0.1.10}/src/s2t.egg-info/dependency_links.txt +0 -0
  32. {s2t-0.1.8 → s2t-0.1.10}/src/s2t.egg-info/entry_points.txt +0 -0
  33. {s2t-0.1.8 → s2t-0.1.10}/src/s2t.egg-info/requires.txt +0 -0
  34. {s2t-0.1.8 → s2t-0.1.10}/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.10
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
-
@@ -99,7 +99,8 @@ def run_session(opts: SessionOptions) -> int:
99
99
  detected_lang_holder=detected_lang,
100
100
  )
101
101
 
102
- tx_q: queue.Queue[tuple[int, Path, int, float]] = queue.Queue()
102
+ # Include split cause per chunk: "space" (manual), "pause" (auto), "finish" (final)
103
+ tx_q: queue.Queue[tuple[int, Path, int, float, str]] = queue.Queue()
103
104
  cumulative_text = ""
104
105
  next_to_emit = 1
105
106
  pending: dict[int, str] = {}
@@ -150,8 +151,9 @@ def run_session(opts: SessionOptions) -> int:
150
151
  model = engine.resolve_model(fut)
151
152
  nonlocal cumulative_text, next_to_emit
152
153
  finished_texts: dict[int, str] = {}
154
+ causes: dict[int, str] = {}
153
155
  while True:
154
- idx, path, frames, offset = tx_q.get()
156
+ idx, path, frames, offset, cause = tx_q.get()
155
157
  if idx == -1:
156
158
  break
157
159
  # If in spoken-prompt mode, ensure we don't process payload chunks before prompt is done
@@ -174,12 +176,21 @@ def run_session(opts: SessionOptions) -> int:
174
176
  results.append(res)
175
177
  offsets.append(offset)
176
178
  pending[idx] = text_i
179
+ # Track cause for formatting when emitting in-order
180
+ # cause is one of: "space", "pause", "finish" (or empty for sentinel)
181
+ # Default to "pause" if unknown to avoid extra blank lines.
182
+ causes[idx] = cause or "pause"
177
183
  while next_to_emit in pending:
178
184
  out = pending.pop(next_to_emit)
179
185
  if out:
186
+ # Determine separator based on split cause
187
+ sep = "\n\n" if causes.get(next_to_emit) == "space" else "\n"
180
188
  print(out)
181
- print("")
182
- cumulative_text += out if not cumulative_text else ("\n\n" + out)
189
+ if causes.get(next_to_emit) == "space":
190
+ # Space -> insert a blank line after the chunk
191
+ print("")
192
+ # Build cumulative text with matching separators
193
+ cumulative_text += out if not cumulative_text else (sep + out)
183
194
  try:
184
195
  copy_to_clipboard(cumulative_text)
185
196
  except Exception:
@@ -446,7 +457,7 @@ def main(argv: list[str] | None = None) -> int:
446
457
  parser.add_argument(
447
458
  "--silence-sec",
448
459
  type=float,
449
- default=1.0,
460
+ default=2.0,
450
461
  help="Auto-split when continuous silence >= this many seconds (0 disables)",
451
462
  )
452
463
  parser.add_argument(
@@ -41,7 +41,7 @@ class Recorder:
41
41
 
42
42
  def run(
43
43
  self,
44
- tx_queue: queue.Queue[tuple[int, Path, int, float]],
44
+ tx_queue: queue.Queue[tuple[int, Path, int, float, str]],
45
45
  ) -> tuple[list[Path], list[int], list[float]]:
46
46
  import platform
47
47
  import termios
@@ -224,7 +224,7 @@ class Recorder:
224
224
  threshold_rms = 0.015 # conservative RMS threshold for float32 [-1,1]
225
225
  split_cooldown_sec = 0.2
226
226
 
227
- def _do_split() -> None:
227
+ def _do_split(cause: str) -> None:
228
228
  nonlocal fh, frames_written, cur_path, chunk_index, offset_seconds_total
229
229
  fh.flush()
230
230
  fh.close()
@@ -239,7 +239,9 @@ class Recorder:
239
239
  f"Saved chunk: {cur_path.name} ({dur:.2f}s)",
240
240
  file=sys.stderr,
241
241
  )
242
- tx_queue.put((chunk_index, cur_path, frames_written, chunk_offsets[-1]))
242
+ # Include split cause so downstream can format output accordingly
243
+ # cause: "space" (manual split) or "pause" (auto-split)
244
+ tx_queue.put((chunk_index, cur_path, frames_written, chunk_offsets[-1], cause))
243
245
  else:
244
246
  try:
245
247
  cur_path.unlink(missing_ok=True)
@@ -270,8 +272,13 @@ class Recorder:
270
272
  try:
271
273
  while True:
272
274
  cmd = ctrl_q.get_nowait()
273
- if cmd == "split":
274
- _do_split()
275
+ if cmd == "split_manual":
276
+ _do_split("space")
277
+ # Reset silence tracking on manual split
278
+ silent_frames_run = 0
279
+ seen_non_silent = False
280
+ elif cmd == "split_auto":
281
+ _do_split("pause")
275
282
  # Reset silence tracking on manual split
276
283
  silent_frames_run = 0
277
284
  seen_non_silent = False
@@ -289,15 +296,22 @@ class Recorder:
289
296
  f"Saved chunk: {cur_path.name} ({dur:.2f}s)",
290
297
  file=sys.stderr,
291
298
  )
299
+ # Final chunk – mark cause as "finish" so downstream can avoid extra blank spacing
292
300
  tx_queue.put(
293
- (chunk_index, cur_path, frames_written, chunk_offsets[-1])
301
+ (
302
+ chunk_index,
303
+ cur_path,
304
+ frames_written,
305
+ chunk_offsets[-1],
306
+ "finish",
307
+ )
294
308
  )
295
309
  else:
296
310
  try:
297
311
  cur_path.unlink(missing_ok=True)
298
312
  except Exception:
299
313
  pass
300
- tx_queue.put((-1, Path(), 0, 0.0))
314
+ tx_queue.put((-1, Path(), 0, 0.0, ""))
301
315
  return
302
316
  except queue.Empty:
303
317
  pass
@@ -348,12 +362,12 @@ class Recorder:
348
362
  file=sys.stderr,
349
363
  )
350
364
  last_split_time = time.perf_counter()
351
- # Queue a split for the next control phase
352
- ctrl_q.put("split")
365
+ # Queue an auto split for the next control phase
366
+ ctrl_q.put("split_auto")
353
367
  # Reset silence tracking now to avoid cascaded triggers
354
368
  silent_frames_run = 0
355
369
  seen_non_silent = False
356
- tx_queue.put((-1, Path(), 0, 0.0))
370
+ tx_queue.put((-1, Path(), 0, 0.0, ""))
357
371
 
358
372
  def cb(indata: Any, frames: int, time_info: Any, status: Any) -> None:
359
373
  if status:
@@ -384,7 +398,7 @@ class Recorder:
384
398
  except queue.Empty:
385
399
  continue
386
400
  if evt == "SPACE":
387
- ctrl_q.put("split")
401
+ ctrl_q.put("split_manual")
388
402
  elif evt == "ENTER":
389
403
  ctrl_q.put("finish")
390
404
  break
@@ -1,15 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: s2t
3
- Version: 0.1.8
3
+ Version: 0.1.10
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