feat: add wizard and pipeline stubs
This commit is contained in:
parent
e09622729c
commit
56042dffba
5 changed files with 65 additions and 0 deletions
3
circuitforge_core/pipeline/__init__.py
Normal file
3
circuitforge_core/pipeline/__init__.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
from .staging import StagingDB
|
||||
|
||||
__all__ = ["StagingDB"]
|
||||
26
circuitforge_core/pipeline/staging.py
Normal file
26
circuitforge_core/pipeline/staging.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
"""
|
||||
SQLite-backed staging queue for CircuitForge pipeline tasks.
|
||||
Full implementation deferred — stub raises NotImplementedError.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
from typing import Any
|
||||
|
||||
|
||||
class StagingDB:
|
||||
"""
|
||||
Staging queue for background pipeline tasks (search polling, score updates, etc.)
|
||||
Stub: raises NotImplementedError until wired up in a product.
|
||||
"""
|
||||
|
||||
def enqueue(self, task_type: str, payload: dict[str, Any]) -> None:
|
||||
"""Add a task to the staging queue."""
|
||||
raise NotImplementedError(
|
||||
"StagingDB.enqueue() is not yet implemented. "
|
||||
"Background task pipeline is a v0.2+ feature."
|
||||
)
|
||||
|
||||
def dequeue(self) -> tuple[str, dict[str, Any]] | None:
|
||||
"""Fetch the next pending task. Returns (task_type, payload) or None."""
|
||||
raise NotImplementedError(
|
||||
"StagingDB.dequeue() is not yet implemented."
|
||||
)
|
||||
3
circuitforge_core/wizard/__init__.py
Normal file
3
circuitforge_core/wizard/__init__.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
from .base import BaseWizard
|
||||
|
||||
__all__ = ["BaseWizard"]
|
||||
18
circuitforge_core/wizard/base.py
Normal file
18
circuitforge_core/wizard/base.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
"""
|
||||
First-run onboarding wizard base class.
|
||||
Full implementation is net-new per product (v0.1+ for snipe, etc.)
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
class BaseWizard:
|
||||
"""
|
||||
Base class for CircuitForge first-run wizards.
|
||||
Subclass and implement run() in each product.
|
||||
"""
|
||||
|
||||
def run(self) -> None:
|
||||
"""Execute the onboarding wizard flow. Must be overridden by subclass."""
|
||||
raise NotImplementedError(
|
||||
"BaseWizard.run() must be implemented by a product-specific subclass."
|
||||
)
|
||||
15
tests/test_stubs.py
Normal file
15
tests/test_stubs.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import pytest
|
||||
from circuitforge_core.wizard import BaseWizard
|
||||
from circuitforge_core.pipeline import StagingDB
|
||||
|
||||
|
||||
def test_wizard_raises_not_implemented():
|
||||
wizard = BaseWizard()
|
||||
with pytest.raises(NotImplementedError):
|
||||
wizard.run()
|
||||
|
||||
|
||||
def test_pipeline_raises_not_implemented():
|
||||
staging = StagingDB()
|
||||
with pytest.raises(NotImplementedError):
|
||||
staging.enqueue("job", {})
|
||||
Loading…
Reference in a new issue