Repository navigation
Consolidate the five new_* cookiecutter functions (WP6) - #23
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Original prompt from thomas.boyer.chammard
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…(WP6) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
7f4c115 to
06740c9
Compare
8696b91 to
3f7ddca
Compare
Change Description
util/cookiecutter_wrapper.py: one private_new_from_template(...)doing settings-override resolution, thecookiecutter(...)call, a uniformtry/except, andregister_with_cmake; the five publicnew_*functions become thin wrappers — names and signatures unchanged.--overwritenow honored bynew --component(only that call omittedoverwrite_if_exists); misleading "Permission denied" message onFileNotFoundErrorcorrected; uniform exception coverage across all five kinds.is_valid_name:isinstancecheck hoisted above the per-character loop; name, module path, and"valid"return contract unchanged (shipped hooks depend on it).Rationale
WP6 of 9, stacked on #21. Per-kind error strings preserved byte-for-byte except the misleading text above; net −80 LOC of duplication.
Testing/Review Recommendations
New per-kind instantiation tests plus an
--overwriteregression test; suite 172 passed; black clean. Minor behavior notes: component'sOSErrormessage now goes to stderr (text unchanged);--overwritebehavior change is the bug fix.Future Work
WP7–WP9 of the series.
Pushed by Devin AI
Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/bba39c1277854bf8a1fd63a094f20e24
Requested by: @thomas-bc-autobot