Skip to content

Commit

Permalink
Julian Date check fix - again
Browse files Browse the repository at this point in the history
Tested new syntax (from Jordan) and added some lines to the associated regression test to flag unexpected side-effects. Added version 1.19.0.0 to compatible LDD generation list to support NH migration. Fixed typo in test/README
  • Loading branch information
acraugh committed Dec 20, 2023
1 parent 406aa02 commit 96c7ce5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions pds4_versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
1.19.0.0
1.20.0.0
1.21.0.0
2 changes: 1 addition & 1 deletion src/PDS4_SB_IngestLDD.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2156,7 +2156,7 @@

<DD_Rule>
<local_identifier>julian_units_check</local_identifier>
<rule_context>descendant::sb:SB_Metadata[ends-with(name(),'_JD')]</rule_context>
<rule_context>sb:SB_Metadata//*[ends-with(name(),'_JD')]</rule_context>
<DD_Rule_Statement>
<rule_type>Assert</rule_type>
<rule_test>@unit eq 'julian day'</rule_test>
Expand Down
2 changes: 1 addition & 1 deletion test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ Tests for individual key features are provided in VALID/FAIL pairs:

**julian_dates_unit_check**

These files demonstrate that every attribute that is identified as contains a
These files demonstrate that every attribute that is identified as containing a
Julian date formatted time (they all have names ending in "_JD") has "julian day"
as the value of its unit attribute, and not some other valid *Units_of_Time* value.
2 changes: 2 additions & 0 deletions test/julian_dates_unit_check_FAIL.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@
<sb:Observation_Parameters>

<sb:Timing>
<sb:midobservation_time_UTC_YMD>2023-12-25T01:23:45Z</sb:midobservation_time_UTC_YMD>
<sb:midobservation_time_UTC_JD unit="s">2459959.1234</sb:midobservation_time_UTC_JD>
<sb:start_time_UTC_JD unit="day">2459959.1111</sb:start_time_UTC_JD>
<sb:stop_time_UTC_JD unit="hr">2459959.2222</sb:stop_time_UTC_JD>
<sb:comment>some text</sb:comment>
</sb:Timing>
</sb:Observation_Parameters>

Expand Down
2 changes: 2 additions & 0 deletions test/julian_dates_unit_check_VALID.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@
<sb:Observation_Parameters>

<sb:Timing>
<sb:midobservation_time_UTC_YMD>2023-12-25T01:23:45Z</sb:midobservation_time_UTC_YMD>
<sb:midobservation_time_UTC_JD unit="julian day">2459959.1234</sb:midobservation_time_UTC_JD>
<sb:start_time_UTC_JD unit="julian day">2459959.1111</sb:start_time_UTC_JD>
<sb:stop_time_UTC_JD unit="julian day">2459959.2222</sb:stop_time_UTC_JD>
<sb:comment>some text</sb:comment>
</sb:Timing>
</sb:Observation_Parameters>

Expand Down

0 comments on commit 96c7ce5

Please sign in to comment.