Skip to content

[v0.3] Move shared engine modules into pulseengine/core/ #32

@Codex-Crusader

Description

@Codex-Crusader

Parent Issue

Part of #31 — v0.3 Repo Restructure

Context

The current codebase keeps engine logic spread across app/, src/, config/, and storage/. According to the v0.3 roadmap, all shared engine code that is used by both the local app and the web demo must live in pulseengine/core/.

This is the first and most critical step of the repo split — it establishes the foundation that local/ and web/ will import from.

Modules to Move

Current Path Target Path
app/analysis.py / src/engine.py pulseengine/core/app.py
config/settings.py pulseengine/core/config.py
storage/storage.py pulseengine/core/storage.py
app/backtest.py pulseengine/core/backtest.py
src/price.py pulseengine/core/price.py
src/news.py pulseengine/core/news.py
src/signals.py pulseengine/core/signals.py
src/context.py pulseengine/core/context.py
src/explanation.py pulseengine/core/explanation.py
src/sentiment.py pulseengine/core/sentiment.py

Rules for core/

  • No surface-specific importscore/ must not import anything from local/ or web/
  • No file I/O assumptions — storage paths should be configurable, not hardcoded to any surface's working directory
  • No Streamlit importscore/ is headless; the dashboard lives in local/
  • Well-tested: all existing tests/test_core.py and tests/test_pipeline.py must pass against the new layout

Acceptance Criteria

  • All files listed in the table above are present under pulseengine/core/
  • Old paths removed or replaced with thin re-export shims (if needed for backwards compat during transition)
  • pulseengine/core/__init__.py exposes the public API cleanly
  • All existing tests pass (pytest tests/)
  • No circular imports between core/ and any other directory
  • requirements.txt still resolves — no new dependencies introduced

Notes

Do not touch local/ or web/ in this PR. This issue is purely about establishing core/. The other surfaces are handled in separate sub-issues of #31.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions