feat(packaging): ship locales/adapters + isolate data & models - #17
Merged
Conversation
Make MSCodeBase publishable as a PyPI/uvx package and keep user data out of site-packages. - Package tools.stale_detector, adapters/ and locales/ (include + package-data json) so the server starts from an installed wheel (fixes ModuleNotFoundError: No module named 'tools'). - Gate _get_ext_dir() on the __mscodebase_ext__.marker: extension/dev resolve to their root, installed pip/uvx falls back to get_data_root() (%LOCALAPPDATA%/mscodebase) instead of writing binaries/models into site-packages. - Add --project-path/--project-dir CLI -> MSCODEBASE_PROJECT_PATH env, prioritised ABOVE CWD with trust_self_index in resolve_project_root(); legacy PROJECT_PATH stays behind CWD (multi-window isolation kept). - Drop a debug side-effect that wrote C:\temp\mscb_MAIN.txt on import. - Add tests for the new priority override; sync KNOWN_ISSUES/AGENT_DIARY.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make MSCodeBase publishable as a PyPI/uvx package and keep user data out of site-packages.
Problem: Server did not start from an installed wheel (ModuleNotFoundError: No module named '''tools'''), locales/adapters were missing, and binaries/models could be written into site-packages; no CLI way to pick the target project.
Changes:
tools.stale_detector,adapters/,locales/(include + package-data json)._get_ext_dir()on__mscodebase_ext__.marker: extension/dev keep their root; installed pip/uvx falls back toget_data_root()(%LOCALAPPDATA%/mscodebase) instead of writing into site-packages.--project-path/--project-dirCLI ->MSCODEBASE_PROJECT_PATHenv, prioritised above CWD with trust_self_index; legacyPROJECT_PATHstays behind CWD (multi-window isolation kept).C:\temp\mscb_MAIN.txton import.Verification:
pytest: 1562 passed / 0 failed (+4 new tests on the priority override).--project-path: tools-ok, tool_count=48, localeen (78 keys), project root resolves.Closes #16 (extends the codebase hub fix work).