Skip to content

Commit

Permalink
Merge pull request #1026 from NASA-PDS/rchenatjpl
Browse files Browse the repository at this point in the history
Cucumber test cases for B15.0 I&T
  • Loading branch information
jordanpadams authored Oct 19, 2024
2 parents 6335564 + ebca434 commit b04e347
Show file tree
Hide file tree
Showing 31 changed files with 6,500 additions and 62 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ validate_stack_traces*
# macOS specific stuff
.DS_Store

# Validate output
*.csv

# Local .terraform state files, directories and crash logs
**/.terraform/*
*.tfstate
Expand Down
108 changes: 62 additions & 46 deletions src/test/resources/features/3.6.x.feature

Large diffs are not rendered by default.

82 changes: 82 additions & 0 deletions src/test/resources/github816/ff_char.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1K00.sch" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<Product_Observational xmlns="http://pds.nasa.gov/pds4/pds/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pds.nasa.gov/pds4/pds/v1 https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1K00.xsd">
<Identification_Area>
<logical_identifier>urn:nasa:pds:bundle:collection:ff_char_test</logical_identifier>
<version_id>1.0</version_id>
<title>Field Format Character Test</title>
<information_model_version>1.20.0.0</information_model_version>
<product_class>Product_Observational</product_class>
</Identification_Area>
<Observation_Area>
<Time_Coordinates>
<start_date_time>2023Z</start_date_time>
<stop_date_time>2023Z</stop_date_time>
</Time_Coordinates>
<Investigation_Area>
<name>No Specific Investigation</name>
<type>Individual Investigation</type>
<Internal_Reference>
<lid_reference>urn:nasa:pds:context:investigation:individual.none</lid_reference>
<reference_type>data_to_investigation</reference_type>
</Internal_Reference>
</Investigation_Area>
<Observing_System>
<Observing_System_Component>
<name>telescope</name>
<type>Instrument</type>
</Observing_System_Component>
</Observing_System>
<Target_Identification>
<name>target</name>
<type>Comet</type>
</Target_Identification>
</Observation_Area>
<File_Area_Observational>
<File>
<file_name>ff_test.csv</file_name>
</File>
<Table_Character>
<offset unit="byte">0</offset>
<records>5</records>
<record_delimiter>Carriage-Return Line-Feed</record_delimiter>
<Record_Character>
<fields>4</fields>
<groups>0</groups>
<record_length unit="byte">27</record_length>
<Field_Character>
<name>field 1</name>
<field_number>1</field_number>
<field_location unit="byte">1</field_location>
<data_type>ASCII_Real</data_type>
<field_length unit="byte">6</field_length>
<field_format>%6.2f</field_format>
</Field_Character>
<Field_Character>
<name>field 2</name>
<field_number>2</field_number>
<field_location unit="byte">8</field_location>
<data_type>ASCII_Real</data_type>
<field_length unit="byte">5</field_length>
<field_format>%4.2f</field_format>
</Field_Character>
<Field_Character>
<name>field 3</name>
<field_number>3</field_number>
<field_location unit="byte">14</field_location>
<data_type>ASCII_Real</data_type>
<field_length unit="byte">8</field_length>
<field_format>%8.3e</field_format>
</Field_Character>
<Field_Character>
<name>field 4</name>
<field_number>3</field_number>
<field_location unit="byte">23</field_location>
<data_type>ASCII_Integer</data_type>
<field_length unit="byte">3</field_length>
<field_format>%3d</field_format>
</Field_Character>
</Record_Character>
</Table_Character>
</File_Area_Observational>
</Product_Observational>
75 changes: 75 additions & 0 deletions src/test/resources/github816/ff_del.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1K00.sch" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<Product_Observational xmlns="http://pds.nasa.gov/pds4/pds/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pds.nasa.gov/pds4/pds/v1 https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1K00.xsd">
<Identification_Area>
<logical_identifier>urn:nasa:pds:bundle:collection:ff_del_test</logical_identifier>
<version_id>1.0</version_id>
<title>Field Format Delimited Test</title>
<information_model_version>1.20.0.0</information_model_version>
<product_class>Product_Observational</product_class>
</Identification_Area>
<Observation_Area>
<Time_Coordinates>
<start_date_time>2023Z</start_date_time>
<stop_date_time>2023Z</stop_date_time>
</Time_Coordinates>
<Investigation_Area>
<name>No Specific Investigation</name>
<type>Individual Investigation</type>
<Internal_Reference>
<lid_reference>urn:nasa:pds:context:investigation:individual.none</lid_reference>
<reference_type>data_to_investigation</reference_type>
</Internal_Reference>
</Investigation_Area>
<Observing_System>
<Observing_System_Component>
<name>telescope</name>
<type>Instrument</type>
</Observing_System_Component>
</Observing_System>
<Target_Identification>
<name>target</name>
<type>Comet</type>
</Target_Identification>
</Observation_Area>
<File_Area_Observational>
<File>
<file_name>ff_test.csv</file_name>
</File>
<Table_Delimited>
<offset unit="byte">0</offset>
<parsing_standard_id>PDS DSV 1</parsing_standard_id>
<records>5</records>
<record_delimiter>Carriage-Return Line-Feed</record_delimiter>
<field_delimiter>Comma</field_delimiter>
<Record_Delimited>
<fields>4</fields>
<groups>0</groups>
<Field_Delimited>
<name>field 1</name>
<field_number>1</field_number>
<data_type>ASCII_Real</data_type>
<field_format>%6.2f</field_format>
</Field_Delimited>
<Field_Delimited>
<name>field 2</name>
<field_number>2</field_number>
<data_type>ASCII_Real</data_type>
<field_format>%4.2f</field_format>
</Field_Delimited>
<Field_Delimited>
<name>field 3</name>
<field_number>3</field_number>
<data_type>ASCII_Real</data_type>
<field_format>%8.3e</field_format>
</Field_Delimited>
<Field_Delimited>
<name>field 4</name>
<field_number>4</field_number>
<data_type>ASCII_Integer</data_type>
<field_format>%3d</field_format>
</Field_Delimited>
</Record_Delimited>
</Table_Delimited>
</File_Area_Observational>
</Product_Observational>
5 changes: 5 additions & 0 deletions src/test/resources/github816/ff_test.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
111.11,22.2 ,3.333e33,444
11.111,2.22 ,3.333e3 ,444
111.11,22.22,3.333e3 ,444
111.11, 2.22,33333333,444
111.11, 2.22,3.333e3 ,4.4
76 changes: 76 additions & 0 deletions src/test/resources/github822/bundle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model
href="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1J00.sch"
schematypens="http://purl.oclc.org/dsdl/schematron"?>
<?xml-model
href="https://pds.nasa.gov/pds4/ctli/v1/PDS4_CTLI_1G00_1200.sch"
schematypens="http://purl.oclc.org/dsdl/schematron"?>
<Product_Bundle
xmlns="http://pds.nasa.gov/pds4/pds/v1"
xmlns:ctli="http://pds.nasa.gov/pds4/ctli/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://pds.nasa.gov/pds4/pds/v1
https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1J00.xsd
http://pds.nasa.gov/pds4/ctli/v1
https://pds.nasa.gov/pds4/ctli/v1/PDS4_CTLI_1G00_1200.xsd">
<Identification_Area>
<logical_identifier>urn:nasa:pds:clps_to_2ab_pll.pitms</logical_identifier>
<version_id>1.0</version_id>
<title> CLPS Task Order 2AB Peregrine Ion-Trap Mass Spectrometer (PITMS) for Lunar Surface Volatiles</title>
<information_model_version>1.19.0.0</information_model_version>
<product_class>Product_Bundle</product_class>
<Citation_Information>
<author_list>Cohen, Barbara</author_list>
<publication_year>2024</publication_year>
<!-- <doi> </doi> -->
<description> This bundle contains the data collected by the Peregine Ion Trap Mass Spectormeter aboard the Peregrine lander, along with the documents and other information necessary for the interpretation of that data. </description>
</Citation_Information>
<Modification_History>
<Modification_Detail>
<modification_date>2024-06-10</modification_date>
<version_id>1.0</version_id>
<description>Initial version.</description>
</Modification_Detail>
</Modification_History>
</Identification_Area>
<Context_Area>
<Investigation_Area>
<name>CLPS Task Order 2AB</name>
<type>Mission</type>
<Internal_Reference>
<lid_reference>urn:nasa:pds:context:investigation:mission.clps_to_2ab</lid_reference>
<reference_type>bundle_to_investigation</reference_type>
</Internal_Reference>
</Investigation_Area>
<Observing_System>
<name>PITMS onboard the Peregrine Lunar Lander</name>
<Observing_System_Component>
<name>CLPS Task Order 2 AB Peregrine Lunar Lander</name>
<type>Host</type>
<Internal_Reference>
<lid_reference>urn:nasa:pds:context:instrument_host:spacecraft.clps_to_2ab_pll</lid_reference>
<reference_type>is_instrument_host</reference_type>
</Internal_Reference>
</Observing_System_Component>
</Observing_System>
<Target_Identification>
<name>Moon</name>
<type>Satellite</type>
<Internal_Reference>
<lid_reference>urn:nasa:pds:context:target:satellite.earth.moon</lid_reference>
<reference_type>collection_to_target</reference_type>
</Internal_Reference>
</Target_Identification>
</Context_Area>
<Bundle>
<bundle_type>Archive</bundle_type>
</Bundle>

<Bundle_Member_Entry>
<lid_reference>urn:nasa:pds:clps_to_2ab_pll.pitms:data_raw</lid_reference>
<member_status>Primary</member_status>
<reference_type>bundle_has_data_collection</reference_type>
</Bundle_Member_Entry>

</Product_Bundle>
Empty file.
2 changes: 2 additions & 0 deletions src/test/resources/github822/data_raw/PITMS_RAW_AUX.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
TIME,PITMS_PACKET_ID,PACKET_COUNT,PACKET_LENGTH,TIME_IN_SECONDS,FRACTIONS_OF_SECONDS,OPERATING_FREQUENCY,VOLTS_PER_AMU,DAC_SCALING_GRADIENT,DAC_SCALING_INTERCEPT,START_SCALING,FINAL_SCALING,CALCULATED_DAC_SCALING_GRADIENT,CALCULATED_DAC_SCALING_INTERCEPT,CALCULATED_OPERATING_FREQUENCY,CALCULATED_VOLTS_PER_AMU,CALIBRATION_APPLIED,SCIENCE_SEQUENCE_NUMBER,SCAN_FUNCTION_NUMBER,
2024-01-09T18:36:19Z,388,49152,193,1446,445,592000,2.102783,10.226335,886.992493,930.000000,3790.000000,10.226335,886.992493,592000,2.102783,1,1,1
Loading

0 comments on commit b04e347

Please sign in to comment.