diff --git a/circuitforge_core/pipeline/__init__.py b/circuitforge_core/pipeline/__init__.py new file mode 100644 index 0000000..5f6751a --- /dev/null +++ b/circuitforge_core/pipeline/__init__.py @@ -0,0 +1,3 @@ +from .staging import StagingDB + +__all__ = ["StagingDB"] diff --git a/circuitforge_core/pipeline/staging.py b/circuitforge_core/pipeline/staging.py new file mode 100644 index 0000000..eb59ad0 --- /dev/null +++ b/circuitforge_core/pipeline/staging.py @@ -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." + ) diff --git a/circuitforge_core/wizard/__init__.py b/circuitforge_core/wizard/__init__.py new file mode 100644 index 0000000..51bb1ee --- /dev/null +++ b/circuitforge_core/wizard/__init__.py @@ -0,0 +1,3 @@ +from .base import BaseWizard + +__all__ = ["BaseWizard"] diff --git a/circuitforge_core/wizard/base.py b/circuitforge_core/wizard/base.py new file mode 100644 index 0000000..d68b1bc --- /dev/null +++ b/circuitforge_core/wizard/base.py @@ -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." + ) diff --git a/tests/test_stubs.py b/tests/test_stubs.py new file mode 100644 index 0000000..8b299e4 --- /dev/null +++ b/tests/test_stubs.py @@ -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", {})