Skip to content

(magnolify-beam) Support doc annotations on RowType and schema fields - #1402

Open
regadas wants to merge 1 commit into
spotify:mainfrom
regadas:beam-doc
Open

regadas wants to merge 1 commit into
spotify:mainfrom
regadas:beam-doc

Conversation

@regadas

@regadas regadas commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add doc annotation support to magnolify-beam: populate Schema.Field#withDescription on Beam schema fields (including nested records, Option, collections, and Map values) and expose the top-level record description via RowType#description: Option[String] (with MiMa filters on the sealed RowType and RowField.Record traits and documentation in docs/beam.md).
  • Deduplicate doc annotation extraction into magnolify.shared.doc.{getDoc, getDocAs} (private[magnolify]) across beam, avro, parquet, and tensorflow, keeping magnolify.tensorflow.doc isolated from magnolify.shared.doc while guarding against null toString results.
  • Add unit tests in RowTypeSuite (post-deserialization cold buildSchema verification, CaseMapper, custom doc subclasses, doc(null), and duplicate doc fail-fast checks), DocSpec (Scala 2.12, 2.13, and Scala 3), and ExampleTypeSuite (coexistence of magnolify.shared.doc and magnolify.tensorflow.doc).

@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.82%. Comparing base (ea79cd6) to head (c986d9e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1402      +/-   ##
==========================================
- Coverage   95.82%   95.82%   -0.01%     
==========================================
  Files          60       60              
  Lines        2205     2203       -2     
  Branches      181      181              
==========================================
- Hits         2113     2111       -2     
  Misses         92       92              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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