From b367f534efcd4304e15dd9f4883c14036cdca98d Mon Sep 17 00:00:00 2001 From: Greg Lucas Date: Fri, 5 Jan 2024 12:56:34 -0700 Subject: [PATCH] TST: Move test structure to a single test directory This moves from /instrument/tests to /tests/instrument --- imap_processing/idex/idex_packet_parser.py | 2 +- .../{cdf/tests => tests/cdf}/__init__.py | 0 .../{cdf/tests => tests/cdf}/test_attr_classes.py | 0 .../{codice/tests => tests/codice}/__init__.py | 0 .../codice}/data/eu_unit_lookup_table.csv | 0 .../idle_export_eu.COD_NHK_20230822_122700 2.csv | 0 .../idle_export_raw.COD_NHK_20230822_122700.csv | 0 .../data/raw_ccsds_20230822_122700Z_idle.bin | Bin .../tests => tests/codice}/test_codice_l0.py | 6 +++--- .../tests => tests/codice}/test_codice_l1a.py | 2 +- .../tests => tests/codice}/test_decompress.py | 0 .../glows}/glows_test_packet_20110921_v01.pkts | Bin .../tests => tests/glows}/test_glows_decom.py | 0 .../tests => tests/glows}/test_glows_l1a_data.py | 0 .../{hi/tests => tests/hi}/__init__.py | 0 .../hi}/l0_test_data/20231030_H45_APP_NHK.bin | Bin .../hi}/l0_test_data/20231030_H45_SCI_CNT.bin | Bin .../hi}/l0_test_data/20231030_H45_SCI_DE.bin | Bin .../tests => tests/hi}/l0_test_data/README.txt | 0 .../l0_validation_data/20231030_H45_APP_NHK.csv | 0 .../{hi/tests => tests/hi}/test_decom.py | 8 ++++---- ...GHT_raw_record_2023_256_15_59_04_apid1251.pkts | Bin ...GHT_raw_record_2023_256_15_59_04_apid1252.pkts | Bin .../{hit/tests => tests/hit}/__init__.py | 0 .../{hit/tests => tests/hit}/test_hit_decom.py | 2 +- .../{ialirt/tests => tests/ialirt}/__init__.py | 0 .../test_data/l0/IALiRT Raw Packet Telemetry.txt | 0 .../tests => tests/ialirt}/unit/__init__.py | 0 .../ialirt}/unit/test_decom_ialirt.py | 2 +- .../{idex/tests => tests/idex}/__init__.py | 0 .../idex}/imap_idex_l0_20230725_v01-00.pkts | Bin .../idex}/impact_14_tof_high_data.txt | 0 .../{idex/tests => tests/idex}/test_decom.py | 4 ++-- .../{idex/tests => tests/idex}/test_l1_cdfs.py | 4 ++-- .../{swe/tests => tests/swe}/__init__.py | 0 .../20230927173238_4th_quarter_decompressed.csv | 0 .../20230927173253_1st_quarter_decompressed.csv | 0 .../20230927173308_2nd_quarter_decompressed.csv | 0 .../20230927173323_3rd_quarter_decompressed.csv | 0 .../swe}/l0_data/20230927100248_SWE_HK_packet.bin | Bin .../swe}/l0_data/20230927100412_SWE_HK_packet.bin | Bin .../l0_data/20230927100425_SWE_CEM_RAW_packet.bin | Bin .../l0_data/20230927100426_SWE_CEM_RAW_packet.bin | Bin .../l0_data/20230927173238_SWE_SCIENCE_packet.bin | Bin .../l0_data/20230927173253_SWE_SCIENCE_packet.bin | Bin .../l0_data/20230927173308_SWE_SCIENCE_packet.bin | Bin .../l0_data/20230927173323_SWE_SCIENCE_packet.bin | Bin .../l0_data/20231004155854_SWE_EVTMSG_packet.bin | Bin .../l0_data/20231004155904_SWE_EVTMSG_packet.bin | Bin .../l0_data/20231004155905_SWE_EVTMSG_packet.bin | Bin .../l0_data/20231004155919_SWE_EVTMSG_packet.bin | Bin .../l0_data/20231004155956_SWE_EVTMSG_packet.bin | Bin .../l0_data/20231004160009_SWE_EVTMSG_packet.bin | Bin .../l0_data/20231004160010_SWE_EVTMSG_packet.bin | Bin .../l0_data/20231004160020_SWE_EVTMSG_packet.bin | Bin .../l0_data/20231004160021_SWE_EVTMSG_packet.bin | Bin .../l0_data/20231004160022_SWE_EVTMSG_packet.bin | Bin .../l0_data/20231004160024_SWE_EVTMSG_packet.bin | Bin .../l0_data/20231004160027_SWE_EVTMSG_packet.bin | Bin .../l0_data/20231004160030_SWE_EVTMSG_packet.bin | Bin .../l0_data/20231004160033_SWE_EVTMSG_packet.bin | Bin .../l0_data/20231004160034_SWE_EVTMSG_packet.bin | Bin .../data_derived.SWE_APP_HK_20230927_094839.csv | 0 .../data_raw.SWE_APP_HK_20230927_094839.csv | 0 .../data_raw.SWE_CEM_RAW_20230927_094839.csv | 0 ...idle_export_eu.SWE_EVTMSG_20231004_140149.xlsx | Bin ...idle_export_eu.SWE_SCIENCE_20230927_172708.csv | 0 ...idle_export_raw.SWE_EVTMSG_20231004_140149.csv | 0 ...dle_export_raw.SWE_SCIENCE_20230927_172708.csv | 0 .../{swe/tests => tests/swe}/test_swe_l1a.py | 2 +- .../tests => tests/swe}/test_swe_l1a_cem_raw.py | 4 ++-- .../tests => tests/swe}/test_swe_l1a_event_msg.py | 4 ++-- .../swe}/test_swe_l1a_housekeeping.py | 8 ++++---- .../tests => tests/swe}/test_swe_l1a_science.py | 14 +++++++------- .../{swe/tests => tests/swe}/test_swe_l1b.py | 12 ++++++------ .../tests => tests/swe}/test_swe_l1b_science.py | 8 ++++---- .../{ultra/tests => tests/ultra}/__init__.py | 0 ..._SwRI_Cal_Run7_ThetaScan_20220530T225054.CCSDS | Bin ...EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv | 0 ...EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv | 0 .../{ultra/tests => tests/ultra}/unit/__init__.py | 0 .../{ultra/tests => tests/ultra}/unit/conftest.py | 6 +++--- .../ultra}/unit/test_decom_apid_880.py | 0 .../ultra}/unit/test_decom_apid_881.py | 0 84 files changed, 44 insertions(+), 44 deletions(-) rename imap_processing/{cdf/tests => tests/cdf}/__init__.py (100%) rename imap_processing/{cdf/tests => tests/cdf}/test_attr_classes.py (100%) rename imap_processing/{codice/tests => tests/codice}/__init__.py (100%) rename imap_processing/{codice/tests => tests/codice}/data/eu_unit_lookup_table.csv (100%) rename imap_processing/{codice/tests => tests/codice}/data/idle_export_eu.COD_NHK_20230822_122700 2.csv (100%) rename imap_processing/{codice/tests => tests/codice}/data/idle_export_raw.COD_NHK_20230822_122700.csv (100%) rename imap_processing/{codice/tests => tests/codice}/data/raw_ccsds_20230822_122700Z_idle.bin (100%) rename imap_processing/{codice/tests => tests/codice}/test_codice_l0.py (96%) rename imap_processing/{codice/tests => tests/codice}/test_codice_l1a.py (95%) rename imap_processing/{codice/tests => tests/codice}/test_decompress.py (100%) rename imap_processing/{glows/tests => tests/glows}/glows_test_packet_20110921_v01.pkts (100%) rename imap_processing/{glows/tests => tests/glows}/test_glows_decom.py (100%) rename imap_processing/{glows/tests => tests/glows}/test_glows_l1a_data.py (100%) rename imap_processing/{hi/tests => tests/hi}/__init__.py (100%) rename imap_processing/{hi/tests => tests/hi}/l0_test_data/20231030_H45_APP_NHK.bin (100%) rename imap_processing/{hi/tests => tests/hi}/l0_test_data/20231030_H45_SCI_CNT.bin (100%) rename imap_processing/{hi/tests => tests/hi}/l0_test_data/20231030_H45_SCI_DE.bin (100%) rename imap_processing/{hi/tests => tests/hi}/l0_test_data/README.txt (100%) rename imap_processing/{hi/tests => tests/hi}/l0_validation_data/20231030_H45_APP_NHK.csv (100%) rename imap_processing/{hi/tests => tests/hi}/test_decom.py (91%) rename imap_processing/{hit/tests => tests/hit}/PREFLIGHT_raw_record_2023_256_15_59_04_apid1251.pkts (100%) rename imap_processing/{hit/tests => tests/hit}/PREFLIGHT_raw_record_2023_256_15_59_04_apid1252.pkts (100%) rename imap_processing/{hit/tests => tests/hit}/__init__.py (100%) rename imap_processing/{hit/tests => tests/hit}/test_hit_decom.py (91%) rename imap_processing/{ialirt/tests => tests/ialirt}/__init__.py (100%) rename imap_processing/{ialirt/tests => tests/ialirt}/test_data/l0/IALiRT Raw Packet Telemetry.txt (100%) rename imap_processing/{ialirt/tests => tests/ialirt}/unit/__init__.py (100%) rename imap_processing/{ialirt/tests => tests/ialirt}/unit/test_decom_ialirt.py (100%) rename imap_processing/{idex/tests => tests/idex}/__init__.py (100%) rename imap_processing/{idex/tests => tests/idex}/imap_idex_l0_20230725_v01-00.pkts (100%) rename imap_processing/{idex/tests => tests/idex}/impact_14_tof_high_data.txt (100%) rename imap_processing/{idex/tests => tests/idex}/test_decom.py (86%) rename imap_processing/{idex/tests => tests/idex}/test_l1_cdfs.py (96%) rename imap_processing/{swe/tests => tests/swe}/__init__.py (100%) rename imap_processing/{swe/tests => tests/swe}/decompressed/20230927173238_4th_quarter_decompressed.csv (100%) rename imap_processing/{swe/tests => tests/swe}/decompressed/20230927173253_1st_quarter_decompressed.csv (100%) rename imap_processing/{swe/tests => tests/swe}/decompressed/20230927173308_2nd_quarter_decompressed.csv (100%) rename imap_processing/{swe/tests => tests/swe}/decompressed/20230927173323_3rd_quarter_decompressed.csv (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20230927100248_SWE_HK_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20230927100412_SWE_HK_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20230927100425_SWE_CEM_RAW_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20230927100426_SWE_CEM_RAW_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20230927173238_SWE_SCIENCE_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20230927173253_SWE_SCIENCE_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20230927173308_SWE_SCIENCE_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20230927173323_SWE_SCIENCE_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20231004155854_SWE_EVTMSG_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20231004155904_SWE_EVTMSG_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20231004155905_SWE_EVTMSG_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20231004155919_SWE_EVTMSG_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20231004155956_SWE_EVTMSG_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20231004160009_SWE_EVTMSG_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20231004160010_SWE_EVTMSG_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20231004160020_SWE_EVTMSG_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20231004160021_SWE_EVTMSG_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20231004160022_SWE_EVTMSG_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20231004160024_SWE_EVTMSG_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20231004160027_SWE_EVTMSG_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20231004160030_SWE_EVTMSG_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20231004160033_SWE_EVTMSG_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_data/20231004160034_SWE_EVTMSG_packet.bin (100%) rename imap_processing/{swe/tests => tests/swe}/l0_validation_data/data_derived.SWE_APP_HK_20230927_094839.csv (100%) rename imap_processing/{swe/tests => tests/swe}/l0_validation_data/data_raw.SWE_APP_HK_20230927_094839.csv (100%) rename imap_processing/{swe/tests => tests/swe}/l0_validation_data/data_raw.SWE_CEM_RAW_20230927_094839.csv (100%) rename imap_processing/{swe/tests => tests/swe}/l0_validation_data/idle_export_eu.SWE_EVTMSG_20231004_140149.xlsx (100%) rename imap_processing/{swe/tests => tests/swe}/l0_validation_data/idle_export_eu.SWE_SCIENCE_20230927_172708.csv (100%) rename imap_processing/{swe/tests => tests/swe}/l0_validation_data/idle_export_raw.SWE_EVTMSG_20231004_140149.csv (100%) rename imap_processing/{swe/tests => tests/swe}/l0_validation_data/idle_export_raw.SWE_SCIENCE_20230927_172708.csv (100%) rename imap_processing/{swe/tests => tests/swe}/test_swe_l1a.py (97%) rename imap_processing/{swe/tests => tests/swe}/test_swe_l1a_cem_raw.py (92%) rename imap_processing/{swe/tests => tests/swe}/test_swe_l1a_event_msg.py (93%) rename imap_processing/{swe/tests => tests/swe}/test_swe_l1a_housekeeping.py (90%) rename imap_processing/{swe/tests => tests/swe}/test_swe_l1a_science.py (92%) rename imap_processing/{swe/tests => tests/swe}/test_swe_l1b.py (93%) rename imap_processing/{swe/tests => tests/swe}/test_swe_l1b_science.py (87%) rename imap_processing/{ultra/tests => tests/ultra}/__init__.py (100%) rename imap_processing/{ultra/tests => tests/ultra}/test_data/l0/Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.CCSDS (100%) rename imap_processing/{ultra/tests => tests/ultra}/test_data/l0/ultra45_raw_sc_auxdata_Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv (100%) rename imap_processing/{ultra/tests => tests/ultra}/test_data/l0/ultra45_raw_sc_ultraimgrates_Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv (100%) rename imap_processing/{ultra/tests => tests/ultra}/unit/__init__.py (100%) rename imap_processing/{ultra/tests => tests/ultra}/unit/conftest.py (100%) rename imap_processing/{ultra/tests => tests/ultra}/unit/test_decom_apid_880.py (100%) rename imap_processing/{ultra/tests => tests/ultra}/unit/test_decom_apid_881.py (100%) diff --git a/imap_processing/idex/idex_packet_parser.py b/imap_processing/idex/idex_packet_parser.py index f9063e76c..98cdc4cbf 100644 --- a/imap_processing/idex/idex_packet_parser.py +++ b/imap_processing/idex/idex_packet_parser.py @@ -46,7 +46,7 @@ class PacketParser: -------- >>> # Print out the data in a L0 file >>> from imap_processing.idex.idex_packet_parser import PacketParser - >>> l0_file = "imap_processing/idex/tests/imap_idex_l0_20230725_v01-00.pkts" + >>> l0_file = "imap_processing/tests/idex/imap_idex_l0_20230725_v01-00.pkts" >>> l1_data = PacketParser(l0_file) >>> l1_data.write_l1_cdf() diff --git a/imap_processing/cdf/tests/__init__.py b/imap_processing/tests/cdf/__init__.py similarity index 100% rename from imap_processing/cdf/tests/__init__.py rename to imap_processing/tests/cdf/__init__.py diff --git a/imap_processing/cdf/tests/test_attr_classes.py b/imap_processing/tests/cdf/test_attr_classes.py similarity index 100% rename from imap_processing/cdf/tests/test_attr_classes.py rename to imap_processing/tests/cdf/test_attr_classes.py diff --git a/imap_processing/codice/tests/__init__.py b/imap_processing/tests/codice/__init__.py similarity index 100% rename from imap_processing/codice/tests/__init__.py rename to imap_processing/tests/codice/__init__.py diff --git a/imap_processing/codice/tests/data/eu_unit_lookup_table.csv b/imap_processing/tests/codice/data/eu_unit_lookup_table.csv similarity index 100% rename from imap_processing/codice/tests/data/eu_unit_lookup_table.csv rename to imap_processing/tests/codice/data/eu_unit_lookup_table.csv diff --git a/imap_processing/codice/tests/data/idle_export_eu.COD_NHK_20230822_122700 2.csv b/imap_processing/tests/codice/data/idle_export_eu.COD_NHK_20230822_122700 2.csv similarity index 100% rename from imap_processing/codice/tests/data/idle_export_eu.COD_NHK_20230822_122700 2.csv rename to imap_processing/tests/codice/data/idle_export_eu.COD_NHK_20230822_122700 2.csv diff --git a/imap_processing/codice/tests/data/idle_export_raw.COD_NHK_20230822_122700.csv b/imap_processing/tests/codice/data/idle_export_raw.COD_NHK_20230822_122700.csv similarity index 100% rename from imap_processing/codice/tests/data/idle_export_raw.COD_NHK_20230822_122700.csv rename to imap_processing/tests/codice/data/idle_export_raw.COD_NHK_20230822_122700.csv diff --git a/imap_processing/codice/tests/data/raw_ccsds_20230822_122700Z_idle.bin b/imap_processing/tests/codice/data/raw_ccsds_20230822_122700Z_idle.bin similarity index 100% rename from imap_processing/codice/tests/data/raw_ccsds_20230822_122700Z_idle.bin rename to imap_processing/tests/codice/data/raw_ccsds_20230822_122700Z_idle.bin diff --git a/imap_processing/codice/tests/test_codice_l0.py b/imap_processing/tests/codice/test_codice_l0.py similarity index 96% rename from imap_processing/codice/tests/test_codice_l0.py rename to imap_processing/tests/codice/test_codice_l0.py index 812ce7840..f15faea81 100644 --- a/imap_processing/codice/tests/test_codice_l0.py +++ b/imap_processing/tests/codice/test_codice_l0.py @@ -24,7 +24,7 @@ def decom_test_data() -> list: """ packet_file = Path( - f"{imap_module_directory}/codice/tests/data/" + f"{imap_module_directory}/tests/codice/data/" f"raw_ccsds_20230822_122700Z_idle.bin" ) Path(f"{imap_module_directory}/codice/packet_definitions/P_COD_NHK.xml") @@ -51,7 +51,7 @@ def validation_data() -> pd.core.frame.DataFrame: # Read in the CSV file validation_file = Path( - f"{imap_module_directory}/codice/tests/data/" + f"{imap_module_directory}/tests/codice/data/" f"idle_export_raw.COD_NHK_20230822_122700.csv" ) validation_data = pd.read_csv(validation_file, index_col="SHCOARSE") @@ -79,7 +79,7 @@ def test_eu_hk_data( l1a_hk_ds = create_dataset(decom_test_data) eu_hk_data = convert_raw_to_eu( l1a_hk_ds, - imap_module_directory / "codice/tests/data/eu_unit_lookup_table.csv", + imap_module_directory / "tests/codice/data/eu_unit_lookup_table.csv", "P_COD_NHK", ) first_data = decom_test_data[0] diff --git a/imap_processing/codice/tests/test_codice_l1a.py b/imap_processing/tests/codice/test_codice_l1a.py similarity index 95% rename from imap_processing/codice/tests/test_codice_l1a.py rename to imap_processing/tests/codice/test_codice_l1a.py index 0b80083ab..39bdd15c5 100644 --- a/imap_processing/codice/tests/test_codice_l1a.py +++ b/imap_processing/tests/codice/test_codice_l1a.py @@ -21,7 +21,7 @@ def l0_test_data() -> list: """ packet_file = Path( - f"{imap_module_directory}/codice/tests/data/" + f"{imap_module_directory}/tests/codice/data/" f"raw_ccsds_20230822_122700Z_idle.bin" ) packets = decom_packets(packet_file) diff --git a/imap_processing/codice/tests/test_decompress.py b/imap_processing/tests/codice/test_decompress.py similarity index 100% rename from imap_processing/codice/tests/test_decompress.py rename to imap_processing/tests/codice/test_decompress.py diff --git a/imap_processing/glows/tests/glows_test_packet_20110921_v01.pkts b/imap_processing/tests/glows/glows_test_packet_20110921_v01.pkts similarity index 100% rename from imap_processing/glows/tests/glows_test_packet_20110921_v01.pkts rename to imap_processing/tests/glows/glows_test_packet_20110921_v01.pkts diff --git a/imap_processing/glows/tests/test_glows_decom.py b/imap_processing/tests/glows/test_glows_decom.py similarity index 100% rename from imap_processing/glows/tests/test_glows_decom.py rename to imap_processing/tests/glows/test_glows_decom.py diff --git a/imap_processing/glows/tests/test_glows_l1a_data.py b/imap_processing/tests/glows/test_glows_l1a_data.py similarity index 100% rename from imap_processing/glows/tests/test_glows_l1a_data.py rename to imap_processing/tests/glows/test_glows_l1a_data.py diff --git a/imap_processing/hi/tests/__init__.py b/imap_processing/tests/hi/__init__.py similarity index 100% rename from imap_processing/hi/tests/__init__.py rename to imap_processing/tests/hi/__init__.py diff --git a/imap_processing/hi/tests/l0_test_data/20231030_H45_APP_NHK.bin b/imap_processing/tests/hi/l0_test_data/20231030_H45_APP_NHK.bin similarity index 100% rename from imap_processing/hi/tests/l0_test_data/20231030_H45_APP_NHK.bin rename to imap_processing/tests/hi/l0_test_data/20231030_H45_APP_NHK.bin diff --git a/imap_processing/hi/tests/l0_test_data/20231030_H45_SCI_CNT.bin b/imap_processing/tests/hi/l0_test_data/20231030_H45_SCI_CNT.bin similarity index 100% rename from imap_processing/hi/tests/l0_test_data/20231030_H45_SCI_CNT.bin rename to imap_processing/tests/hi/l0_test_data/20231030_H45_SCI_CNT.bin diff --git a/imap_processing/hi/tests/l0_test_data/20231030_H45_SCI_DE.bin b/imap_processing/tests/hi/l0_test_data/20231030_H45_SCI_DE.bin similarity index 100% rename from imap_processing/hi/tests/l0_test_data/20231030_H45_SCI_DE.bin rename to imap_processing/tests/hi/l0_test_data/20231030_H45_SCI_DE.bin diff --git a/imap_processing/hi/tests/l0_test_data/README.txt b/imap_processing/tests/hi/l0_test_data/README.txt similarity index 100% rename from imap_processing/hi/tests/l0_test_data/README.txt rename to imap_processing/tests/hi/l0_test_data/README.txt diff --git a/imap_processing/hi/tests/l0_validation_data/20231030_H45_APP_NHK.csv b/imap_processing/tests/hi/l0_validation_data/20231030_H45_APP_NHK.csv similarity index 100% rename from imap_processing/hi/tests/l0_validation_data/20231030_H45_APP_NHK.csv rename to imap_processing/tests/hi/l0_validation_data/20231030_H45_APP_NHK.csv diff --git a/imap_processing/hi/tests/test_decom.py b/imap_processing/tests/hi/test_decom.py similarity index 91% rename from imap_processing/hi/tests/test_decom.py rename to imap_processing/tests/hi/test_decom.py index 1fb81580a..6c3b13a0c 100644 --- a/imap_processing/hi/tests/test_decom.py +++ b/imap_processing/tests/hi/test_decom.py @@ -8,7 +8,7 @@ @pytest.fixture(scope="session") def decom_nhk_data(): """Read test housekeeping data from test folder""" - test_folder_path = "hi/tests/l0_test_data" + test_folder_path = "tests/hi/l0_test_data" packet_file = imap_module_directory / f"{test_folder_path}/20231030_H45_APP_NHK.bin" packet_def_file = imap_module_directory / "hi/packet_definitions/H45_APP_NHK.xml" return decom_packets(packet_file, packet_def_file) @@ -17,7 +17,7 @@ def decom_nhk_data(): @pytest.fixture(scope="session") def nhk_validation_data(): """Read in validation data from the CSV file""" - test_data_path = imap_module_directory / "hi/tests/l0_validation_data" + test_data_path = imap_module_directory / "tests/hi/l0_validation_data" raw_validation_data = pd.read_csv( test_data_path / "20231030_H45_APP_NHK.csv", index_col="CCSDS_MET", @@ -28,7 +28,7 @@ def nhk_validation_data(): @pytest.fixture(scope="session") def decom_sci_de_data(): """Read science direct event data from test folder""" - test_folder_path = "hi/tests/l0_test_data" + test_folder_path = "tests/hi/l0_test_data" packet_file = imap_module_directory / f"{test_folder_path}/20231030_H45_SCI_DE.bin" packet_def_file = imap_module_directory / "hi/packet_definitions/H45_SCI_DE.xml" return decom_packets(packet_file, packet_def_file) @@ -37,7 +37,7 @@ def decom_sci_de_data(): @pytest.fixture(scope="session") def decom_sci_cnt_data(): """Read science count data from test folder""" - test_folder_path = "hi/tests/l0_test_data" + test_folder_path = "tests/hi/l0_test_data" packet_file = imap_module_directory / f"{test_folder_path}/20231030_H45_SCI_CNT.bin" packet_def_file = imap_module_directory / "hi/packet_definitions/H45_SCI_CNT.xml" return decom_packets(packet_file, packet_def_file) diff --git a/imap_processing/hit/tests/PREFLIGHT_raw_record_2023_256_15_59_04_apid1251.pkts b/imap_processing/tests/hit/PREFLIGHT_raw_record_2023_256_15_59_04_apid1251.pkts similarity index 100% rename from imap_processing/hit/tests/PREFLIGHT_raw_record_2023_256_15_59_04_apid1251.pkts rename to imap_processing/tests/hit/PREFLIGHT_raw_record_2023_256_15_59_04_apid1251.pkts diff --git a/imap_processing/hit/tests/PREFLIGHT_raw_record_2023_256_15_59_04_apid1252.pkts b/imap_processing/tests/hit/PREFLIGHT_raw_record_2023_256_15_59_04_apid1252.pkts similarity index 100% rename from imap_processing/hit/tests/PREFLIGHT_raw_record_2023_256_15_59_04_apid1252.pkts rename to imap_processing/tests/hit/PREFLIGHT_raw_record_2023_256_15_59_04_apid1252.pkts diff --git a/imap_processing/hit/tests/__init__.py b/imap_processing/tests/hit/__init__.py similarity index 100% rename from imap_processing/hit/tests/__init__.py rename to imap_processing/tests/hit/__init__.py diff --git a/imap_processing/hit/tests/test_hit_decom.py b/imap_processing/tests/hit/test_hit_decom.py similarity index 91% rename from imap_processing/hit/tests/test_hit_decom.py rename to imap_processing/tests/hit/test_hit_decom.py index e990a877f..7cca2edae 100644 --- a/imap_processing/hit/tests/test_hit_decom.py +++ b/imap_processing/tests/hit/test_hit_decom.py @@ -7,7 +7,7 @@ def decom_test_data(): """Read test data from file""" packet_file = ( - "imap_processing/hit/tests/PREFLIGHT_raw_record_2023_256_15_59_04_apid1251.pkts" + "imap_processing/tests/hit/PREFLIGHT_raw_record_2023_256_15_59_04_apid1251.pkts" ) xtce = "imap_processing/hit/packet_definitions/P_HIT_HSKP.xml" data_packet_list = hit_l1a_decom.decom_hit_packets(packet_file, xtce) diff --git a/imap_processing/ialirt/tests/__init__.py b/imap_processing/tests/ialirt/__init__.py similarity index 100% rename from imap_processing/ialirt/tests/__init__.py rename to imap_processing/tests/ialirt/__init__.py diff --git a/imap_processing/ialirt/tests/test_data/l0/IALiRT Raw Packet Telemetry.txt b/imap_processing/tests/ialirt/test_data/l0/IALiRT Raw Packet Telemetry.txt similarity index 100% rename from imap_processing/ialirt/tests/test_data/l0/IALiRT Raw Packet Telemetry.txt rename to imap_processing/tests/ialirt/test_data/l0/IALiRT Raw Packet Telemetry.txt diff --git a/imap_processing/ialirt/tests/unit/__init__.py b/imap_processing/tests/ialirt/unit/__init__.py similarity index 100% rename from imap_processing/ialirt/tests/unit/__init__.py rename to imap_processing/tests/ialirt/unit/__init__.py diff --git a/imap_processing/ialirt/tests/unit/test_decom_ialirt.py b/imap_processing/tests/ialirt/unit/test_decom_ialirt.py similarity index 100% rename from imap_processing/ialirt/tests/unit/test_decom_ialirt.py rename to imap_processing/tests/ialirt/unit/test_decom_ialirt.py index 58146d850..b478241d8 100644 --- a/imap_processing/ialirt/tests/unit/test_decom_ialirt.py +++ b/imap_processing/tests/ialirt/unit/test_decom_ialirt.py @@ -22,8 +22,8 @@ def binary_packet_path(tmp_path): """ packet_path = ( imap_module_directory - / "ialirt" / "tests" + / "ialirt" / "test_data" / "l0" / "IALiRT Raw Packet Telemetry.txt" diff --git a/imap_processing/idex/tests/__init__.py b/imap_processing/tests/idex/__init__.py similarity index 100% rename from imap_processing/idex/tests/__init__.py rename to imap_processing/tests/idex/__init__.py diff --git a/imap_processing/idex/tests/imap_idex_l0_20230725_v01-00.pkts b/imap_processing/tests/idex/imap_idex_l0_20230725_v01-00.pkts similarity index 100% rename from imap_processing/idex/tests/imap_idex_l0_20230725_v01-00.pkts rename to imap_processing/tests/idex/imap_idex_l0_20230725_v01-00.pkts diff --git a/imap_processing/idex/tests/impact_14_tof_high_data.txt b/imap_processing/tests/idex/impact_14_tof_high_data.txt similarity index 100% rename from imap_processing/idex/tests/impact_14_tof_high_data.txt rename to imap_processing/tests/idex/impact_14_tof_high_data.txt diff --git a/imap_processing/idex/tests/test_decom.py b/imap_processing/tests/idex/test_decom.py similarity index 86% rename from imap_processing/idex/tests/test_decom.py rename to imap_processing/tests/idex/test_decom.py index 7fe205af8..403c39185 100644 --- a/imap_processing/idex/tests/test_decom.py +++ b/imap_processing/tests/idex/test_decom.py @@ -6,7 +6,7 @@ @pytest.fixture(scope="session") def decom_test_data(): - return PacketParser("imap_processing/idex/tests/imap_idex_l0_20230725_v01-00.pkts") + return PacketParser("imap_processing/tests/idex/imap_idex_l0_20230725_v01-00.pkts") def test_idex_decom_length(decom_test_data): @@ -23,6 +23,6 @@ def test_idex_decom_event_num(decom_test_data): def test_idex_tof_high_data(decom_test_data): # Verify that a sample of the data is correct # impact_14_tof_high_data.txt has been verified correct by the IDEX team - with open("imap_processing/idex/tests/impact_14_tof_high_data.txt") as f: + with open("imap_processing/tests/idex/impact_14_tof_high_data.txt") as f: data = np.array([int(line.rstrip("\n")) for line in f]) assert (decom_test_data.data["TOF_High"][13].data == data).all() diff --git a/imap_processing/idex/tests/test_l1_cdfs.py b/imap_processing/tests/idex/test_l1_cdfs.py similarity index 96% rename from imap_processing/idex/tests/test_l1_cdfs.py rename to imap_processing/tests/idex/test_l1_cdfs.py index afe9f213f..ea36e38cc 100644 --- a/imap_processing/idex/tests/test_l1_cdfs.py +++ b/imap_processing/tests/idex/test_l1_cdfs.py @@ -14,7 +14,7 @@ @pytest.fixture() def decom_test_data(): - return PacketParser("imap_processing/idex/tests/imap_idex_l0_20230725_v01-00.pkts") + return PacketParser("imap_processing/tests/idex/imap_idex_l0_20230725_v01-00.pkts") @pytest.fixture() @@ -85,7 +85,7 @@ def test_descriptor_in_file_name(decom_test_data, temp_path): def test_idex_tof_high_data_from_cdf(decom_test_data, temp_path): # Verify that a sample of the data is correct inside the CDF file # impact_14_tof_high_data.txt has been verified correct by the IDEX team - with open("imap_processing/idex/tests/impact_14_tof_high_data.txt") as f: + with open("imap_processing/tests/idex/impact_14_tof_high_data.txt") as f: data = np.array([int(line.rstrip()) for line in f]) file_name = write_cdf(decom_test_data.data, description="", directory=temp_path) diff --git a/imap_processing/swe/tests/__init__.py b/imap_processing/tests/swe/__init__.py similarity index 100% rename from imap_processing/swe/tests/__init__.py rename to imap_processing/tests/swe/__init__.py diff --git a/imap_processing/swe/tests/decompressed/20230927173238_4th_quarter_decompressed.csv b/imap_processing/tests/swe/decompressed/20230927173238_4th_quarter_decompressed.csv similarity index 100% rename from imap_processing/swe/tests/decompressed/20230927173238_4th_quarter_decompressed.csv rename to imap_processing/tests/swe/decompressed/20230927173238_4th_quarter_decompressed.csv diff --git a/imap_processing/swe/tests/decompressed/20230927173253_1st_quarter_decompressed.csv b/imap_processing/tests/swe/decompressed/20230927173253_1st_quarter_decompressed.csv similarity index 100% rename from imap_processing/swe/tests/decompressed/20230927173253_1st_quarter_decompressed.csv rename to imap_processing/tests/swe/decompressed/20230927173253_1st_quarter_decompressed.csv diff --git a/imap_processing/swe/tests/decompressed/20230927173308_2nd_quarter_decompressed.csv b/imap_processing/tests/swe/decompressed/20230927173308_2nd_quarter_decompressed.csv similarity index 100% rename from imap_processing/swe/tests/decompressed/20230927173308_2nd_quarter_decompressed.csv rename to imap_processing/tests/swe/decompressed/20230927173308_2nd_quarter_decompressed.csv diff --git a/imap_processing/swe/tests/decompressed/20230927173323_3rd_quarter_decompressed.csv b/imap_processing/tests/swe/decompressed/20230927173323_3rd_quarter_decompressed.csv similarity index 100% rename from imap_processing/swe/tests/decompressed/20230927173323_3rd_quarter_decompressed.csv rename to imap_processing/tests/swe/decompressed/20230927173323_3rd_quarter_decompressed.csv diff --git a/imap_processing/swe/tests/l0_data/20230927100248_SWE_HK_packet.bin b/imap_processing/tests/swe/l0_data/20230927100248_SWE_HK_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20230927100248_SWE_HK_packet.bin rename to imap_processing/tests/swe/l0_data/20230927100248_SWE_HK_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20230927100412_SWE_HK_packet.bin b/imap_processing/tests/swe/l0_data/20230927100412_SWE_HK_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20230927100412_SWE_HK_packet.bin rename to imap_processing/tests/swe/l0_data/20230927100412_SWE_HK_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20230927100425_SWE_CEM_RAW_packet.bin b/imap_processing/tests/swe/l0_data/20230927100425_SWE_CEM_RAW_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20230927100425_SWE_CEM_RAW_packet.bin rename to imap_processing/tests/swe/l0_data/20230927100425_SWE_CEM_RAW_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20230927100426_SWE_CEM_RAW_packet.bin b/imap_processing/tests/swe/l0_data/20230927100426_SWE_CEM_RAW_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20230927100426_SWE_CEM_RAW_packet.bin rename to imap_processing/tests/swe/l0_data/20230927100426_SWE_CEM_RAW_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20230927173238_SWE_SCIENCE_packet.bin b/imap_processing/tests/swe/l0_data/20230927173238_SWE_SCIENCE_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20230927173238_SWE_SCIENCE_packet.bin rename to imap_processing/tests/swe/l0_data/20230927173238_SWE_SCIENCE_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20230927173253_SWE_SCIENCE_packet.bin b/imap_processing/tests/swe/l0_data/20230927173253_SWE_SCIENCE_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20230927173253_SWE_SCIENCE_packet.bin rename to imap_processing/tests/swe/l0_data/20230927173253_SWE_SCIENCE_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20230927173308_SWE_SCIENCE_packet.bin b/imap_processing/tests/swe/l0_data/20230927173308_SWE_SCIENCE_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20230927173308_SWE_SCIENCE_packet.bin rename to imap_processing/tests/swe/l0_data/20230927173308_SWE_SCIENCE_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20230927173323_SWE_SCIENCE_packet.bin b/imap_processing/tests/swe/l0_data/20230927173323_SWE_SCIENCE_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20230927173323_SWE_SCIENCE_packet.bin rename to imap_processing/tests/swe/l0_data/20230927173323_SWE_SCIENCE_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20231004155854_SWE_EVTMSG_packet.bin b/imap_processing/tests/swe/l0_data/20231004155854_SWE_EVTMSG_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20231004155854_SWE_EVTMSG_packet.bin rename to imap_processing/tests/swe/l0_data/20231004155854_SWE_EVTMSG_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20231004155904_SWE_EVTMSG_packet.bin b/imap_processing/tests/swe/l0_data/20231004155904_SWE_EVTMSG_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20231004155904_SWE_EVTMSG_packet.bin rename to imap_processing/tests/swe/l0_data/20231004155904_SWE_EVTMSG_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20231004155905_SWE_EVTMSG_packet.bin b/imap_processing/tests/swe/l0_data/20231004155905_SWE_EVTMSG_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20231004155905_SWE_EVTMSG_packet.bin rename to imap_processing/tests/swe/l0_data/20231004155905_SWE_EVTMSG_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20231004155919_SWE_EVTMSG_packet.bin b/imap_processing/tests/swe/l0_data/20231004155919_SWE_EVTMSG_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20231004155919_SWE_EVTMSG_packet.bin rename to imap_processing/tests/swe/l0_data/20231004155919_SWE_EVTMSG_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20231004155956_SWE_EVTMSG_packet.bin b/imap_processing/tests/swe/l0_data/20231004155956_SWE_EVTMSG_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20231004155956_SWE_EVTMSG_packet.bin rename to imap_processing/tests/swe/l0_data/20231004155956_SWE_EVTMSG_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20231004160009_SWE_EVTMSG_packet.bin b/imap_processing/tests/swe/l0_data/20231004160009_SWE_EVTMSG_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20231004160009_SWE_EVTMSG_packet.bin rename to imap_processing/tests/swe/l0_data/20231004160009_SWE_EVTMSG_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20231004160010_SWE_EVTMSG_packet.bin b/imap_processing/tests/swe/l0_data/20231004160010_SWE_EVTMSG_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20231004160010_SWE_EVTMSG_packet.bin rename to imap_processing/tests/swe/l0_data/20231004160010_SWE_EVTMSG_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20231004160020_SWE_EVTMSG_packet.bin b/imap_processing/tests/swe/l0_data/20231004160020_SWE_EVTMSG_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20231004160020_SWE_EVTMSG_packet.bin rename to imap_processing/tests/swe/l0_data/20231004160020_SWE_EVTMSG_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20231004160021_SWE_EVTMSG_packet.bin b/imap_processing/tests/swe/l0_data/20231004160021_SWE_EVTMSG_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20231004160021_SWE_EVTMSG_packet.bin rename to imap_processing/tests/swe/l0_data/20231004160021_SWE_EVTMSG_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20231004160022_SWE_EVTMSG_packet.bin b/imap_processing/tests/swe/l0_data/20231004160022_SWE_EVTMSG_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20231004160022_SWE_EVTMSG_packet.bin rename to imap_processing/tests/swe/l0_data/20231004160022_SWE_EVTMSG_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20231004160024_SWE_EVTMSG_packet.bin b/imap_processing/tests/swe/l0_data/20231004160024_SWE_EVTMSG_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20231004160024_SWE_EVTMSG_packet.bin rename to imap_processing/tests/swe/l0_data/20231004160024_SWE_EVTMSG_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20231004160027_SWE_EVTMSG_packet.bin b/imap_processing/tests/swe/l0_data/20231004160027_SWE_EVTMSG_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20231004160027_SWE_EVTMSG_packet.bin rename to imap_processing/tests/swe/l0_data/20231004160027_SWE_EVTMSG_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20231004160030_SWE_EVTMSG_packet.bin b/imap_processing/tests/swe/l0_data/20231004160030_SWE_EVTMSG_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20231004160030_SWE_EVTMSG_packet.bin rename to imap_processing/tests/swe/l0_data/20231004160030_SWE_EVTMSG_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20231004160033_SWE_EVTMSG_packet.bin b/imap_processing/tests/swe/l0_data/20231004160033_SWE_EVTMSG_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20231004160033_SWE_EVTMSG_packet.bin rename to imap_processing/tests/swe/l0_data/20231004160033_SWE_EVTMSG_packet.bin diff --git a/imap_processing/swe/tests/l0_data/20231004160034_SWE_EVTMSG_packet.bin b/imap_processing/tests/swe/l0_data/20231004160034_SWE_EVTMSG_packet.bin similarity index 100% rename from imap_processing/swe/tests/l0_data/20231004160034_SWE_EVTMSG_packet.bin rename to imap_processing/tests/swe/l0_data/20231004160034_SWE_EVTMSG_packet.bin diff --git a/imap_processing/swe/tests/l0_validation_data/data_derived.SWE_APP_HK_20230927_094839.csv b/imap_processing/tests/swe/l0_validation_data/data_derived.SWE_APP_HK_20230927_094839.csv similarity index 100% rename from imap_processing/swe/tests/l0_validation_data/data_derived.SWE_APP_HK_20230927_094839.csv rename to imap_processing/tests/swe/l0_validation_data/data_derived.SWE_APP_HK_20230927_094839.csv diff --git a/imap_processing/swe/tests/l0_validation_data/data_raw.SWE_APP_HK_20230927_094839.csv b/imap_processing/tests/swe/l0_validation_data/data_raw.SWE_APP_HK_20230927_094839.csv similarity index 100% rename from imap_processing/swe/tests/l0_validation_data/data_raw.SWE_APP_HK_20230927_094839.csv rename to imap_processing/tests/swe/l0_validation_data/data_raw.SWE_APP_HK_20230927_094839.csv diff --git a/imap_processing/swe/tests/l0_validation_data/data_raw.SWE_CEM_RAW_20230927_094839.csv b/imap_processing/tests/swe/l0_validation_data/data_raw.SWE_CEM_RAW_20230927_094839.csv similarity index 100% rename from imap_processing/swe/tests/l0_validation_data/data_raw.SWE_CEM_RAW_20230927_094839.csv rename to imap_processing/tests/swe/l0_validation_data/data_raw.SWE_CEM_RAW_20230927_094839.csv diff --git a/imap_processing/swe/tests/l0_validation_data/idle_export_eu.SWE_EVTMSG_20231004_140149.xlsx b/imap_processing/tests/swe/l0_validation_data/idle_export_eu.SWE_EVTMSG_20231004_140149.xlsx similarity index 100% rename from imap_processing/swe/tests/l0_validation_data/idle_export_eu.SWE_EVTMSG_20231004_140149.xlsx rename to imap_processing/tests/swe/l0_validation_data/idle_export_eu.SWE_EVTMSG_20231004_140149.xlsx diff --git a/imap_processing/swe/tests/l0_validation_data/idle_export_eu.SWE_SCIENCE_20230927_172708.csv b/imap_processing/tests/swe/l0_validation_data/idle_export_eu.SWE_SCIENCE_20230927_172708.csv similarity index 100% rename from imap_processing/swe/tests/l0_validation_data/idle_export_eu.SWE_SCIENCE_20230927_172708.csv rename to imap_processing/tests/swe/l0_validation_data/idle_export_eu.SWE_SCIENCE_20230927_172708.csv diff --git a/imap_processing/swe/tests/l0_validation_data/idle_export_raw.SWE_EVTMSG_20231004_140149.csv b/imap_processing/tests/swe/l0_validation_data/idle_export_raw.SWE_EVTMSG_20231004_140149.csv similarity index 100% rename from imap_processing/swe/tests/l0_validation_data/idle_export_raw.SWE_EVTMSG_20231004_140149.csv rename to imap_processing/tests/swe/l0_validation_data/idle_export_raw.SWE_EVTMSG_20231004_140149.csv diff --git a/imap_processing/swe/tests/l0_validation_data/idle_export_raw.SWE_SCIENCE_20230927_172708.csv b/imap_processing/tests/swe/l0_validation_data/idle_export_raw.SWE_SCIENCE_20230927_172708.csv similarity index 100% rename from imap_processing/swe/tests/l0_validation_data/idle_export_raw.SWE_SCIENCE_20230927_172708.csv rename to imap_processing/tests/swe/l0_validation_data/idle_export_raw.SWE_SCIENCE_20230927_172708.csv diff --git a/imap_processing/swe/tests/test_swe_l1a.py b/imap_processing/tests/swe/test_swe_l1a.py similarity index 97% rename from imap_processing/swe/tests/test_swe_l1a.py rename to imap_processing/tests/swe/test_swe_l1a.py index 85c2c7e1d..7401db307 100644 --- a/imap_processing/swe/tests/test_swe_l1a.py +++ b/imap_processing/tests/swe/test_swe_l1a.py @@ -14,7 +14,7 @@ @pytest.fixture(scope="session") def decom_test_data(): """Read test data from test folder""" - test_folder_path = "swe/tests/l0_data" + test_folder_path = "tests/swe/l0_data" packet_files = list(imap_module_directory.glob(f"{test_folder_path}/*.bin")) data_list = [] diff --git a/imap_processing/swe/tests/test_swe_l1a_cem_raw.py b/imap_processing/tests/swe/test_swe_l1a_cem_raw.py similarity index 92% rename from imap_processing/swe/tests/test_swe_l1a_cem_raw.py rename to imap_processing/tests/swe/test_swe_l1a_cem_raw.py index 1e43cc5a8..193eef5d3 100644 --- a/imap_processing/swe/tests/test_swe_l1a_cem_raw.py +++ b/imap_processing/tests/swe/test_swe_l1a_cem_raw.py @@ -8,7 +8,7 @@ @pytest.fixture(scope="session") def decom_test_data(): """Read test data from file""" - test_folder_path = imap_module_directory / "swe/tests/l0_data" + test_folder_path = imap_module_directory / "tests/swe/l0_data" packet_1_file = test_folder_path / "20230927100425_SWE_CEM_RAW_packet.bin" packet_2_file = test_folder_path / "20230927100426_SWE_CEM_RAW_packet.bin" first_data = decom_swe.decom_packets(packet_1_file) @@ -26,7 +26,7 @@ def test_number_of_packets(decom_test_data): def test_swe_raw_cem_data(decom_test_data): """This test and validate raw data of SWE raw CEM data.""" # read validation data - test_data_path = imap_module_directory / "swe/tests/l0_validation_data" + test_data_path = imap_module_directory / "tests/swe/l0_validation_data" raw_validation_data = pd.read_csv( test_data_path / "data_raw.SWE_CEM_RAW_20230927_094839.csv", index_col="SHCOARSE", diff --git a/imap_processing/swe/tests/test_swe_l1a_event_msg.py b/imap_processing/tests/swe/test_swe_l1a_event_msg.py similarity index 93% rename from imap_processing/swe/tests/test_swe_l1a_event_msg.py rename to imap_processing/tests/swe/test_swe_l1a_event_msg.py index ceb4759c5..3906e3081 100644 --- a/imap_processing/swe/tests/test_swe_l1a_event_msg.py +++ b/imap_processing/tests/swe/test_swe_l1a_event_msg.py @@ -8,7 +8,7 @@ @pytest.fixture(scope="session") def decom_test_data(): """Read test data from file""" - test_folder_path = "swe/tests/l0_data" + test_folder_path = "tests/swe/l0_data" event_file_list = list( imap_module_directory.glob(f"{test_folder_path}/*SWE_EVTMSG_packet.bin") ) @@ -28,7 +28,7 @@ def test_number_of_packets(decom_test_data): def test_swe_event_msg_data(decom_test_data): """This test and validate raw data of SWE event message data.""" # read validation data - test_data_path = imap_module_directory / "swe/tests/l0_validation_data" + test_data_path = imap_module_directory / "tests/swe/l0_validation_data" raw_validation_data = pd.read_csv( test_data_path / "idle_export_raw.SWE_EVTMSG_20231004_140149.csv", diff --git a/imap_processing/swe/tests/test_swe_l1a_housekeeping.py b/imap_processing/tests/swe/test_swe_l1a_housekeeping.py similarity index 90% rename from imap_processing/swe/tests/test_swe_l1a_housekeeping.py rename to imap_processing/tests/swe/test_swe_l1a_housekeeping.py index bfc234edb..d50149665 100644 --- a/imap_processing/swe/tests/test_swe_l1a_housekeeping.py +++ b/imap_processing/tests/swe/test_swe_l1a_housekeeping.py @@ -9,10 +9,10 @@ def decom_test_data(): """Read test data from file""" packet_1_file = ( - imap_module_directory / "swe/tests/l0_data/20230927100248_SWE_HK_packet.bin" + imap_module_directory / "tests/swe/l0_data/20230927100248_SWE_HK_packet.bin" ) packet_2_file = ( - imap_module_directory / "swe/tests/l0_data/20230927100412_SWE_HK_packet.bin" + imap_module_directory / "tests/swe/l0_data/20230927100412_SWE_HK_packet.bin" ) first_data = decom_swe.decom_packets(packet_1_file) second_data = decom_swe.decom_packets(packet_2_file) @@ -29,7 +29,7 @@ def test_number_of_packets(decom_test_data): def test_swe_raw_housekeeping_data(decom_test_data): """This test and validate raw and derived data of SWE housekeeping data.""" # read validation data - test_data_path = imap_module_directory / "swe/tests/l0_validation_data" + test_data_path = imap_module_directory / "tests/swe/l0_validation_data" raw_validation_data = pd.read_csv( test_data_path / "data_raw.SWE_APP_HK_20230927_094839.csv", index_col="SHCOARSE", @@ -51,7 +51,7 @@ def test_swe_raw_housekeeping_data(decom_test_data): def test_swe_derived_housekeeping_data(decom_test_data): """This test and validate derived data of SWE housekeeping data.""" # read validation data - test_data_path = imap_module_directory / "swe/tests/l0_validation_data" + test_data_path = imap_module_directory / "tests/swe/l0_validation_data" derived_validation_data = pd.read_csv( test_data_path / "data_derived.SWE_APP_HK_20230927_094839.csv", index_col="SHCOARSE", diff --git a/imap_processing/swe/tests/test_swe_l1a_science.py b/imap_processing/tests/swe/test_swe_l1a_science.py similarity index 92% rename from imap_processing/swe/tests/test_swe_l1a_science.py rename to imap_processing/tests/swe/test_swe_l1a_science.py index 0ca4895e4..49395f7fe 100644 --- a/imap_processing/swe/tests/test_swe_l1a_science.py +++ b/imap_processing/tests/swe/test_swe_l1a_science.py @@ -19,13 +19,13 @@ def decom_test_data(): # reorder to match the order of spin in the data packet_files = [ imap_module_directory - / "swe/tests/l0_data/20230927173253_SWE_SCIENCE_packet.bin", + / "tests/swe/l0_data/20230927173253_SWE_SCIENCE_packet.bin", imap_module_directory - / "swe/tests/l0_data/20230927173308_SWE_SCIENCE_packet.bin", + / "tests/swe/l0_data/20230927173308_SWE_SCIENCE_packet.bin", imap_module_directory - / "swe/tests/l0_data/20230927173323_SWE_SCIENCE_packet.bin", + / "tests/swe/l0_data/20230927173323_SWE_SCIENCE_packet.bin", imap_module_directory - / "swe/tests/l0_data/20230927173238_SWE_SCIENCE_packet.bin", + / "tests/swe/l0_data/20230927173238_SWE_SCIENCE_packet.bin", ] data_list = [] for packet_file in packet_files: @@ -50,7 +50,7 @@ def test_decompress_algorithm(): def test_swe_raw_science_data(decom_test_data): """This test and validate raw and derived data of SWE science data.""" # read validation data - test_data_path = imap_module_directory / "swe/tests/l0_validation_data" + test_data_path = imap_module_directory / "tests/swe/l0_validation_data" raw_validation_data = pd.read_csv( test_data_path / "idle_export_raw.SWE_SCIENCE_20230927_172708.csv", index_col="SHCOARSE", @@ -74,7 +74,7 @@ def test_swe_raw_science_data(decom_test_data): def test_swe_derived_science_data(decom_test_data): """This test and validate raw and derived data of SWE science data.""" # read validation data - test_data_path = imap_module_directory / "swe/tests/l0_validation_data" + test_data_path = imap_module_directory / "tests/swe/l0_validation_data" derived_validation_data = pd.read_csv( test_data_path / "idle_export_eu.SWE_SCIENCE_20230927_172708.csv", index_col="SHCOARSE", @@ -132,7 +132,7 @@ def test_swe_science_algorithm(decom_test_data): def test_decompress_counts(decom_test_data): """Test decompress counts.""" - test_data_path = imap_module_directory / "swe/tests/decompressed" + test_data_path = imap_module_directory / "tests/swe/decompressed" filepaths = [ "20230927173253_1st_quarter_decompressed.csv", "20230927173308_2nd_quarter_decompressed.csv", diff --git a/imap_processing/swe/tests/test_swe_l1b.py b/imap_processing/tests/swe/test_swe_l1b.py similarity index 93% rename from imap_processing/swe/tests/test_swe_l1b.py rename to imap_processing/tests/swe/test_swe_l1b.py index fcf9855bf..266fec13a 100644 --- a/imap_processing/swe/tests/test_swe_l1b.py +++ b/imap_processing/tests/swe/test_swe_l1b.py @@ -19,7 +19,7 @@ @pytest.fixture(scope="session") def decom_test_data(): """Read test data from test folder""" - test_folder_path = "swe/tests/l0_data" + test_folder_path = "tests/swe/l0_data" packet_files = list(imap_module_directory.glob(f"{test_folder_path}/*.bin")) data_list = [] @@ -40,13 +40,13 @@ def l1a_test_data(): # moved packet 1 to bottom to show data in order. packet_files = [ imap_module_directory - / "swe/tests/l0_data/20230927173253_SWE_SCIENCE_packet.bin", + / "tests/swe/l0_data/20230927173253_SWE_SCIENCE_packet.bin", imap_module_directory - / "swe/tests/l0_data/20230927173308_SWE_SCIENCE_packet.bin", + / "tests/swe/l0_data/20230927173308_SWE_SCIENCE_packet.bin", imap_module_directory - / "swe/tests/l0_data/20230927173323_SWE_SCIENCE_packet.bin", + / "tests/swe/l0_data/20230927173323_SWE_SCIENCE_packet.bin", imap_module_directory - / "swe/tests/l0_data/20230927173238_SWE_SCIENCE_packet.bin", + / "tests/swe/l0_data/20230927173238_SWE_SCIENCE_packet.bin", ] data = [] for packet_file in packet_files: @@ -90,7 +90,7 @@ def test_swe_l1b(decom_test_data): ) # read science validation data - test_data_path = imap_module_directory / "swe/tests/l0_validation_data" + test_data_path = imap_module_directory / "tests/swe/l0_validation_data" eu_validation_data = pd.read_csv( test_data_path / "idle_export_eu.SWE_SCIENCE_20230927_172708.csv", index_col="SHCOARSE", diff --git a/imap_processing/swe/tests/test_swe_l1b_science.py b/imap_processing/tests/swe/test_swe_l1b_science.py similarity index 87% rename from imap_processing/swe/tests/test_swe_l1b_science.py rename to imap_processing/tests/swe/test_swe_l1b_science.py index d28959c98..e63870351 100644 --- a/imap_processing/swe/tests/test_swe_l1b_science.py +++ b/imap_processing/tests/swe/test_swe_l1b_science.py @@ -21,13 +21,13 @@ def l1a_test_data(): # moved packet 1 to bottom to show data in order. packet_files = [ imap_module_directory - / "swe/tests/l0_data/20230927173253_SWE_SCIENCE_packet.bin", + / "tests/swe/l0_data/20230927173253_SWE_SCIENCE_packet.bin", imap_module_directory - / "swe/tests/l0_data/20230927173308_SWE_SCIENCE_packet.bin", + / "tests/swe/l0_data/20230927173308_SWE_SCIENCE_packet.bin", imap_module_directory - / "swe/tests/l0_data/20230927173323_SWE_SCIENCE_packet.bin", + / "tests/swe/l0_data/20230927173323_SWE_SCIENCE_packet.bin", imap_module_directory - / "swe/tests/l0_data/20230927173238_SWE_SCIENCE_packet.bin", + / "tests/swe/l0_data/20230927173238_SWE_SCIENCE_packet.bin", ] data = [] for packet_file in packet_files: diff --git a/imap_processing/ultra/tests/__init__.py b/imap_processing/tests/ultra/__init__.py similarity index 100% rename from imap_processing/ultra/tests/__init__.py rename to imap_processing/tests/ultra/__init__.py diff --git a/imap_processing/ultra/tests/test_data/l0/Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.CCSDS b/imap_processing/tests/ultra/test_data/l0/Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.CCSDS similarity index 100% rename from imap_processing/ultra/tests/test_data/l0/Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.CCSDS rename to imap_processing/tests/ultra/test_data/l0/Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.CCSDS diff --git a/imap_processing/ultra/tests/test_data/l0/ultra45_raw_sc_auxdata_Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv b/imap_processing/tests/ultra/test_data/l0/ultra45_raw_sc_auxdata_Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv similarity index 100% rename from imap_processing/ultra/tests/test_data/l0/ultra45_raw_sc_auxdata_Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv rename to imap_processing/tests/ultra/test_data/l0/ultra45_raw_sc_auxdata_Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv diff --git a/imap_processing/ultra/tests/test_data/l0/ultra45_raw_sc_ultraimgrates_Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv b/imap_processing/tests/ultra/test_data/l0/ultra45_raw_sc_ultraimgrates_Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv similarity index 100% rename from imap_processing/ultra/tests/test_data/l0/ultra45_raw_sc_ultraimgrates_Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv rename to imap_processing/tests/ultra/test_data/l0/ultra45_raw_sc_ultraimgrates_Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv diff --git a/imap_processing/ultra/tests/unit/__init__.py b/imap_processing/tests/ultra/unit/__init__.py similarity index 100% rename from imap_processing/ultra/tests/unit/__init__.py rename to imap_processing/tests/ultra/unit/__init__.py diff --git a/imap_processing/ultra/tests/unit/conftest.py b/imap_processing/tests/ultra/unit/conftest.py similarity index 100% rename from imap_processing/ultra/tests/unit/conftest.py rename to imap_processing/tests/ultra/unit/conftest.py index c62a3a22e..83a84cda6 100644 --- a/imap_processing/ultra/tests/unit/conftest.py +++ b/imap_processing/tests/ultra/unit/conftest.py @@ -10,8 +10,8 @@ def ccsds_path(): """Returns the ccsds directory.""" return ( Path(sys.modules[__name__.split(".")[0]].__file__).parent - / "ultra" / "tests" + / "ultra" / "test_data" / "l0" / "Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.CCSDS" @@ -60,8 +60,8 @@ def xtce_image_rates_test_path(): ) return ( Path(sys.modules[__name__.split(".")[0]].__file__).parent - / "ultra" / "tests" + / "ultra" / "test_data" / "l0" / filename @@ -77,8 +77,8 @@ def xtce_aux_test_path(): ) return ( Path(sys.modules[__name__.split(".")[0]].__file__).parent - / "ultra" / "tests" + / "ultra" / "test_data" / "l0" / filename diff --git a/imap_processing/ultra/tests/unit/test_decom_apid_880.py b/imap_processing/tests/ultra/unit/test_decom_apid_880.py similarity index 100% rename from imap_processing/ultra/tests/unit/test_decom_apid_880.py rename to imap_processing/tests/ultra/unit/test_decom_apid_880.py diff --git a/imap_processing/ultra/tests/unit/test_decom_apid_881.py b/imap_processing/tests/ultra/unit/test_decom_apid_881.py similarity index 100% rename from imap_processing/ultra/tests/unit/test_decom_apid_881.py rename to imap_processing/tests/ultra/unit/test_decom_apid_881.py