Subcategory: Overall architecture — 7 → 10
Problem: The lower core/ layer imports the upper api/ layer. src/pycharting/core/server.py:201 does a function-local from pycharting.api.routes import router as api_router — a latent core↔api cycle deliberately broken by deferring the import inside create_app.
Evidence:
src/pycharting/core/server.py:201: from pycharting.api.routes import router as api_router
Change: Invert the dependency — pass the router in from the api/composition layer, or move create_app's wiring up a layer — so core/ no longer imports api/ even lazily.
Done when: No core/ module imports api/ (the import graph has no upward edge, deferred or otherwise).
Context: PR #15
Subcategory: Overall architecture — 7 → 10
Problem: The lower
core/layer imports the upperapi/layer.src/pycharting/core/server.py:201does a function-localfrom pycharting.api.routes import router as api_router— a latentcore↔apicycle deliberately broken by deferring the import insidecreate_app.Evidence:
Change: Invert the dependency — pass the router in from the api/composition layer, or move
create_app's wiring up a layer — socore/no longer importsapi/even lazily.Done when: No
core/module importsapi/(the import graph has no upward edge, deferred or otherwise).Context: PR #15