Skip to content

Remove latent core->api import cycle #17

Description

@tschm

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 coreapi 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions