Skip to content

Commit

Permalink
Add version and instrument
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Feb 12, 2024
1 parent 30f38d5 commit 49b2f40
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,3 @@ jobs:
run: |
pip install black
black --check src/too
- run: |
ls -la ~/.cache/sdss/too/samples/sdss5db_too_test
15 changes: 15 additions & 0 deletions tests/scripts/sdss5db_too_test.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ CREATE TABLE catalogdb.catalog (
version_id INTEGER
);

CREATE TABLE catalogdb.version (
id SERIAL PRIMARY KEY,
plan TEXT NOT NULL UNIQUE,
tag TEXT NOT NULL
);

CREATE TABLE catalogdb.sdss_id_stacked (
catalogid21 BIGINT,
catalogid25 BIGINT,
Expand Down Expand Up @@ -499,6 +505,12 @@ CREATE TABLE targetdb.version (
robostrategy BOOLEAN
);

CREATE TABLE targetdb.instrument (
pk SERIAL PRIMARY KEY,
label TEXT UNIQUE,
default_lambda_eff REAL
);

CREATE TABLE targetdb.carton (
pk SERIAL PRIMARY KEY,
mapper_pk INTEGER,
Expand Down Expand Up @@ -593,6 +605,9 @@ CREATE INDEX ON targetdb.carton_to_target (target_pk);
CREATE INDEX ON targetdb.magnitude (carton_to_target_pk);
CREATE INDEX ON targetdb.carton (version_pk);

INSERT INTO targetdb.instrument VALUES (0, 'BOSS'), (1, 'APOGEE');
INSERT INTO catalogdb.version VALUES (31, '1.0.0', '1.0.0');

VACUUM ANALYZE catalogdb.catalog;
VACUUM ANALYZE catalogdb.sdss_id_stacked;
VACUUM ANALYZE catalogdb.catalog_to_gaia_dr3_source;
Expand Down

0 comments on commit 49b2f40

Please sign in to comment.