[CDF-26860] 🐛Fix Neat to Toolkit export.#1593
Conversation
Using Gemini Code AssistThe 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
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 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. |
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1593 +/- ##
==========================================
- Coverage 91.85% 91.82% -0.03%
==========================================
Files 126 130 +4
Lines 7468 7564 +96
==========================================
+ Hits 6860 6946 +86
- Misses 608 618 +10
🚀 New features to boost your workflow:
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces several fixes to the Neat to Toolkit export functionality, such as updating the resource directory name, skipping components in system spaces, and excluding null values from the output. The changes are well-implemented and include corresponding tests. My review includes one high-severity comment regarding the skipping of system-space components. Silently skipping the main data model file can lead to an invalid export, and I've suggested a more explicit failure mechanism to improve user experience.
|
|
||
| """ | ||
|
|
||
| if file_path.is_dir(): |
There was a problem hiding this comment.
The is_dir assumes the directory is already existing, which is not so user friendly. I think this improves useability.
Description
I found a few issues with the Neat to Toolkit export
data_modelstodata_modeling.Request failed with status code 400: Space cannot start with the reserved prefix: 'cdf_'. Invalid value: 'cdf_apps_shared'.Nonevalues, which leads Toolkit to redeploy unchanged views, containers. Skipped that as well.Bump
Changelog
Fixed
neat.physical_data_model.write.yaml(..., format="toolkit"), Neat no longer includes resources in system spaces, writes to a resoruce folder nameddata_modeling, and skipsnullvalues.Improved
neat.physical_data_model.write.yaml("my_module" format="toolkit"), then the directory does not need to exist before calling the function.