Skip to content

Conversation

@stevemessick
Copy link
Contributor

Reminders:

  • kagglesdk is generated by kapigen -- no review needed
  • The kaggle directory is a copy of src/kaggle -- no need to review both

@stevemessick stevemessick requested a review from jplotts December 13, 2024 22:45
Copy link
Contributor

@jplotts jplotts left a comment

Choose a reason for hiding this comment

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

I'll approve this, but fair warning that I was really only able to skim it. The PR is titled Remove swagger but there are other changes here that should probably have been split into their own PRs.


try:
self.api_client = ApiClient(configuration)
self.api_client = None # ApiClient(configuration)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this intentional? If so, when is api_client filled in (or should it be removed)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed, thanks.

data['title'] = model.title
data['subtitle'] = model.subtitle
data['isPrivate'] = model.isPrivate # TODO Add a test to ensure default is True
data[
Copy link
Contributor

Choose a reason for hiding this comment

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

no action required, but line breaking due to a comment is kind of ugly. Maybe something to fix with the autoformatter some day (only if it's easy).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reworded to keep on one line.

remote_size = int(response.headers['Content-Length'])
local_size = os.path.getsize(outfile)
if local_size < remote_size:
if local_size < remote_size or True: # DEBUG
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like this should be reverted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't really have a strong opinion, but this isn't something we meant to expose right now. I don't think it's harmful, but if there's an easy way to exclude it, that's probably better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't understand why this is included. Previously, kapigen ignored inbox and blobs. Both of those are required in kagglesdk. After I stopped ignoring them, this showed up, but it doesn't seem to match either.
b/384565864


return self._client.call("kernels.KernelsApiService", "ApiGetKernelSessionStatus", request, ApiGetKernelSessionStatusResponse)

def download_kernel_output(self, request: ApiDownloadKernelOutputRequest = None) -> HttpRedirect:
Copy link
Contributor

Choose a reason for hiding this comment

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

similar comment as above; if we don't need this in Kaggle API, maybe it would be nice to exclude it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is required by kaggle kernels output.


function generate-from-swagger {
java -jar ./tools/swagger-codegen-cli.jar generate -i $SWAGGER_YAML -c $SWAGGER_CONFIG -l python || true
# java -jar ./tools/swagger-codegen-cli.jar generate -i $SWAGGER_YAML -c $SWAGGER_CONFIG -l python || true
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be nice to clean this up, both removing commented out code and rename generate-from-swagger if that's not what happening.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, but I have additional work to do here.

kaggle/*.py-e \
kaggle/api/*.py-e \
kaggle/*.py.bak
# requirements.txt \
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we not need requirements anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was actually removing the file. I want to keep it. No need for the comment, though.

@stevemessick stevemessick merged commit c214eb1 into main Dec 17, 2024
4 checks passed
@stevemessick stevemessick deleted the delete-swagger branch December 17, 2024 18:42
@klao54
Copy link

klao54 commented Nov 22, 2025

Reminders:

  • kagglesdk is generated by kapigen -- no review needed
  • The kaggle directory is a copy of src/kaggle -- no need to review both

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