Skip to content

Full kagglesdk regen and release 0.1.33#59

Merged
bovard merged 1 commit into
mainfrom
fix-imports-0.1.33
Jul 1, 2026
Merged

Full kagglesdk regen and release 0.1.33#59
bovard merged 1 commit into
mainfrom
fix-imports-0.1.33

Conversation

@bovard

@bovard bovard commented Jul 1, 2026

Copy link
Copy Markdown
Member

Fixes broken import chain in 0.1.32 where several files (host_service, episode_service, competition_api_service) referenced modules that were never shipped: competition_types, simulations, competition_email_invite, evaluation_algorithm, submission, legacy_competition_host_service, kernels_service. This crashed at import time in any consumer that touched those services.

Root cause: prior scoped commits copied only the touched service files without their transitive import closure. This commit does a full sync of the kapigen output across all packages.

Merge strategy: kapigen produces two flavors depending on flags (internal, tuned for frontend / ExportToFrontend, and publicapi, tuned for the kagglesdk publish flow / isKaggleSdk). Neither is a strict superset. The publicapi flavor has correct kagglesdk-tuned support code (KaggleClient.init, kaggle_http_client), while internal has broader class coverage. We take publicapi as the base and layer internal-only classes on top, using a class-level union for files where both flavors have overlapping but non-identical class sets.

Verified: all 320 kagglesdk modules import cleanly and KaggleClient instantiates with all 21 subclients accessible.

@bovard bovard requested a review from stevemessick July 1, 2026 16:36
@stevemessick

Copy link
Copy Markdown
Contributor

@erdalsivri @rosbo Could I get a second opinion on whether all these new files should be included?

This fixes #Kaggle/kaggle-cli#1087

@bovard

This comment was marked as off-topic.

@erdalsivri erdalsivri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is something wrong. There are a lot of internal methods that are exposed. @bovard did you perhaps miss a parameter to kapigen or passed a incorrect one (V2 maybe?) @kaggle-agent can you investigate?

Comment thread kagglesdk/abuse/services/abuse_service.py Outdated
Comment thread kagglesdk/active_events/services/active_event_service.py Outdated
@stevemessick

Copy link
Copy Markdown
Contributor

The diff is big because past releases were also incremental, not full syncs.

I don't think that's correct. I did a release on 6/11 and I don't do incremental changes. I generate the whole thing in a new dir, then copy that to my checked-out kagglesdk repo. My last change only touched a couple files.

@bovard

bovard commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

Yeah I was missing a flag, updating now

Addresses CR feedback that prior 0.1.33 attempts exposed internal
services (abuse_service, active_event_service, etc.) that lack
/api/v1 bindings. The correct filter is kapigen's PublicApiExportFlowAnalysis,
reached by running kapigen with only --public-api-output-path.

Prior scoped commits (7b4d502 host_service/episode_service, and their
descendants in 0.1.32) shipped internal service files whose imports
were also broken. Those files are removed here since (a) they aren't
publicly exposed API surface and (b) all their user-facing endpoints
(create_competition, update_competition_page, etc.) are already
available on the correctly-generated competition_api_service.

Verified: KaggleClient instantiates all 21 subclients, all 158 modules
import cleanly (0 failures).
@bovard bovard force-pushed the fix-imports-0.1.33 branch from 2075afb to fbe120a Compare July 1, 2026 18:30
@bovard bovard requested a review from erdalsivri July 1, 2026 18:31
return username, api_key
except KeyError:
return None
api_key_data = json.loads(kaggle_json)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect. Maybe try pulling? I'm not sure what's going on, but this code has been dropped in previous releases, too.

@erdalsivri erdalsivri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

We need to figure out consistent formatting for kagglesdk. We keep changing indent size, probably due to different configs in kaggleazure and kagglesdk.

@bovard bovard merged commit ac758fa into main Jul 1, 2026
7 checks passed
@bovard bovard deleted the fix-imports-0.1.33 branch July 1, 2026 18:44
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.

3 participants