Skip to content

Commit

Permalink
Fix can_offset loading and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Apr 18, 2024
1 parent cf79627 commit 3a97228
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/too/datamodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"h_mag",
"delta_ra",
"delta_dec",
"can_offset",
"inertial",
"n_exposures",
"priority",
Expand Down
1 change: 1 addition & 0 deletions src/too/mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ def create_mock_too_catalogue(
df = df.with_columns(
fiber_type=polars.Series(fiber_type, dtype=polars.String),
observed=False,
can_offset=True,
active=True,
priority=polars.lit(5, dtype=polars.Int16),
n_exposures=polars.lit(3, dtype=polars.Int16),
Expand Down
3 changes: 2 additions & 1 deletion tests/scripts/sdss5db_too_test.sql
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ CREATE TABLE catalogdb.too_metadata (
h_mag REAL,
delta_ra REAL,
delta_dec REAL,
can_offset BOOLEAN,
inertial BOOLEAN,
n_exposures SMALLINT,
priority SMALLINT,
Expand Down Expand Up @@ -344,7 +345,7 @@ CREATE UNIQUE INDEX ON targetdb.cadence(label text_ops);
CREATE UNIQUE INDEX ON targetdb.cadence(label text_ops);
CREATE INDEX ON targetdb.cadence(nepochs int4_ops);

CREATE UNIQUE INDEX design_mode_pkey ON targetdb.design_mode(label);
CREATE UNIQUE INDEX ON targetdb.design_mode(label);

INSERT INTO catalogdb.version VALUES (31, '1.0.0', '1.0.0');
INSERT INTO targetdb.cadence VALUES ('bright_1x1', 1, '{0}', '{1}', '{0}', '{0}', '{1}', '{0}', 1, null, 'bright_1x1');
Expand Down

0 comments on commit 3a97228

Please sign in to comment.