Skip to content

Commit

Permalink
Merge pull request #214 from lsst-ts/tickets/DM-46712
Browse files Browse the repository at this point in the history
DM-46712: Bring LSSTCam online
  • Loading branch information
ugyballoons authored Oct 8, 2024
2 parents 06ff886 + 1435948 commit 898420c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 8 deletions.
18 changes: 17 additions & 1 deletion python/lsst/ts/rubintv/models/models_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,13 @@ cameras:

- name: lsstcam
title: LSSTCam
online: False
online: True
logo: LSSTSummit.jpg
text_colour: "#fff"
channels:
- name: focal_plane_mosaic
title: Focal Plane mosaic
colour: "#61cca2"

- name: slac_lsstcam
title: LSSTCam
Expand Down Expand Up @@ -416,6 +420,18 @@ metadata_cols:
Test type:
The type of test being run, e.g. superflats

lsstcam:
Run number:
The run number, as taken from the exposure record's science_program field
Exposure time:
The image exposure time
Dark time:
The image dark time
Image type:
The image type, e.g. bias, dark, flat etc
Test type:
The type of test being run, e.g. superflats

ts8:
Run number:
The run number, as taken from the exposure record's science_program field
Expand Down
15 changes: 10 additions & 5 deletions tests/handlers/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,17 @@ async def test_get_api_location_camera_current_for_offline(
"""Test that api location camera current gives no events for offline
camera"""
client, app, mocker = mocked_client
location_name = "summit-usdf"
camera_name = "lsstcam"

response = await client.get(f"/rubintv/api/{location_name}/{camera_name}/current")
data = response.json()
assert data == {}
location_name = "summit-usdf"
location: Location | None = find_first(m.locations, "name", location_name)
assert location is not None
for camera in location.cameras:
if not camera.online:
response = await client.get(
f"/rubintv/api/{location_name}/{camera.name}/current"
)
data = response.json()
assert data == {}


@pytest.mark.asyncio
Expand Down
2 changes: 1 addition & 1 deletion tests/handlers/external_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async def test_current_channels(

html = await response.aread()
parsed = BeautifulSoup(html, "html.parser")
if mocker.empty_channel[loc_cam] == seq_chan.name:
if mocker.empty_channel.get(loc_cam) == seq_chan.name:
assert parsed.select(".event-error")
assert not parsed.select(".event-info")
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/mockdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def add_seq_objs(
empty_channel = ""
if include_empty_channel:
seq_chans = [chan.name for chan in camera.seq_channels()]
if seq_chans:
if seq_chans and len(seq_chans) > 1:
empty_channel = random.choice(seq_chans)

for channel in camera.channels:
Expand Down

0 comments on commit 898420c

Please sign in to comment.