feat(cli): add competitions data push command#1085
Open
bovard wants to merge 1 commit into
Open
Conversation
547f5cb to
a96e895
Compare
SohierDane
requested changes
Jun 30, 2026
SohierDane
left a comment
There was a problem hiding this comment.
I think we need a safe upload default but otherwise LGTM.
b2cd08a to
998257e
Compare
abc6be4 to
c813bd1
Compare
stevemessick
reviewed
Jul 1, 2026
c813bd1 to
b89207c
Compare
Wrap the new create_competition_data RPC behind `kaggle competitions data update <competition> -p <path> -m "<notes>" [--rerun] [--include-hidden]`. The verb is `update` per AIP-130 (standard CRUD verb for modifying an existing resource); the RPC itself creates a new databundle version, and each call fully replaces the prior version's file set. - `-p` accepts either a directory (walked recursively — sub-directory paths are preserved in each file's name field) or a single archive file (e.g. a pre-packed .zip / .tar), uploaded as-is. - Hidden files and directories (names starting with `.`) are skipped by default; `--include-hidden` opts them in. - `--rerun` targets the private RERUN databundle (host admin only). Wraps blob uploads through the existing ResumableUploadContext + `_upload_file` plumbing (ApiBlobType.INBOX for now — see TODO; may need a dedicated COMPETITION_DATA blob type once we test against the backend).
b89207c to
7148252
Compare
stevemessick
approved these changes
Jul 1, 2026
stevemessick
left a comment
Contributor
There was a problem hiding this comment.
LGTM pending Erdal's confirmation.
| with ResumableUploadContext() as upload_context: | ||
| for rel_name, full_path in uploads: | ||
| upload_file = self._upload_file( | ||
| rel_name, full_path, ApiBlobType.INBOX, upload_context, quiet, resources=None |
Contributor
There was a problem hiding this comment.
@erdalsivri Just to confirm, reusing INBOX here won't cause any problems?
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.
Wrap kagglesdk 0.1.32's new create_competition_data RPC behind
kaggle competitions data push <competition> -p folder -m "notes" [--rerun] [-r {skip,zip,tar}]. Walks the folder, uploads each file via the existing ResumableUploadContext + blob plumbing (using ApiBlobType.INBOX — see TODO; may need adjustment based on backend feedback), then sends a single CreateCompetitionData request bundling the resulting tokens. Each push replaces the prior version's file set in full.Bumps the kagglesdk floor to 0.1.32.