Manual workflow to push local provider capture files to the shared Drive folder. #2
No reviewers
Labels
No labels
Compat/Breaking
Compat/Deprecation
Kind
Bug
Kind
Chore
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Investigation
Kind
Question
Kind
Security
Kind
Testing
Meta/Good First Issue
Meta/Help Wanted
Meta/Stale
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Status/Needs Triage
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
XeplosionGames/minecraft-provider-analysis!2
Loading…
Reference in a new issue
No description provided.
Delete branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What changed and why
Adds a workflow to push local provider capture files (
providers/*.json,*.wip.json) out to the Drive folder thattools/capture-form/index.htmlreads from and writes to. Previously, getting newly-bootstrapped skeletons
into that folder required uploading them by hand.
src/capture_tools/push_drive.py(newcapture-push-driveCLI) — foreach local provider file, uploads it if no same-named file exists in
Drive yet, and skips it if one does, unless
--overwriteis passed.src/utils/drive_api.py— addedlist_folder_files()andupdate_file_content(), using the fulldrivescope rather thandrive.file, since the service account isn't the one that created thesefiles (a researcher's own OAuth session in the capture-form is).
.forgejo/workflows/push-drive.yml— manualworkflow_dispatchjob,mirroring
bootstrap.yml's pattern, withoverwriteanddry_runboolean inputs. Reuses the existing
GCP_SA_KEYsecret.tests/test_push_drive.py— 8 tests covering create/skip/overwrite/dry-runbehavior and partial-failure handling, with the Drive API mocked out.
pyproject.toml/src/capture_tools/__init__.py— register the newcapture-push-driveconsole script.README.md/tools/capture-form/README.md— documented the newworkflow and pointed the old "upload by hand" note at it instead.
The skip-by-default behavior is deliberate: a file already in Drive may
hold in-progress edits or a promotion made directly in the browser tool
that haven't been pulled back into git yet, and blindly overwriting it
would destroy that work.
Related issues
Closes #
How to test
GCP_SA_KEY) is shared as Editor on thetarget Drive folder — this is a separate share from its read access to
the tracking sheet.
pytest tests/test_push_drive.py— all 8 should pass without anynetwork access (the Drive API is mocked).
dry_runchecked and confirm the log lists
CREATE/SKIPdecisions withouterror.
files appear in the Drive folder, and pre-existing ones are untouched.
Checklist
Release notes
Add a manual workflow to push local provider capture files to the shared Drive folder.