Skip to content

Conversation

@ronpal
Copy link
Contributor

@ronpal ronpal commented Sep 8, 2025

Description

Adding version to the QueryKnowledgeGraphAgentToolConfiguration to be on par with the API. Chose not to go with enum since string is more future-proof.

Screenshot 2025-09-08 at 12 13 05

(source: https://pr-2871.specs.preview.cogniteapp.com/20230101-internal.json.html#tag/Workflow-versions/operation/CreateOrUpdateWorkflowVersion)

Please describe the change you have made.

Checklist:

  • [] Tests added/updated.
  • Documentation updated. Documentation is generated from docstrings - these must be updated according to your change.
    If a new method has been added it should be referenced in cognite.rst in order to generate docs based on its docstring.
  • The PR title follows the Conventional Commit spec.

@ronpal ronpal requested review from a team as code owners September 8, 2025 10:16
@gemini-code-assist
Copy link
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize 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 counter productive. 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.

@codecov
Copy link

codecov bot commented Sep 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.95%. Comparing base (489c703) to head (fb08d5a).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2324      +/-   ##
==========================================
- Coverage   90.96%   90.95%   -0.01%     
==========================================
  Files         192      192              
  Lines       26138    26138              
==========================================
- Hits        23777    23775       -2     
- Misses       2361     2363       +2     
Files with missing lines Coverage Δ
cognite/client/data_classes/agents/agent_tools.py 98.40% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@andeplane andeplane left a comment

Choose a reason for hiding this comment

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

Have yet not tested it, but see comment about string literal

andeplane
andeplane previously approved these changes Sep 8, 2025
Copy link
Contributor

@andeplane andeplane left a comment

Choose a reason for hiding this comment

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

LGTM, nice

@doctrino doctrino self-requested a review September 8, 2025 11:10
doctrino
doctrino previously approved these changes Sep 8, 2025
@doctrino doctrino added the waiting-for-risk-review Waiting for a member of the risk review team to take an action label Sep 8, 2025
@haakonvt haakonvt added the risk-review-ongoing Risk review is in progress label Sep 9, 2025
@haakonvt
Copy link
Contributor

haakonvt commented Sep 9, 2025

Risk review: One outstanding comment from Erlend to be addressed, then ready for unicorn 😄

@haakonvt haakonvt added waiting-for-team Waiting for the submitter or reviewer of the PR to take an action and removed waiting-for-risk-review Waiting for a member of the risk review team to take an action labels Sep 9, 2025
@haakonvt haakonvt self-assigned this Sep 9, 2025
@haakonvt
Copy link
Contributor

haakonvt commented Oct 3, 2025

@ronpal sorry for not getting back to you sooner, please ping me on slack for follow-up on risk review if it takes more than 1 hour 😜

Re. @erlendvollset comment above:

Shouldn't have default values for read classes, it just makes their instantiation more error prone.

When I take a look at the class:
class QueryKnowledgeGraphAgentToolConfiguration(WriteableCogniteResource):
...this looks like a write-version-class, no?

Also, from your screenshot, it seems like data_models is required, but instance_spaces and version are not.

If all of this is true, I think the correct solution is to add back default arg = None for the latter and require only the first.

@haakonvt haakonvt added waiting-for-team Waiting for the submitter or reviewer of the PR to take an action and removed waiting-for-risk-review Waiting for a member of the risk review team to take an action labels Oct 3, 2025
@ks93 ks93 requested review from doctrino and removed request for andeplane and doctrino October 16, 2025 01:31
@ks93 ks93 added waiting-for-risk-review Waiting for a member of the risk review team to take an action and removed risk-review-ongoing Risk review is in progress waiting-for-team Waiting for the submitter or reviewer of the PR to take an action labels Oct 16, 2025
@haakonvt
Copy link
Contributor

/gemini review

@haakonvt haakonvt added the risk-review-ongoing Risk review is in progress label Oct 17, 2025
@haakonvt
Copy link
Contributor

@ks93 do not remove risk-review ongoing

Copy link
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

The pull request adds a version field to the QueryKnowledgeGraphAgentToolConfiguration data class. This allows specifying the version of the query generation strategy to use. The changes include updating the data class definition, the _load and dump methods, and adding the version parameter to the test cases. The addition of the version parameter enhances the flexibility of the QueryKnowledgeGraphAgentToolConfiguration by allowing users to specify which version of the query generation strategy they want to use.

@haakonvt
Copy link
Contributor

Risk review:

My comment from 2 weeks ago, specifically this part:

Also, from your screenshot, it seems like data_models is required, but instance_spaces and version are not.

If all of this is true, I think the correct solution is to add back default arg = None for the latter and require only the first.

needs addressing @ronpal 😄

@haakonvt haakonvt added waiting-for-team Waiting for the submitter or reviewer of the PR to take an action and removed waiting-for-risk-review Waiting for a member of the risk review team to take an action labels Oct 17, 2025
@ks93
Copy link
Contributor

ks93 commented Oct 17, 2025

@ks93 do not remove risk-review ongoing

Oops, sorry

@ronpal ronpal added waiting-for-risk-review Waiting for a member of the risk review team to take an action and removed waiting-for-team Waiting for the submitter or reviewer of the PR to take an action labels Oct 20, 2025
Copy link
Contributor

@haakonvt haakonvt left a comment

Choose a reason for hiding this comment

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

🦄

@ronpal ronpal added this pull request to the merge queue Oct 21, 2025
@haakonvt haakonvt added waiting-for-team Waiting for the submitter or reviewer of the PR to take an action and removed waiting-for-risk-review Waiting for a member of the risk review team to take an action labels Oct 21, 2025
Merged via the queue into master with commit e7095ba Oct 21, 2025
18 checks passed
@ronpal ronpal deleted the aaa-3112 branch October 21, 2025 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk-review-ongoing Risk review is in progress waiting-for-team Waiting for the submitter or reviewer of the PR to take an action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants