Repository navigation
♻️ / ✨ Revamp Project Template Handling - #441
Merged
Merged
Conversation
MFA-X-AI
marked this pull request as ready for review
August 28, 2025 06:44
MFA-X-AI
force-pushed
the
fahreza/install-template-cli
branch
from
September 2, 2025 04:49
80c374e to
cd87824
Compare
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.
Description
This PR replaces our Xircuits project git submodules + per-library manual installation approach with a vendoring + extras-based dependency model. Component libraries are copied into the repo (no submodules), their requirements are declared under
pyproject.tomlas optional-dependency groups, and a single meta extraxai-componentsaggregates everything including the Xircuits core. A new CLI command,xircuits sync, installs the full set in one shot.Key Changes
1) Library Vendoring
No submodules: When a library is fetched, its
.gitdirectory is removed—code is now part of your repo.Upstream tracking recorded in
pyproject.toml:2) Extras-Based Dependencies + Meta Extra
Each library contributes its own optional-dependency group:
xai-componentsmeta extra = union of allxai-*groups plus the Xircuits core spec.Smart Xircuits spec:
xircuits @ file:///…/xircuits-X.Y.Z.whl(detected via PEP 610).xircuits==X.Y.Z(or fall back toxircuitsif version is unknown).3)
xircuits syncCLIuvwhen available: runsuv sync --extra xai-componentsand prints that it’s using uv.pyproject.tomland runspip installon each entry inxai-components, printing that it’s using pip.4) Index-Based Discovery
.xircuits/remote_lib_manifest/index.jsonfrom a configurable URL (envXIRCUITS_INDEX_URLor[DEV].INDEX_URLin.xircuits/config.ini).installed,incomplete, orremotebased on files + satisfied dependencies.5) Clean Install/Uninstall
xircuits install LIBRARY_ID): vendors the library, removes.git, writes itsxai-<lib>extra, rebuildsxai-components, records provenance, and best-effort installs requirements.xircuits uninstall LIBRARY_ID): removes the vendored folder, deletes its extra and provenance, and rebuildsxai-components.Pyproject Template (resulting shape)
Example: Xircuits from a local wheel
Example: Xircuits from PyPI (no local wheel)
References
Pull Request Type
Type of Change
Tests
1) Install a Library (Vendoring)
xircuits install FLASKVerify vendored folder under
xai_components/xai_flask(no.git/)pyproject.toml:[project.optional-dependencies].xai-flaskcontains normalized requirements[tool.xircuits.components.xai-flask]hassource,path, andtag/revxai-componentsis rebuilt to include union of allxai-*+ Xircuits spec2) Uninstall a Library
xircuits uninstall FLASKFolder removed
pyproject.toml:xai-flaskgroup removedxai-componentsrebuilt (no flask deps)3) Index Refresh & Discovery
xircuits listwith mixed local/remote libs → statuses accurateconfig.ini) → refresh works4) Local Wheel Handling (Xircuits Core)
uv pip install /path/to/xircuits-1.19.2-py3-none-any.whlpyproject.tomlshowsxircuits @ file:///…/xircuits-1.19.2-py3-none-any.whlinxai-componentsxircuits syncuses that wheel (via uv or pip fallback)Tested on?
Notes
We initially adopted
uv workspacesbut did not end up with them because they assume each component library is a fully packaged project. Many Xircuits libraries are lightweight, vendored code folders—not standalone packages—so vendoring + extras provides a simpler, more flexible fit.