Skip to content

feat!: modernise project to current Deepgram Python standards#20

Merged
lukeocodes merged 1 commit intomainfrom
chore/modernise-project-standards
Mar 29, 2026
Merged

feat!: modernise project to current Deepgram Python standards#20
lukeocodes merged 1 commit intomainfrom
chore/modernise-project-standards

Conversation

@lukeocodes
Copy link
Copy Markdown
Member

@lukeocodes lukeocodes commented Mar 29, 2026

Summary

  • Replace setup.py with pyproject.toml (setuptools backend, ruff/mypy/pytest config, proper classifiers)
  • Add full type hints and docstrings across all source files
  • Add py.typed PEP 561 marker
  • Export ConverterException and EmptyTranscriptException from __init__
  • Add CHANGELOG.md, SECURITY.md, Makefile
  • Comprehensive README rewrite — streaming usage, API reference, diarization examples, corrected repo links
  • Add CI workflow (ruff + mypy + pytest matrix on Python 3.10–3.13)
  • Switch release workflow to release-please + PyPI trusted publishing (OIDC, no API token needed)
  • Update CONTRIBUTING.md with dev setup, make targets, and adding-converter guide

Trusted publishing setup required

Before the next release, add a trusted publisher at:
https://pypi.org/manage/project/deepgram-captions/settings/publishing/

  • Owner: deepgram
  • Repo: deepgram-python-captions
  • Workflow: release.yml
  • Environment: pypi

Test plan

  • pip install -e ".[dev]" && make check passes
  • make test passes on Python 3.10, 3.11, 3.12, 3.13
  • CI workflow runs on PR

@lukeocodes lukeocodes requested a review from a team March 29, 2026 08:02
- Replace setup.py with pyproject.toml (setuptools backend, ruff/mypy/pytest config)
- Add full type hints and docstrings across all source files
- Add py.typed PEP 561 marker
- Export ConverterException and EmptyTranscriptException from __init__
- Add CI workflow (lint + type check + test matrix on Python 3.10–3.13)
- Switch release workflow to PyPI trusted publishing (OIDC, no API token)
- Fix PEP 639 license classifier conflict breaking pip install on newer setuptools
- Fix datetime.utcfromtimestamp() deprecation for Python 3.12+ compatibility

BREAKING CHANGE: webvtt() and srt() now raise EmptyTranscriptException when
the converter returns no lines; previously returned an empty string.
@lukeocodes lukeocodes force-pushed the chore/modernise-project-standards branch from 96e51a1 to e151b64 Compare March 29, 2026 08:07
@lukeocodes lukeocodes changed the title chore: modernise project to current Deepgram Python standards feat!: modernise project to current Deepgram Python standards Mar 29, 2026
@lukeocodes lukeocodes merged commit 0c6e563 into main Mar 29, 2026
5 checks passed
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