Skip to content

Commit

Permalink
Avoid references to internal daf_butler namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Jul 25, 2024
1 parent e3cce0d commit f073ad5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/lsst/summit/utils/efdUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def getEfdData(
end: astropy.Time | None = None,
timespan: astropy.TimeDelta | None = None,
event: TMAEvent | None = None,
expRecord: dafButler.dimensions.DimensionRecord | None = None,
expRecord: dafButler.DimensionRecord | None = None,
warn: bool = True,
) -> pd.DataFrame:
"""Get one or more EFD topics over a time range, synchronously.
Expand Down
8 changes: 4 additions & 4 deletions tests/test_butlerUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def setUp(self):

# expRecords
self.expRecordNoDetector = getExpRecordFromDataId(self.butler, self.rawDataId)
self.assertIsInstance(self.expRecordNoDetector, dafButler.dimensions.DimensionRecord)
self.assertIsInstance(self.expRecordNoDetector, dafButler.DimensionRecord)
self.assertFalse(hasattr(self.expRecordNoDetector, "detector"))
self.assertFalse("detector" in self.expRecordNoDetector.dataId)
# just a crosscheck on the above to make sure other things are correct
Expand Down Expand Up @@ -306,7 +306,7 @@ def test_fillDataId(self):

def test_getExpRecordFromDataId(self):
record = getExpRecordFromDataId(self.butler, self.rawDataId)
self.assertIsInstance(record, dafButler.dimensions.DimensionRecord)
self.assertIsInstance(record, dafButler.DimensionRecord)
return

def test_getDayObsSeqNumFromExposureId(self):
Expand Down Expand Up @@ -407,10 +407,10 @@ def test_getExpRecord(self):
seqNum = self.dayObsSeqNumIdOnly["seq_num"]

recordByExpId = getExpRecord(self.butler, "LATISS", expId=expId)
self.assertIsInstance(recordByExpId, dafButler.dimensions.DimensionRecord)
self.assertIsInstance(recordByExpId, dafButler.DimensionRecord)

recordByDayObsSeqNum = getExpRecord(self.butler, "LATISS", dayObs=dayObs, seqNum=seqNum)
self.assertIsInstance(recordByDayObsSeqNum, dafButler.dimensions.DimensionRecord)
self.assertIsInstance(recordByDayObsSeqNum, dafButler.DimensionRecord)
self.assertEqual(recordByExpId, recordByDayObsSeqNum)

with self.assertRaises(ValueError):
Expand Down

0 comments on commit f073ad5

Please sign in to comment.