feat(dataframe): as_blob(fmt) — Tabelle als Blob-Asset (RFC 0004, Option C)#75
Merged
Conversation
…ion C) DataFrame.as_blob(fmt="parquet"|"csv"|"arrow"|"feather") rendert die lebende Tabelle in einem gewählten Format zu einem bytes-Content-Blob. Damit erbt die Tabelle indirekt alle Blob-Faehigkeiten (Hash/verify/size/write/open/Sidecar) ueber Komposition statt Vererbung — strikt additiv, ohne to_dict-Bruch. - _BLOB_FORMATS-Registry: fmt -> (builder, filetype, mime_type) - Name/Description von der Tabelle geerbt; mime_type gesetzt; update_checksum ausgefuehrt, sodass blob.verify() sofort funktioniert - Unbekanntes fmt -> ValueError - RFC 0004 Status: Option B + C implementiert tests/test_sclass_dataframe_as_blob.py: parquet/csv/arrow/feather, checksum/verify, parquet-Roundtrip, name-override, unsupported-format. dataframe.py 368/368 100%.
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| UnusedCode | 1 medium 1 minor |
| BestPractice | 2 medium 1 minor |
| ErrorProne | 3 high |
| Security | 1 medium 25 high |
| CodeStyle | 51 minor |
| Complexity | 15 medium |
🟢 Metrics 438 complexity · 5 duplication
Metric Results Complexity 438 Duplication 5
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was
DataFrame.as_blob(fmt="parquet"|"csv"|"arrow"|"feather") -> Blob— die lebendeTabelle wird in einem gewählten Format zu einem
bytes-Content-Blobgerendert. Komposition statt Vererbung (RFC 0004, Option C): eine Tabelle
ist kein einzelner Blob, kann aber on-demand als binäres Asset ausgegeben werden.
Mehrwert
Über den Blob erbt die Tabelle indirekt alle Blob-Fähigkeiten in einem
gewählten Format:
sha256/size/verify,write(uri)/open(), Sidecar._BLOB_FORMATS-Registry:fmt -> (builder, filetype, mime_type)mime_typegesetzt;update_checksumausgeführt →
blob.verify()funktioniert sofortfmt→ValueErrorTests / CI
tests/test_sclass_dataframe_as_blob.py(7): default-parquet, checksum/verify,parquet-Round-Trip, csv, arrow+feather, name-override, unsupported-format.
Kanonische CI: 549 passed, 7 skipped,
dataframe.py368/368 100 %,TOTAL 100 %,
mkdocs build --strictgrün.Kompatibilität
Strikt additiv: keine Änderung an
to_dict/from_dict, keine Basisklasse, keinebestehenden Artefakte betroffen. Schließt RFC 0004 (Option B + C umgesetzt).