Skip to content

Implement PyPI release workflow#12

Merged
slusset merged 1 commit intomainfrom
feature/gh-7-pypi-publish-workflow
Mar 20, 2026
Merged

Implement PyPI release workflow#12
slusset merged 1 commit intomainfrom
feature/gh-7-pypi-publish-workflow

Conversation

@slusset
Copy link
Owner

@slusset slusset commented Mar 20, 2026

Summary

  • add a release workflow that validates tag/version alignment, builds both sdist and wheel artifacts, publishes via PyPI trusted publishing, and verifies installability
  • trigger release publishing from GitHub releases and version tags while skipping duplicate publishes for versions already on PyPI
  • add a PyPI badge and install/publish guidance to the README

Verification

  • uv run pytest tests/unit -v --tb=short
  • uv run ruff check src/ tests/
  • uv run ruff format --check src/ tests/
  • uv run mypy src/ehr_writeback/core/
  • uv build

Notes

  • src/ehr_writeback/pipelines/writeback_pipeline.py:10: error: Cannot find implementation or library stub for module named "dlt" [import-not-found]
    src/ehr_writeback/pipelines/writeback_pipeline.py:11: error: Cannot find implementation or library stub for module named "pyspark.sql" [import-not-found]
    src/ehr_writeback/pipelines/writeback_pipeline.py:16: error: Name "spark" is not defined [name-defined]
    src/ehr_writeback/pipelines/writeback_pipeline.py:17: error: Name "spark" is not defined [name-defined]
    src/ehr_writeback/pipelines/writeback_pipeline.py:26: error: Function is missing a return type annotation [no-untyped-def]
    src/ehr_writeback/pipelines/writeback_pipeline.py:28: error: Name "spark" is not defined [name-defined]
    src/ehr_writeback/pipelines/writeback_pipeline.py:40: error: Function is missing a return type annotation [no-untyped-def]
    src/ehr_writeback/infrastructure/delta_store.py:13: error: Cannot find implementation or library stub for module named "pyspark.sql" [import-not-found]
    src/ehr_writeback/infrastructure/delta_store.py:13: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
    src/ehr_writeback/infrastructure/idempotency.py:34: error: Returning Any from function declared to return "bool" [no-any-return]
    src/ehr_writeback/infrastructure/idempotency.py:53: error: Cannot find implementation or library stub for module named "delta.tables" [import-not-found]
    src/ehr_writeback/pipelines/reprocess_dead_letters.py:14: error: Name "dbutils" is not defined [name-defined]
    src/ehr_writeback/pipelines/reprocess_dead_letters.py:22: error: Name "dbutils" is not defined [name-defined]
    src/ehr_writeback/pipelines/reprocess_dead_letters.py:26: error: Name "dbutils" is not defined [name-defined]
    src/ehr_writeback/pipelines/reprocess_dead_letters.py:31: error: Name "spark" is not defined [name-defined]
    src/ehr_writeback/pipelines/reprocess_dead_letters.py:42: error: Function is missing a return type annotation [no-untyped-def]
    src/ehr_writeback/pipelines/reprocess_dead_letters.py:42: note: Use "-> None" if function does not return a value
    src/ehr_writeback/pipelines/reprocess_dead_letters.py:54: error: Call to untyped function "reprocess" in typed context [no-untyped-call]
    src/ehr_writeback/adapters/generic/smart_auth.py:44: error: Argument 2 has incompatible type "DHPrivateKey | Ed25519PrivateKey | Ed448PrivateKey | RSAPrivateKey | DSAPrivateKey | EllipticCurvePrivateKey | X25519PrivateKey | X448PrivateKey"; expected "RSAPrivateKey | EllipticCurvePrivateKey | Ed25519PrivateKey | Ed448PrivateKey | PyJWK | str | bytes" [arg-type]
    src/ehr_writeback/adapters/generic/fhir_r4_adapter.py:30: error: Missing type parameters for generic type "dict" [type-arg]
    src/ehr_writeback/adapters/generic/fhir_r4_adapter.py:31: error: Missing type parameters for generic type "dict" [type-arg]
    src/ehr_writeback/adapters/epic/auth.py:48: error: Argument 2 has incompatible type "DHPrivateKey | Ed25519PrivateKey | Ed448PrivateKey | RSAPrivateKey | DSAPrivateKey | EllipticCurvePrivateKey | X25519PrivateKey | X448PrivateKey"; expected "RSAPrivateKey | EllipticCurvePrivateKey | Ed25519PrivateKey | Ed448PrivateKey | PyJWK | str | bytes" [arg-type]
    src/ehr_writeback/adapters/epic/flowsheet_adapter.py:34: error: Missing type parameters for generic type "dict" [type-arg]
    src/ehr_writeback/adapters/epic/fhir_adapter.py:27: error: Missing type parameters for generic type "dict" [type-arg]
    src/ehr_writeback/adapters/epic/fhir_adapter.py:29: error: Missing type parameters for generic type "dict" [type-arg]
    src/ehr_writeback/adapters/cerner/fhir_adapter.py:33: error: Missing type parameters for generic type "dict" [type-arg]
    src/ehr_writeback/adapters/cerner/fhir_adapter.py:34: error: Missing type parameters for generic type "dict" [type-arg]
    Found 25 errors in 10 files (checked 24 source files) still reports pre-existing issues in Databricks and adapter modules outside this change scope

@slusset slusset merged commit c67cf27 into main Mar 20, 2026
5 checks passed
@slusset slusset deleted the feature/gh-7-pypi-publish-workflow branch March 20, 2026 20:19
@slusset slusset mentioned this pull request Mar 21, 2026
3 tasks
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.

1 participant