Repository navigation
chore(deps): allège le noyau (fastapi nu + uvicorn, xcdk/xcorecli en extras) - #307
Merged
Merged
Conversation
… extras Le socle inconditionnel de `pip install XCoreRuntime` passe de ~59 paquets à 6 : - fastapi[standard] -> fastapi + uvicorn[standard] (retire fastapi-cli / fastapi-cloud-cli — donc sentry-sdk, typer, rich-toolkit, rignore, fastar, agent-detector, detect-installer — ainsi que jinja2, python-multipart, email-validator, pydantic-settings, pydantic-extra-types, dnspython) - xcdk et xcorecli repassent en extras [sdk]/[xcli] (promus au noyau par erreur en 2.8.0) ; conservés en dev pour `poetry run xcli` et le chemin CI - suppression d'opentelemetry-api (tiré transitivement par opentelemetry-sdk) poetry.lock : 146 -> 133 paquets. test_optional_dependencies.py bloque aussi sdk/xcli et verrouille le boot zero-config sans aucun paquet optionnel.
Contributor
Reviewer's GuideLe PR allège l’installation de base à six dépendances en séparant le framework FastAPI de ses extras, en rendant Sequence diagram for minimal XCoreRuntime boot without optional extrassequenceDiagram
participant User
participant Python
participant xcore
participant CoreDeps
participant OptionalDeps
User->>Python: import xcore
Python->>xcore: load core modules
xcore->>CoreDeps: import fastapi, pydantic, pyyaml
xcore->>CoreDeps: import apscheduler, opentelemetry-sdk
xcore-->>Python: import succeeds
User->>xcore: start zero-config boot
xcore-->>User: boot succeeds
Note over OptionalDeps: No xcdk or xcorecli required
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
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.
Objectif
Réduire le socle de dépendances installé inconditionnellement par
pip install XCoreRuntime, qui était passé à ~59 paquets (dont beaucoup inutiles) après l'introduction dexcdk/xcoreclidans le noyau en 2.8.0.Changements
fastapi[standard]→fastapi+uvicorn[standard]: retire tout le clusterfastapi-cli/fastapi-cloud-cli(sentry-sdk,typer,rich-toolkit,rignore,fastar,agent-detector,detect-installer) ainsi quejinja2,python-multipart,email-validator,pydantic-settings,pydantic-extra-types,dnspython— aucun n'est importé parxcore.xcdk(extra[sdk]) etxcorecli(extra[xcli]) repassent en optionnels : promus au noyau par erreur en 2.8.0. Aucun des deux n'est importé parxcore(xcdkn'est résolu que dans untry/exceptdexcore/sdk/__init__.py). Conservés en dev pourpoetry run xcliet le chemin CI.opentelemetry-apiretiré : tiré transitivement paropentelemetry-sdk(épinglé==1.45.1).Le noyau se limite désormais à 6 paquets :
fastapi,uvicorn[standard],pydantic,pyyaml,apscheduler,opentelemetry-sdk.Vérifications
poetry.lock: 146 → 133 paquets.import xcoreet le boot zero-config fonctionnent sans aucun paquet optionnel —tests/unit/test_optional_dependencies.pybloque désormais aussisdk/xcli.make lint-checkOK.Doc
Entrée ajoutée dans
[Unreleased]dedoc/changelog.md.Summary by Sourcery
Reduce the default XCoreRuntime installation footprint while preserving optional CLI and plugin-SDK functionality.
Bug Fixes:
xcdkandxcoreclias optional extras so installing the runtime no longer pulls in the plugin SDK and CLI by default.Enhancements:
fastapi[standard]withfastapiand explicituvicorn[standard], and removing redundant dependencies.xcdkandxcorecliavailable in the development environment while preserving optional-dependency support and zero-config operation.Build:
poetry.lock, reducing the locked package set from 146 to 133 packages.Documentation:
Tests:
xcoreimports and boots without the SDK and CLI packages.