Skip to content

[CDF-27102] 📖 Variable parsing#2511

Open
doctrino wants to merge 8 commits intomainfrom
variable-parsing
Open

[CDF-27102] 📖 Variable parsing#2511
doctrino wants to merge 8 commits intomainfrom
variable-parsing

Conversation

@doctrino
Copy link
Collaborator

Description

Build v2. Variable parsing

Bump

  • Patch
  • Skip

@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 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

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.

@github-actions
Copy link

github-actions bot commented Feb 13, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
33940 29258 86% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
cognite_toolkit/_cdf_tk/commands/build_v2/_module_source_parser.py 94% 🟢
cognite_toolkit/_cdf_tk/commands/build_v2/build_v2.py 92% 🟢
cognite_toolkit/_cdf_tk/commands/build_v2/data_classes/init.py 100% 🟢
cognite_toolkit/_cdf_tk/commands/build_v2/data_classes/_build.py 98% 🟢
cognite_toolkit/_cdf_tk/commands/build_v2/data_classes/_module.py 97% 🟢
TOTAL 96% 🟢

updated for commit: d18fdd0 by action🐍

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 96.77419% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.20%. Comparing base (cf608bd) to head (d18fdd0).

Files with missing lines Patch % Lines
..._cdf_tk/commands/build_v2/_module_source_parser.py 97.82% 1 Missing ⚠️
.../_cdf_tk/commands/build_v2/data_classes/_module.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2511      +/-   ##
==========================================
+ Coverage   86.18%   86.20%   +0.01%     
==========================================
  Files         406      406              
  Lines       33893    33940      +47     
==========================================
+ Hits        29212    29258      +46     
- Misses       4681     4682       +1     
Files with missing lines Coverage Δ
...nite_toolkit/_cdf_tk/commands/build_v2/build_v2.py 92.42% <100.00%> (ø)
..._cdf_tk/commands/build_v2/data_classes/__init__.py 100.00% <100.00%> (ø)
...t/_cdf_tk/commands/build_v2/data_classes/_build.py 98.27% <100.00%> (ø)
..._cdf_tk/commands/build_v2/_module_source_parser.py 94.05% <97.82%> (+3.89%) ⬆️
.../_cdf_tk/commands/build_v2/data_classes/_module.py 96.96% <87.50%> (-3.04%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@doctrino doctrino marked this pull request as ready for review February 13, 2026 12:23
@doctrino doctrino requested review from a team as code owners February 13, 2026 12:23
@doctrino
Copy link
Collaborator Author

/gemini review

@doctrino doctrino enabled auto-merge (squash) February 13, 2026 12:25
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

This pull request introduces variable parsing for the v2 build process, which is a significant feature enhancement. The core logic resides in _module_source_parser.py, where a recursive dictionary traversal is implemented to parse variables and associate them with their respective modules. While the overall approach is sound and includes new tests, I've identified a few critical issues that need to be addressed. These include an unhandled exception that could crash the application, a bug causing certain variable types to be ignored, and a type-hint mismatch that could lead to runtime errors. My review includes specific suggestions to resolve these problems.

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.

1 participant