Loading CHANGELOG.md +2 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,8 @@ release. ## [Unreleased] ### Added - Adds support for LO [#11](ihttps://github.com/DOI-USGS/SpiceQL/issues/11) - Adds support for LO [#11](https://github.com/DOI-USGS/SpiceQL/issues/11) - Adds support for Smart1 [#16](https://github.com/DOI-USGS/SpiceQL/issues/16) ### Fixed Loading CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ if(SPICEQL_BUILD_LIB) ${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/mgs.json ${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/mro.json ${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/odyssey.json ${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/smart1.json ${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/tgo.json ${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/viking1.json ${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/viking2.json) Loading SpiceQL/db/smart1.json 0 → 100644 +33 −0 Original line number Diff line number Diff line { "smart1": { "ck": { "reconstructed": { "kernels": ["ATNS_P[0-9]{12}_[0-9]{5}.BC$"] } }, "fk": { "kernels": ["SMART1_V[0-9]{0,4}.TF$"] }, "ik": { "kernels": ["SMART1_AMIE_V[0-9]{2}.TI$"] }, "lsk": { "kernels": ["naif[0-9]{4}.tls$"] }, "pck": { "kernels": ["PCK[0-9]{5}.TPC$"] }, "sclk": { "kernels": ["SMART1_[0-9]{6}_STEP.TSC$"] }, "spk": { "reconstructed": { "kernels": ["ORMS__[0-9]{12}_[0-9]{5}.BSP$"] }, "predicted": { "kernels": ["ORMS_______________[0-9]{5}.BSP$"] } }, "deps" : ["/base/pck"] } } No newline at end of file SpiceQL/tests/FunctionalTestsConfig.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ using namespace SpiceQL; TEST_F(TestConfig, FunctionalTestConfigConstruct) { json megaConfig = testConfig.globalConf(); EXPECT_EQ(megaConfig.size(), 63); EXPECT_EQ(megaConfig.size(), 64); } TEST_F(TestConfig, FunctionalTestConfigEval) { Loading Loading @@ -149,7 +149,7 @@ TEST_F(TestConfig, FunctionalTestsConfigGetRecursive) { json resJson = testConfig.getRecursive("sclk"); EXPECT_EQ(resJson.size(), 57); EXPECT_EQ(resJson.size(), 58); for (auto &[key, val] : resJson.items()) { EXPECT_TRUE(val.contains("sclk")); } Loading SpiceQL/tests/QueryTests.cpp +42 −0 Original line number Diff line number Diff line Loading @@ -556,4 +556,46 @@ TEST_F(IsisDataDirectory, FunctionalTestListMissionKernelsLo) { expected = {"lo_fict.tsc", "lo_fict1.tsc","lo_fict2.tsc","lo_fict3.tsc","lo_fict4.tsc","lo_fict5.tsc"}; CompareKernelSets(getKernelsAsVector(res.at("lo").at("sclk")), expected); } TEST_F(IsisDataDirectory, FunctionalTestListMissionKernelsSmart1) { fs::path dbPath = getMissionConfigFile("smart1"); compareKernelSets("smart1"); ifstream i(dbPath); nlohmann::json conf = nlohmann::json::parse(i); MockRepository mocks; mocks.OnCallFunc(ls).Return(files); nlohmann::json res = listMissionKernels("doesn't matter", conf); set<string> kernels = getKernelsAsSet(res);set<string> mission = missionMap.at("smart1"); vector<string> expected = {"ATNS_P050930150947_00220.BC", "ATNS_P030929010023_00188.BC", "ATNS_P060301004212_00233.BC"}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("ck").at("reconstructed")), expected); expected = {"SMART1_070227_STEP.TSC"}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("sclk")), expected); expected = {""}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("sclk")), expected); expected = {"SMART1_AMIE_V01.TI"}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("ik")), expected); expected = {"ORMS_______________00233.BSP"}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("spk").at("predicted")), expected); expected = {"ORMS__041111020517_00206.BSP"}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("spk").at("reconstructed")), expected); expected = {"ORHM_______________00038.BSP"}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("spk").at("reconstructed")), expected); expected = {"SMART1_V1.TF"}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("fk")), expected); } No newline at end of file Loading
CHANGELOG.md +2 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,8 @@ release. ## [Unreleased] ### Added - Adds support for LO [#11](ihttps://github.com/DOI-USGS/SpiceQL/issues/11) - Adds support for LO [#11](https://github.com/DOI-USGS/SpiceQL/issues/11) - Adds support for Smart1 [#16](https://github.com/DOI-USGS/SpiceQL/issues/16) ### Fixed Loading
CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ if(SPICEQL_BUILD_LIB) ${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/mgs.json ${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/mro.json ${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/odyssey.json ${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/smart1.json ${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/tgo.json ${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/viking1.json ${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/viking2.json) Loading
SpiceQL/db/smart1.json 0 → 100644 +33 −0 Original line number Diff line number Diff line { "smart1": { "ck": { "reconstructed": { "kernels": ["ATNS_P[0-9]{12}_[0-9]{5}.BC$"] } }, "fk": { "kernels": ["SMART1_V[0-9]{0,4}.TF$"] }, "ik": { "kernels": ["SMART1_AMIE_V[0-9]{2}.TI$"] }, "lsk": { "kernels": ["naif[0-9]{4}.tls$"] }, "pck": { "kernels": ["PCK[0-9]{5}.TPC$"] }, "sclk": { "kernels": ["SMART1_[0-9]{6}_STEP.TSC$"] }, "spk": { "reconstructed": { "kernels": ["ORMS__[0-9]{12}_[0-9]{5}.BSP$"] }, "predicted": { "kernels": ["ORMS_______________[0-9]{5}.BSP$"] } }, "deps" : ["/base/pck"] } } No newline at end of file
SpiceQL/tests/FunctionalTestsConfig.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ using namespace SpiceQL; TEST_F(TestConfig, FunctionalTestConfigConstruct) { json megaConfig = testConfig.globalConf(); EXPECT_EQ(megaConfig.size(), 63); EXPECT_EQ(megaConfig.size(), 64); } TEST_F(TestConfig, FunctionalTestConfigEval) { Loading Loading @@ -149,7 +149,7 @@ TEST_F(TestConfig, FunctionalTestsConfigGetRecursive) { json resJson = testConfig.getRecursive("sclk"); EXPECT_EQ(resJson.size(), 57); EXPECT_EQ(resJson.size(), 58); for (auto &[key, val] : resJson.items()) { EXPECT_TRUE(val.contains("sclk")); } Loading
SpiceQL/tests/QueryTests.cpp +42 −0 Original line number Diff line number Diff line Loading @@ -556,4 +556,46 @@ TEST_F(IsisDataDirectory, FunctionalTestListMissionKernelsLo) { expected = {"lo_fict.tsc", "lo_fict1.tsc","lo_fict2.tsc","lo_fict3.tsc","lo_fict4.tsc","lo_fict5.tsc"}; CompareKernelSets(getKernelsAsVector(res.at("lo").at("sclk")), expected); } TEST_F(IsisDataDirectory, FunctionalTestListMissionKernelsSmart1) { fs::path dbPath = getMissionConfigFile("smart1"); compareKernelSets("smart1"); ifstream i(dbPath); nlohmann::json conf = nlohmann::json::parse(i); MockRepository mocks; mocks.OnCallFunc(ls).Return(files); nlohmann::json res = listMissionKernels("doesn't matter", conf); set<string> kernels = getKernelsAsSet(res);set<string> mission = missionMap.at("smart1"); vector<string> expected = {"ATNS_P050930150947_00220.BC", "ATNS_P030929010023_00188.BC", "ATNS_P060301004212_00233.BC"}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("ck").at("reconstructed")), expected); expected = {"SMART1_070227_STEP.TSC"}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("sclk")), expected); expected = {""}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("sclk")), expected); expected = {"SMART1_AMIE_V01.TI"}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("ik")), expected); expected = {"ORMS_______________00233.BSP"}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("spk").at("predicted")), expected); expected = {"ORMS__041111020517_00206.BSP"}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("spk").at("reconstructed")), expected); expected = {"ORHM_______________00038.BSP"}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("spk").at("reconstructed")), expected); expected = {"SMART1_V1.TF"}; CompareKernelSets(getKernelsAsVector(res.at("smart1").at("fk")), expected); } No newline at end of file