Skip to content

Remove extractor specific config from the base config#492

Merged
Hmnt39 merged 3 commits intomasterfrom
hemant/config_changes
Dec 1, 2025
Merged

Remove extractor specific config from the base config#492
Hmnt39 merged 3 commits intomasterfrom
hemant/config_changes

Conversation

@Hmnt39
Copy link
Copy Markdown
Contributor

@Hmnt39 Hmnt39 commented Nov 28, 2025

This PR refactors the configuration model to remove extractor specific config from the base configuration.
Mainly it introduces a new WithDataSetId base class that can be inherited by any configuration model needing to reference CDF datasets. This class includes a data_set field and a get_data_set() method to retrieve DataSet objects from CDF, making dataset configuration reusable across different parts of the codebase.

Also, it removes the retry_startup, upload_queue_size from the base config.

@Hmnt39 Hmnt39 requested a review from a team as a code owner November 28, 2025 11:49
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @Hmnt39, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the configuration model by extracting common dataset-related configuration into a dedicated WithDataSetId base class. This change aims to improve reusability and clarity by centralizing dataset reference logic. Additionally, it streamlines the ExtractorConfig by removing properties like retry_startup and upload_queue_size, which are now handled elsewhere or are no longer part of the base configuration, thereby making the base configuration more focused.

Highlights

  • Reusable DataSet Configuration: Introduced a new WithDataSetId base class to centralize and standardize the handling of CDF dataset references across configuration models, promoting reusability.
  • ExtractorConfig Streamlining: Removed retry_startup, upload_queue_size, and dataset-related fields/methods directly from ExtractorConfig to reduce its scope and improve modularity.
  • Relocated Retry Logic: Moved the retry_startup configuration from the base config to a class attribute within the Extractor class, making it an extractor-specific setting rather than a global configuration.
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 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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@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 effectively refactors the configuration model by extracting data set handling into a reusable WithDataSetId class and removing extractor-specific settings from the base ExtractorConfig. The changes improve modularity and clarify the configuration structure. However, I've found a critical issue where an obsolete test case was not removed, which will cause the build to fail. Please see the detailed comment.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 28, 2025

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 80.89%. Comparing base (b5a160f) to head (10f2715).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
cognite/extractorutils/unstable/core/runtime.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #492   +/-   ##
=======================================
  Coverage   80.88%   80.89%           
=======================================
  Files          43       43           
  Lines        4201     4197    -4     
=======================================
- Hits         3398     3395    -3     
+ Misses        803      802    -1     
Files with missing lines Coverage Δ
...te/extractorutils/unstable/configuration/models.py 84.28% <100.00%> (-0.18%) ⬇️
cognite/extractorutils/unstable/core/base.py 79.06% <100.00%> (+0.09%) ⬆️
cognite/extractorutils/unstable/core/runtime.py 69.78% <0.00%> (+0.29%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@einarmo einarmo left a comment

Choose a reason for hiding this comment

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

🦄

@Hmnt39 Hmnt39 merged commit a729400 into master Dec 1, 2025
6 checks passed
@Hmnt39 Hmnt39 deleted the hemant/config_changes branch December 1, 2025 15:40
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