Skip to content

Commit

Permalink
s2748 + opencadc#5 - some fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
SharonGoliath committed Jan 7, 2021
1 parent e2af911 commit 422fd3b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gem2caom2/gem_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ def external_urls(self):
def product_id(self):
return self._product_id

@property
def product_id(self):
return self._file_id

@property
def thumb_uri(self):
"""Note the 'ad' scheme - the thumbnail is generated at CADC,
Expand Down
14 changes: 14 additions & 0 deletions gem2caom2/tests/data/multi_plane/GN-2020A-Q-132-0-0.in.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<caom2:Observation xmlns:caom2="http://www.opencadc.org/caom2/xml/v2.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="caom2:SimpleObservation" caom2:id="00000000-0000-0000-0123-01246e4c9700">
<caom2:collection>GEMINI</caom2:collection>
<caom2:observationID>GN-2020A-Q-132-0-0</caom2:observationID>
<caom2:algorithm>
<caom2:name>exposure</caom2:name>
</caom2:algorithm>
<caom2:planes>
<caom2:plane caom2:id="00000000-0000-0000-0123-01247c90c000">
<caom2:productID>N20191219A0004</caom2:productID>
<caom2:metaRelease>1990-01-01T00:00:00.000</caom2:metaRelease>
<caom2:artifacts/>
</caom2:plane>
</caom2:planes>
</caom2:Observation>
4 changes: 4 additions & 0 deletions gem2caom2/tests/test_gem_obs_file_relationship.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ def test_repair_data_label():
test_result = external_metadata.gofr.repair_data_label('N20181217S0266')
assert test_result is not None, 'no result'
assert test_result == 'GN-2018B-Q-133-20-001', 'wrong result'
test_result = external_metadata.repair_data_label(
'rS20050916S0159', 'GS-2003B-Q-23-17-001-G')
assert test_result is not None, 'no result'
assert test_result == 'GS-2003B-Q-23-17-001', 'wrong result'


def test_repair_data_label_247():
Expand Down

0 comments on commit 422fd3b

Please sign in to comment.