Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions helm/blueapi/config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,7 @@
"description": "Config for the RunEngine environment",
"properties": {
"sources": {
"default": [
{
"module": "dodal.plans",
"kind": "planFunctions"
},
{
"module": "dodal.plan_stubs.wrapped",
"kind": "planFunctions"
}
],
"default": [],
"items": {
"discriminator": {
"mapping": {
Expand Down
11 changes: 1 addition & 10 deletions helm/blueapi/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -554,16 +554,7 @@
},
"sources": {
"title": "Sources",
"default": [
{
"kind": "planFunctions",
"module": "dodal.plans"
},
{
"kind": "planFunctions",
"module": "dodal.plan_stubs.wrapped"
}
],
"default": [],
"type": "array",
"items": {
"oneOf": [
Expand Down
5 changes: 1 addition & 4 deletions src/blueapi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,7 @@ class EnvironmentConfig(BlueapiBaseModel):
PlanSource | DeviceManagerSource,
Field(discriminator="kind"),
]
] = [
PlanSource(module="dodal.plans"),
PlanSource(module="dodal.plan_stubs.wrapped"),
]
] = Field(default=[])
Comment thread
tpoliaw marked this conversation as resolved.
Resolved
events: WorkerEventConfig = Field(default_factory=WorkerEventConfig)
metadata: MetadataConfig | None = Field(default=None)

Expand Down
16 changes: 13 additions & 3 deletions tests/unit_tests/worker/test_task_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
)
from ophyd_async.core import AsyncStatus

from blueapi.config import DeviceManagerSource, EnvironmentConfig
from blueapi.config import DeviceManagerSource, EnvironmentConfig, PlanSource
from blueapi.core import BlueskyContext, EventStream
from blueapi.core.bluesky_types import DataEvent
from blueapi.service.model import PlanModel
Expand Down Expand Up @@ -109,7 +109,12 @@ def second_fake_device() -> FakeDevice:
@pytest.fixture
def context(fake_device: FakeDevice, second_fake_device: FakeDevice) -> BlueskyContext:
ctx = BlueskyContext()
ctx_config = EnvironmentConfig()
ctx_config = EnvironmentConfig(
sources=[
PlanSource(module="dodal.plans"),
PlanSource(module="dodal.plan_stubs.wrapped"),
]
)
ctx_config.sources.append(DeviceManagerSource(module="devices"))
ctx.register_plan(failing_plan)
ctx.register_device(fake_device)
Expand All @@ -121,7 +126,12 @@ def context(fake_device: FakeDevice, second_fake_device: FakeDevice) -> BlueskyC
@pytest.fixture
def context_without_devices() -> BlueskyContext:
ctx = BlueskyContext()
ctx_config = EnvironmentConfig()
ctx_config = EnvironmentConfig(
sources=[
PlanSource(module="dodal.plans"),
PlanSource(module="dodal.plan_stubs.wrapped"),
]
)
ctx_config.sources.append(DeviceManagerSource(module="devices"))
ctx.with_config(ctx_config)
return ctx
Expand Down
Loading