feat: convert office uploads to native Google types (xlsx -> Google Sheet) - #3
Merged
Merged
Conversation
…heet) - _upload_converting(): create/update a Drive file from bytes or path, optionally converting to the Google editor format (xlsx->Sheet, docx->Doc, pptx->Slides). - GDStore.upload(key, value, *, convert=True) + GDStore(convert_office=True) flag. - xlsx_to_google_sheet(folder_url, title, xlsx, *, share_with, anyone_reader) -> URL. - Unit tests with an injected fake drive (no PyDrive2 / no network needed). Claude-Session: https://claude.ai/code/session_01LUpTPcgooABkgUSNXD2Xjy
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.
Adds opt-in conversion of office uploads to native Google editor types.
GOOGLE_MIME: office extension -> Google-native editor mimetype map (.xlsx/.xls/.csv -> Sheet, .docx/.doc -> Doc, .pptx/.ppt -> Slides)_upload_converting(...): create/update a Drive file from bytes or a path, optionally convertingxlsx_to_google_sheet(...): upload an .xlsx as a native Google Sheet, returns the URLtests/test_convert.py: 4 tests, all passingProvenance
This work was written on 2026-06-19 and had been sitting unpushed on a local
machine only. Rebased onto current
master; the single conflict was an add/addagainst
drive_from_service_account(both additions kept, they are independent).Verification
pytest tests/-> 4 passedpytest --doctest-modules pydrivedol/-> same 2 pre-existingtest_service_account.pyfailures as clean
master, no new failures introduced