[feat][Toolkit]: ship dev-sandbox/nic-monitor/posix-aio sources in the wheel - #1301
Open
harrisonyhq wants to merge 3 commits into
Open
[feat][Toolkit]: ship dev-sandbox/nic-monitor/posix-aio sources in the wheel#1301harrisonyhq wants to merge 3 commits into
harrisonyhq wants to merge 3 commits into
Conversation
Locate tool sources via importlib.resources instead of repo-relative paths (registry.resolve_repo_path / repo_root), which are invalid after a non-editable wheel install (repo_root() = parents[2] of registry.py points into site-packages, not the repo). toolkit packaging: - Map toolkit/src onto the ucm_toolkit._native namespace (package-dir) so the dev-sandbox C++ tree and nic-monitor scripts ship as package data without being moved; add MANIFEST.in to graft the native trees and prune fmt doc/test/.github plus build artifacts. - include-package-data = true. dev_sandbox adapter: - _source_dir/_build_dir via importlib.resources; build_dir defaults to the in-package native/build (UCM_TOOLKIT_DEV_SANDBOX_BUILD_DIR env override). - Drop update_tool_field persistence (rewrites the read-only adapter.py on wheel installs); add a writable pre-check that points to --build-dir. nic_monitor adapter: locate nic_monitor_pro.sh via importlib.resources. posix_aio adapter: locate posixstore_aio_test.py via importlib.resources under the installed ucm package (ucm.store.test.e2e); _make_env unchanged. ucm: add __init__.py to store/test and store/test/e2e so posixstore_aio_test.py ships in the ucm wheel. registry: drop now-unused resolve_repo_path/update_tool_field; repo_root kept for posix_aio _make_env. Wheel stays pure-python py3-none-any; editable behavior unchanged.
harrisonyhq
requested review from
Wwwzff,
dante159753,
mag1c-h,
student-jhz and
ygwpz
as code owners
August 28, 2026 09:00
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 dev-sandbox / nic-monitor / posix-aio work after a non-editable
ucm-toolkitwheel install.Root cause: these tools locate their sources via
registry.repo_root()(=registry.py'sparents[2]), i.e. a repo-relative path. It is correct for editable/repo checkouts, but in a wheel install it points inside site-packages (not the repo), so all three tools break — and the sources aren't even shipped in the wheel.Changes
toolkit/src/onto theucm_toolkit._nativenamespace (package-dir + include-package-data + MANIFEST.in) so the C++/shell sources ship as package data, without moving any files.importlib.resources.files(...)(works for both editable and wheel installs):native/build(override viaUCM_TOOLKIT_DEV_SANDBOX_BUILD_DIR); pre-checks writability and points to--build-diron read-only installs; dropsupdate_tool_field(rewrote the read-only adapter.py).importlib.resources.files("ucm"); requires ucm installed; doctor reports MISSING gracefully when ucm is absent.__init__.pytoucm/store/test/anducm/store/test/e2e/soposixstore_aio_test.pyships in the ucm wheel.resolve_repo_path/update_tool_field; keeprepo_root(still used by posix-aio_make_env).Verification
py3-none-any(830KB); contains the full dev-sandbox CMake tree and nic-monitor scripts; fmt doc/test/.github pruned.doctor dev-sandbox/nic-monitorlocate sources OK;doctor posix-aiolocates the script OK once ucm is installed.pytest toolkit/tests: 92 passed.Note: fully running posix-aio requires rebuilding/installing the ucm main package so
posixstore_aio_test.pyis actually in the ucm wheel.