Repository navigation
Reorganize modules into cli/build/tools packages with full import compatibility (WP8) - #26
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:
|
… shims (WP8) Move modules to the approved target tree: - fprime.cli: entry (util/cli), commands, help_text, build_helper, versioning, fbuild (fbuild/cli), fpp (fpp/cli) - fprime.build: builder, cmake, settings, types; fprime.build.targets: __init__ (target_definitions), target, check, gcovr, enumerator - fprime.tools: clang_format (code_formatter), cookiecutter (cookiecutter_wrapper); fprime.tools.fpp: common, impl, merge, visualize Every old module path is kept as a real file whose body aliases the new module via sys.modules[__name__] = <new module>, so old and new paths are the same module object (imports, from-imports, and monkeypatching through old paths all keep working). fprime.util keeps __main__.py and file_util.py as real modules; fprime.fpp keeps utils/fpp_to_json and fprime.common is unchanged. Internal src and test imports are rewritten to the new paths, except the import-compat test which deliberately keeps importing the old paths and now also asserts old-path/new-path module identity for every mapping row. Entry points fprime.util.__main__:main and fprime.util.versioning:main are unchanged; shipped cookiecutter hooks continue importing fprime.util.cookiecutter_wrapper. No logic changes. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
4a7abbb to
6375fe7
Compare
9fb8405 to
e778e44
Compare
Change Description
Moves modules into an understandable layout —
fprime.cli(argument parsing/dispatch),fprime.build(cmake/builder/targets/gcovr),fprime.tools(cookiecutter, formatter, versioning) — while keeping every old import path working. Old paths aresys.modulesaliases of the new modules (same module object, so monkeypatching through either path works):Entry points (
fprime.util.__main__:main,fprime.util.versioning:main), shipped cookiecutter hook imports, andnasa/fprime'sfrom fprime.fbuild.settings import IniSettingsall unchanged. Internal tests import the new paths;test_import_compat.pykeeps the old paths and gains one module-identity assertion per mapping row.Rationale
WP8 of 9, stacked on #24. Zero logic changes — file moves plus alias shims only.
Testing/Review Recommendations
243 passed + 9 skipped (base: 221 + 9; +22 identity assertions); black clean; wheel built and verified in a clean venv (
fprime-util --help,fprime-version-check). Note: the plan's target tree listed atemplates/alias with no mapping row; not created.Future Work
WP9 (fpp_to_json disposition) — pending maintainer sign-off.
Pushed by Devin AI
Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/bba39c1277854bf8a1fd63a094f20e24
Requested by: @thomas-bc-autobot