Skip to content

[CDF-27549] Add AppsAPI client for the App Hosting API#2986

Open
Magssch wants to merge 21 commits into
mainfrom
cdf-27549-custom-apps-part2
Open

[CDF-27549] Add AppsAPI client for the App Hosting API#2986
Magssch wants to merge 21 commits into
mainfrom
cdf-27549-custom-apps-part2

Conversation

@Magssch
Copy link
Copy Markdown
Contributor

@Magssch Magssch commented May 6, 2026

Description

Implements the AppsAPI HTTP client for the CDF App Hosting API, covering version upload
(multipart), lifecycle transitions, alias management, listing, retrieval, and deletion.
Wires it into ToolAPI so part3 can use it from the IO layer.

Bump

  • Patch
  • Skip

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@Magssch Magssch changed the title Add AppsAPI client for the App Hosting API [CDF-27549] Add AppsAPI client for the App Hosting API May 6, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
42702 36662 86% 80% 🟢

New Files

File Coverage Status
cognite_toolkit/_cdf_tk/client/api/apps.py 89% 🟢
TOTAL 89% 🟢

Modified Files

File Coverage Status
cognite_toolkit/_cdf_tk/client/_toolkit_client.py 100% 🟢
TOTAL 100% 🟢

updated for commit: a3e89c3 by action🐍

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

❌ Patch coverage is 89.15663% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.95%. Comparing base (bd19858) to head (1468f62).

Files with missing lines Patch % Lines
cognite_toolkit/_cdf_tk/client/api/apps.py 87.87% 8 Missing ⚠️
...nite_toolkit/_cdf_tk/client/http_client/_client.py 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2986      +/-   ##
==========================================
+ Coverage   85.93%   85.95%   +0.01%     
==========================================
  Files         465      466       +1     
  Lines       42698    42780      +82     
==========================================
+ Hits        36692    36770      +78     
- Misses       6006     6010       +4     
Files with missing lines Coverage Δ
cognite_toolkit/_cdf_tk/client/_toolkit_client.py 100.00% <100.00%> (ø)
...nite_toolkit/_cdf_tk/client/http_client/_client.py 87.96% <93.33%> (+1.82%) ⬆️
cognite_toolkit/_cdf_tk/client/api/apps.py 87.87% <87.87%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Magssch
Copy link
Copy Markdown
Contributor Author

Magssch commented May 6, 2026

/gemini review

@Magssch Magssch marked this pull request as ready for review May 6, 2026 11:56
@Magssch Magssch requested review from a team as code owners May 6, 2026 11:56
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the AppsAPI to the toolkit client, enabling management of custom apps on the CDF App Hosting API. Feedback focuses on adhering to the repository's docstring style guide regarding Args and Returns sections, improving type safety for dictionary parameters, refining error handling to avoid swallowing 400 status codes, and optimizing sequential retrieval operations for better performance.

Comment thread cognite_toolkit/_cdf_tk/client/api/apps.py
Comment thread cognite_toolkit/_cdf_tk/client/api/apps.py
Comment thread cognite_toolkit/_cdf_tk/client/api/apps.py Outdated
Comment thread cognite_toolkit/_cdf_tk/client/api/apps.py Outdated
@ronpal
Copy link
Copy Markdown
Contributor

ronpal commented May 6, 2026

@Magssch there's a lot of multipart upload goodies in FileMetadataAPI that I think we should leverage here. Amongst other things, we found that the different cloud providers have different quirks. Suggest you look at that implementation instead of creating your own.

Base automatically changed from cdf-27549-custom-apps-part1 to main May 7, 2026 07:49
@github-actions
Copy link
Copy Markdown

☂️ Code Coverage

current status: ✅

Overall Coverage

Statements Covered Coverage Threshold Status
42780 36770 86% 80% 🟢

New Files

File Coverage Status
cognite_toolkit/_cdf_tk/client/api/apps.py 88% 🟢
TOTAL 88% 🟢

Modified Files

File Coverage Status
cognite_toolkit/_cdf_tk/client/_toolkit_client.py 100% 🟢
cognite_toolkit/_cdf_tk/client/http_client/_client.py 88% 🟢
TOTAL 94% 🟢

updated for commit: 1468f62 by action🐍

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.

2 participants