-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from lsst/tickets/PREOPS-5367
tickets/PREOPS-5367: use target_note instead of target, and make schedview more robust to changes in the opsim database schema
- Loading branch information
Showing
6 changed files
with
78 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import unittest | ||
|
||
import schedview.collect.opsim | ||
|
||
|
||
class TestCollectOpsim(unittest.TestCase): | ||
def test_read_opsim(self): | ||
test_rp = "resource://schedview/data/opsim_prenight_2024-08-13_1.db" | ||
visits = schedview.collect.opsim.read_opsim(test_rp) | ||
assert "target_name" in visits.columns | ||
|
||
# 'target_name' used to be called 'target'. | ||
# Verify that read_opsim finds and renames it correctly | ||
old_test_rp = "resource://schedview/data/opsim_prenight_2024-07-30_1.db" | ||
old_visits = schedview.collect.opsim.read_opsim(old_test_rp) | ||
assert "target_name" in old_visits.columns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters