diff --git a/tool/src/main/java/org/datacommons/tool/Main.java b/tool/src/main/java/org/datacommons/tool/Main.java index ac87e14f..c3a2372e 100644 --- a/tool/src/main/java/org/datacommons/tool/Main.java +++ b/tool/src/main/java/org/datacommons/tool/Main.java @@ -51,26 +51,26 @@ class Main { + "loaded into memory. Defaults to true.") public boolean doExistenceChecks; - // TODO: Default to LOCAL after some trials. @CommandLine.Option( names = {"-r", "--resolution"}, - defaultValue = "NONE", + defaultValue = "LOCAL", scope = CommandLine.ScopeType.INHERIT, description = "Specifies the mode of resolution to use: ${COMPLETION-CANDIDATES}. For no resolution," + " set NONE. To lookup external IDs (like ISO) in DC, resolve local references " + "and generated DCIDs, set FULL. To just resolve local references and generate " + "DCIDs, set LOCAL. Note that FULL mode may be slower since it makes " - + "(batched) DC Recon API calls and two passes over your CSV files. Default to NONE.") + + "(batched) DC Recon API calls and two passes over your CSV files. Default to " + + "LOCAL.") public Args.ResolutionMode resolutionMode = Args.ResolutionMode.NONE; - // TODO: Default to true after some trials. @CommandLine.Option( names = {"-s", "--stat-checks"}, - defaultValue = "false", + defaultValue = "true", scope = CommandLine.ScopeType.INHERIT, description = - "Checks integrity of time series by checking for holes, variance in values, etc.") + "Checks integrity of time series by checking for holes, variance in values, etc. " + + "Defaults to true.") public boolean doStatChecks; @CommandLine.Option( @@ -86,7 +86,7 @@ class Main { names = {"-n", "--num-threads"}, defaultValue = "1", scope = CommandLine.ScopeType.INHERIT, - description = "Number of concurrent threads used for processing CSVs.") + description = "Number of concurrent threads used for processing CSVs. Defaults to 1.") public int numThreads; public static void main(String... args) { diff --git a/tool/src/test/java/org/datacommons/tool/GenMcfTest.java b/tool/src/test/java/org/datacommons/tool/GenMcfTest.java index a03b1756..b76e73b8 100644 --- a/tool/src/test/java/org/datacommons/tool/GenMcfTest.java +++ b/tool/src/test/java/org/datacommons/tool/GenMcfTest.java @@ -16,6 +16,7 @@ import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import com.google.common.truth.Expect; import java.io.File; @@ -25,6 +26,8 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import org.apache.commons.io.FilenameUtils; import org.datacommons.util.TmcfCsvParser; import org.junit.Rule; import org.junit.Test; @@ -42,6 +45,14 @@ public class GenMcfTest { @Rule public TemporaryFolder testFolder = new TemporaryFolder(); @Rule public final Expect expect = Expect.create(); + // To ensure we test the right number of files for every test, when you add a file, add the + // count here. + private static Map EXPECTED_FILES_TO_CHECK = + Map.of( + "fataltmcf", 1, + "resolution", 4, + "statchecks", 2, + "successtmcf", 2); @Test public void GenMcfTest() throws IOException { @@ -53,39 +64,43 @@ public void GenMcfTest() throws IOException { CommandLine cmd = new CommandLine(app); File[] testDirectories = new File(resourceFile("genmcf")).listFiles(File::isDirectory); for (File directory : testDirectories) { - System.err.println("Processing " + directory.getName()); + String testName = directory.getName(); + System.err.println(testName + ": BEGIN"); + assertTrue(EXPECTED_FILES_TO_CHECK.containsKey(testName)); List argsList = new ArrayList<>(); argsList.add("genmcf"); File[] inputFiles = new File(Path.of(directory.getPath(), "input").toString()).listFiles(); + List expectedOutputFiles = + new ArrayList<>( + List.of("report.json", "instance_mcf_nodes.mcf", "failed_instance_mcf_nodes.mcf")); for (File inputFile : inputFiles) { argsList.add(inputFile.getPath()); + String fName = inputFile.getName(); + if (fName.endsWith(".csv") || fName.endsWith(".tsv")) { + expectedOutputFiles.add( + "table_mcf_nodes_" + FilenameUtils.removeExtension(fName) + ".mcf"); + expectedOutputFiles.add( + "failed_table_mcf_nodes_" + FilenameUtils.removeExtension(fName) + ".mcf"); + } } argsList.add("--resolution=FULL"); - argsList.add("--stat-checks"); - argsList.add( - "--output-dir=" + Paths.get(testFolder.getRoot().getPath(), directory.getName())); + argsList.add("--output-dir=" + Paths.get(testFolder.getRoot().getPath(), testName)); String[] args = argsList.toArray(new String[argsList.size()]); cmd.execute(args); - List files = - List.of( - "report.json", - "table_nodes.mcf", - "failed_table_nodes.mcf", - "nodes.mcf", - "failed_nodes.mcf"); - + Integer numChecked = 0; if (goldenFilesPrefix != null && !goldenFilesPrefix.isEmpty()) { - for (var f : files) { - Path actual = TestUtil.getTestFilePath(testFolder, directory.getName(), f); + for (var f : expectedOutputFiles) { + Path actual = TestUtil.getTestFilePath(testFolder, testName, f); if (!f.equals("report.json") && !new File(actual.toString()).exists()) continue; - Path golden = Path.of(goldenFilesPrefix, "genmcf", directory.getName(), "output", f); + Path golden = Path.of(goldenFilesPrefix, "genmcf", testName, "output", f); Files.copy(actual, golden, REPLACE_EXISTING); + numChecked++; } } else { - for (var f : files) { - Path actual = TestUtil.getTestFilePath(testFolder, directory.getName(), f); + for (var f : expectedOutputFiles) { + Path actual = TestUtil.getTestFilePath(testFolder, testName, f); if (!f.equals("report.json") && !new File(actual.toString()).exists()) continue; Path expected = TestUtil.getOutputFilePath(directory.getPath(), f); @@ -97,8 +112,11 @@ public void GenMcfTest() throws IOException { org.datacommons.util.TestUtil.mcfFromFile(expected.toString()), org.datacommons.util.TestUtil.mcfFromFile(actual.toString())); } + numChecked++; } } + assertEquals(numChecked, EXPECTED_FILES_TO_CHECK.get(testName)); + System.err.println(testName + ": PASSED"); } } diff --git a/tool/src/test/java/org/datacommons/tool/LintTest.java b/tool/src/test/java/org/datacommons/tool/LintTest.java index 8c5a05d0..436fae15 100644 --- a/tool/src/test/java/org/datacommons/tool/LintTest.java +++ b/tool/src/test/java/org/datacommons/tool/LintTest.java @@ -39,14 +39,14 @@ public void LintTest() throws IOException { CommandLine cmd = new CommandLine(app); File[] testDirectories = new File(resourceFile("lint")).listFiles(File::isDirectory); for (File directory : testDirectories) { - System.err.println("Processing " + directory.getName()); + String testName = directory.getName(); + System.err.println(testName + ": BEGIN"); List argsList = new ArrayList<>(); argsList.add("lint"); File[] inputFiles = new File(Path.of(directory.getPath(), "input").toString()).listFiles(); for (File inputFile : inputFiles) { argsList.add(inputFile.getPath()); } - argsList.add("--stat-checks"); argsList.add( "--output-dir=" + Paths.get(testFolder.getRoot().getPath(), directory.getName())); String[] args = argsList.toArray(new String[argsList.size()]); @@ -64,6 +64,7 @@ public void LintTest() throws IOException { TestUtil.readStringFromPath(expectedReportPath), TestUtil.readStringFromPath(actualReportPath)); } + System.err.println(testName + ": PASSED"); } } diff --git a/tool/src/test/resources/org/datacommons/tool/genmcf/fataltmcf/output/report.json b/tool/src/test/resources/org/datacommons/tool/genmcf/fataltmcf/output/report.json index 51df94ba..7dcdc6c9 100644 --- a/tool/src/test/resources/org/datacommons/tool/genmcf/fataltmcf/output/report.json +++ b/tool/src/test/resources/org/datacommons/tool/genmcf/fataltmcf/output/report.json @@ -115,7 +115,7 @@ "file": "FatalTmcf.tmcf", "lineNumber": "19" }, - "userMessage": "No definition found for a referenced 'E:' value :: reference: 'E:SVTest->E13', property: 'dcid' node: 'E:SVTest->E3'", + "userMessage": "No definition found for a referenced 'E:' value :: reference: 'E:SVTest->E10', property: 'dcid' node: 'E:SVTest->E3'", "counterKey": "Sanity_TmcfMissingEntityDef" }, { "level": "LEVEL_ERROR", @@ -123,16 +123,16 @@ "file": "FatalTmcf.tmcf", "lineNumber": "19" }, - "userMessage": "No definition found for a referenced 'E:' value :: reference: 'E:SVTest->E10', property: 'dcid' node: 'E:SVTest->E3'", - "counterKey": "Sanity_TmcfMissingEntityDef" + "userMessage": "Column referred to in TMCF is missing from CSV header :: column: 'dcid1', node: 'E:SVTest->E3'", + "counterKey": "Sanity_TmcfMissingColumn" }, { "level": "LEVEL_ERROR", "location": { "file": "FatalTmcf.tmcf", "lineNumber": "19" }, - "userMessage": "Column referred to in TMCF is missing from CSV header :: column: 'dcid1', node: 'E:SVTest->E3'", - "counterKey": "Sanity_TmcfMissingColumn" + "userMessage": "No definition found for a referenced 'E:' value :: reference: 'E:SVTest->E13', property: 'dcid' node: 'E:SVTest->E3'", + "counterKey": "Sanity_TmcfMissingEntityDef" }, { "level": "LEVEL_ERROR", "location": { diff --git a/tool/src/test/resources/org/datacommons/tool/genmcf/resolution/output/failed_nodes.mcf b/tool/src/test/resources/org/datacommons/tool/genmcf/resolution/output/failed_instance_mcf_nodes.mcf similarity index 100% rename from tool/src/test/resources/org/datacommons/tool/genmcf/resolution/output/failed_nodes.mcf rename to tool/src/test/resources/org/datacommons/tool/genmcf/resolution/output/failed_instance_mcf_nodes.mcf diff --git a/tool/src/test/resources/org/datacommons/tool/genmcf/resolution/output/nodes.mcf b/tool/src/test/resources/org/datacommons/tool/genmcf/resolution/output/instance_mcf_nodes.mcf similarity index 100% rename from tool/src/test/resources/org/datacommons/tool/genmcf/resolution/output/nodes.mcf rename to tool/src/test/resources/org/datacommons/tool/genmcf/resolution/output/instance_mcf_nodes.mcf diff --git a/tool/src/test/resources/org/datacommons/tool/genmcf/resolution/output/table_nodes.mcf b/tool/src/test/resources/org/datacommons/tool/genmcf/resolution/output/table_mcf_nodes_covid.mcf similarity index 100% rename from tool/src/test/resources/org/datacommons/tool/genmcf/resolution/output/table_nodes.mcf rename to tool/src/test/resources/org/datacommons/tool/genmcf/resolution/output/table_mcf_nodes_covid.mcf diff --git a/tool/src/test/resources/org/datacommons/tool/genmcf/statchecks/output/table_mcf_nodes_covid.mcf b/tool/src/test/resources/org/datacommons/tool/genmcf/statchecks/output/table_mcf_nodes_covid.mcf new file mode 100644 index 00000000..5a64ea86 --- /dev/null +++ b/tool/src/test/resources/org/datacommons/tool/genmcf/statchecks/output/table_mcf_nodes_covid.mcf @@ -0,0 +1,522 @@ +Node: COVID19_cases_india/E0/1 +observationDate: "2020-01-02" +observationAbout: dcid:geoId/07 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/07variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-01-02value=1" +dcid: "dc/o/bkdh3xmzn99sg" + +Node: COVID19_cases_india/E0/2 +observationDate: "2020-01-02" +observationAbout: dcid:geoId/201 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/201variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-01-02value=1" +dcid: "dc/o/03z543pbe6z42" + +Node: COVID19_cases_india/E0/3 +observationDate: "2020-01-02" +observationAbout: dcid:geoId/211 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/211variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-01-02value=1" +dcid: "dc/o/bpjre4fnzme68" + +Node: COVID19_cases_india/E0/4 +observationDate: "2020-01-02" +observationAbout: dcid:geoId/221 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/221variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-01-02value=1" +dcid: "dc/o/yy4vckg916c37" + +Node: COVID19_cases_india/E0/5 +observationDate: "2020-01-02" +observationAbout: dcid:geoId/231 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/231variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-01-02value=1" +dcid: "dc/o/1gtsrrgl0687b" + +Node: COVID19_cases_india/E0/6 +observationDate: "2020-01-02" +observationAbout: dcid:geoId/241 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/241variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-01-02value=1" +dcid: "dc/o/6tl46fxb8y909" + +Node: COVID19_cases_india/E0/7 +observationDate: "2020-01-02" +observationAbout: dcid:geoId/25111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/25111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-01-02value=1" +dcid: "dc/o/v402d2p7gr996" + +Node: COVID19_cases_india/E0/8 +observationDate: "2020-01-02" +observationAbout: dcid:geoId/26111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/26111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-01-02value=1" +dcid: "dc/o/j611vze0k65md" + +Node: COVID19_cases_india/E0/9 +observationDate: "2020-01-02" +observationAbout: dcid:geoId/27111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/27111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-01-02value=1" +dcid: "dc/o/z2mtwm5fkk4r3" + +Node: COVID19_cases_india/E0/10 +observationDate: "2020-01-02" +observationAbout: dcid:geoId/28111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/28111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-01-02value=1" +dcid: "dc/o/bye4e60m52n7g" + +Node: COVID19_cases_india/E0/11 +observationDate: "2020-01-02" +observationAbout: dcid:geoId/29111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/29111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-01-02value=1" +dcid: "dc/o/xyhkse52nm123" + +Node: COVID19_cases_india/E0/12 +observationDate: "2020-01-02" +observationAbout: dcid:geoId/3011111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/3011111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-01-02value=1" +dcid: "dc/o/rcw03mngk0hj" + +Node: COVID19_cases_india/E0/13 +observationDate: "2020-01-02" +observationAbout: dcid:geoId/3111111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/3111111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-01-02value=1" +dcid: "dc/o/1tb8zrfx62je8" + +Node: COVID19_cases_india/E0/14 +observationDate: "2020-01-30" +observationAbout: dcid:geoId/06 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-01-30value=1" +dcid: "dc/o/by9xkhfh3trh7" + +Node: COVID19_cases_india/E0/15 +observationDate: "2020-02-02" +observationAbout: dcid:geoId/06 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 2 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-02value=2" +dcid: "dc/o/ppnss46mb43dg" + +Node: COVID19_cases_india/E0/16 +observationDate: "2020-02-02" +observationAbout: dcid:geoId/07 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 0 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/07variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-02value=0" +dcid: "dc/o/wx8xeqb3hc787" + +Node: COVID19_cases_india/E0/17 +observationDate: "2020-02-02" +observationAbout: dcid:geoId/201 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/201variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-02value=1" +dcid: "dc/o/rnnlcxzqhj1r5" + +Node: COVID19_cases_india/E0/18 +observationDate: "2020-02-02" +observationAbout: dcid:geoId/211 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/211variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-02value=1" +dcid: "dc/o/srbr24t6mxmd1" + +Node: COVID19_cases_india/E0/19 +observationDate: "2020-02-02" +observationAbout: dcid:geoId/221 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/221variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-02value=1" +dcid: "dc/o/9ldb066qmpsy6" + +Node: COVID19_cases_india/E0/20 +observationDate: "2020-02-02" +observationAbout: dcid:geoId/231 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/231variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-02value=1" +dcid: "dc/o/phdbw9zew4fe1" + +Node: COVID19_cases_india/E0/21 +observationDate: "2020-02-02" +observationAbout: dcid:geoId/241 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/241variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-02value=1" +dcid: "dc/o/qgqskrpcy0py" + +Node: COVID19_cases_india/E0/22 +observationDate: "2020-02-02" +observationAbout: dcid:geoId/25111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/25111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-02value=1" +dcid: "dc/o/b41few234smj2" + +Node: COVID19_cases_india/E0/23 +observationDate: "2020-02-02" +observationAbout: dcid:geoId/26111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/26111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-02value=1" +dcid: "dc/o/j96v0fpfjj6kg" + +Node: COVID19_cases_india/E0/24 +observationDate: "2020-02-02" +observationAbout: dcid:geoId/27111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/27111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-02value=1" +dcid: "dc/o/gyjz4dwgfzgj1" + +Node: COVID19_cases_india/E0/25 +observationDate: "2020-02-02" +observationAbout: dcid:geoId/28111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/28111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-02value=1" +dcid: "dc/o/c1kedmws2sy1g" + +Node: COVID19_cases_india/E0/26 +observationDate: "2020-02-02" +observationAbout: dcid:geoId/29111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/29111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-02value=1" +dcid: "dc/o/3lv3d310vkf66" + +Node: COVID19_cases_india/E0/27 +observationDate: "2020-02-02" +observationAbout: dcid:geoId/3011111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/3011111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-02value=1" +dcid: "dc/o/s32gv86mggb7h" + +Node: COVID19_cases_india/E0/28 +observationDate: "2020-02-02" +observationAbout: dcid:geoId/3111111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/3111111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-02value=1" +dcid: "dc/o/krx739rjehzd2" + +Node: COVID19_cases_india/E0/29 +observationDate: "2020-02-03" +observationAbout: dcid:geoId/06 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 3 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-03value=3" +dcid: "dc/o/3fy1n7xyn3892" + +Node: COVID19_cases_india/E0/30 +observationDate: "2020-02-03" +observationAbout: dcid:geoId/06 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 8 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-03value=8" +dcid: "dc/o/g27txk44wl6s3" + +Node: COVID19_cases_india/E0/31 +observationDate: "2020-03-02" +observationAbout: dcid:geoId/06 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-02value=1" +dcid: "dc/o/r42zpvjzy07dg" + +Node: COVID19_cases_india/E0/32 +observationDate: "2020-03-02" +observationAbout: dcid:geoId/06 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-02value=1" +dcid: "dc/o/r42zpvjzy07dg" + +Node: COVID19_cases_india/E0/33 +observationDate: "2020-03-02" +observationAbout: dcid:geoId/07 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/07variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-02value=1" +dcid: "dc/o/zzq9fn36jn9xf" + +Node: COVID19_cases_india/E0/34 +observationDate: "2020-03-02" +observationAbout: dcid:geoId/08 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/08variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-02value=1" +dcid: "dc/o/sp3qzcdfs118c" + +Node: COVID19_cases_india/E0/35 +observationDate: "2020-03-03" +observationAbout: dcid:geoId/09 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/09variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-03value=1" +dcid: "dc/o/x2y2t00cv7ml7" + +Node: COVID19_cases_india/E0/36 +observationDate: "2020-03-03" +observationAbout: dcid:geoId/10 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 3 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/10variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-03value=3" +dcid: "dc/o/16qe2klkdwmp9" + +Node: COVID19_cases_india/E0/37 +observationDate: "2020-03-03" +observationAbout: dcid:geoId/11 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/11variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-03value=1" +dcid: "dc/o/6lx0c3wezdwj6" + +Node: COVID19_cases_india/E0/38 +observationDate: "2020-03-03" +observationAbout: dcid:geoId/06 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-03value=1" +dcid: "dc/o/fhbcclhv5tt1h" + +Node: COVID19_cases_india/E0/39 +observationDate: "2020-03" +observationAbout: dcid:geoId/0601 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/0601variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03value=1" +dcid: "dc/o/kk45pqqtqtcvf" + +Node: COVID19_cases_india/E0/40 +observationDate: "2020-03-04" +observationAbout: dcid:geoId/0601 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/0601variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-04value=1" +dcid: "dc/o/4l60pgk4w8mz7" + +Node: COVID19_cases_india/E0/41 +observationDate: "2020-03-05" +observationAbout: dcid:geoId/0601 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/0601variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-05value=1" +dcid: "dc/o/vsl0ckr7dml67" + +Node: COVID19_cases_india/E0/42 +observationDate: "2020-03-06" +observationAbout: dcid:geoId/0601 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/0601variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-06value=1" +dcid: "dc/o/x2fe937dfz44d" + +Node: COVID19_cases_india/E0/43 +observationDate: "2020-04-02" +observationAbout: dcid:geoId/07 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 112 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/07variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-04-02value=112" +dcid: "dc/o/kcz4rgcef7tt3" + +Node: COVID19_cases_india/E0/44 +observationDate: "2020-05-02" +observationAbout: dcid:geoId/07 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 5 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/07variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-05-02value=5" +dcid: "dc/o/zg7g58sw9b52c" + +Node: COVID19_cases_india/E0/45 +observationDate: "2020-05-03" +observationAbout: dcid:geoId/06 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 8 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-05-03value=8" +dcid: "dc/o/l1cfwgnzc9mx5" + +Node: COVID19_cases_india/E0/46 +observationDate: "2020-06-02" +observationAbout: dcid:geoId/07 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 275 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/07variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-06-02value=275" +dcid: "dc/o/839dvpb9we1q6" + +Node: COVID19_cases_india/E0/47 +observationDate: "2020-06-02" +observationAbout: dcid:geoId/201 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/201variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-06-02value=1" +dcid: "dc/o/tlsd5deh32s4b" + +Node: COVID19_cases_india/E0/48 +observationDate: "2020-06-02" +observationAbout: dcid:geoId/211 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/211variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-06-02value=1" +dcid: "dc/o/rvyqse9fx390h" + +Node: COVID19_cases_india/E0/49 +observationDate: "2020-06-02" +observationAbout: dcid:geoId/221 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/221variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-06-02value=1" +dcid: "dc/o/egnv4cz6nx75h" + +Node: COVID19_cases_india/E0/50 +observationDate: "2020-06-02" +observationAbout: dcid:geoId/231 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/231variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-06-02value=1" +dcid: "dc/o/p9nq4j5ygph0d" + +Node: COVID19_cases_india/E0/51 +observationDate: "2020-06-02" +observationAbout: dcid:geoId/241 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/241variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-06-02value=1" +dcid: "dc/o/we283tqzkk5c4" + +Node: COVID19_cases_india/E0/52 +observationDate: "2020-06-02" +observationAbout: dcid:geoId/25111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/25111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-06-02value=1" +dcid: "dc/o/sg3el39j5hjk3" + +Node: COVID19_cases_india/E0/53 +observationDate: "2020-06-02" +observationAbout: dcid:geoId/26111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/26111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-06-02value=1" +dcid: "dc/o/vp4lg1e8v8n45" + +Node: COVID19_cases_india/E0/54 +observationDate: "2020-06-02" +observationAbout: dcid:geoId/27111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/27111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-06-02value=1" +dcid: "dc/o/jryn8zxys75t7" + +Node: COVID19_cases_india/E0/55 +observationDate: "2020-06-02" +observationAbout: dcid:geoId/28111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/28111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-06-02value=1" +dcid: "dc/o/pnf29zmxxcz5c" + +Node: COVID19_cases_india/E0/56 +observationDate: "2020-06-02" +observationAbout: dcid:geoId/29111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/29111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-06-02value=1" +dcid: "dc/o/cety637lzb9l" + +Node: COVID19_cases_india/E0/57 +observationDate: "2020-06-02" +observationAbout: dcid:geoId/3011111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/3011111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-06-02value=1" +dcid: "dc/o/cwg9qst91y7w6" + +Node: COVID19_cases_india/E0/57 +observationDate: "2020-06-02" +observationAbout: dcid:geoId/3111111 +variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive +value: 1 +typeOf: dcid:StatVarObservation +keyString: "observationAbout=geoId/3111111variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-06-02value=1" +dcid: "dc/o/xr0tzngp7rybc" + diff --git a/tool/src/test/resources/org/datacommons/tool/genmcf/statchecks/output/table_nodes_covid.mcf b/tool/src/test/resources/org/datacommons/tool/genmcf/statchecks/output/table_nodes_covid.mcf deleted file mode 100644 index 31b4308d..00000000 --- a/tool/src/test/resources/org/datacommons/tool/genmcf/statchecks/output/table_nodes_covid.mcf +++ /dev/null @@ -1,162 +0,0 @@ -Node: COVID19_cases_india/E0/1 -observationDate: "2020-01-30" -observationAbout: dcid:geoId/06 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 1 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-01-30value=1" -dcid: "dc/o/by9xkhfh3trh7" - -Node: COVID19_cases_india/E0/2 -observationDate: "2020-02-02" -observationAbout: dcid:geoId/06 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 2 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-02value=2" -dcid: "dc/o/ppnss46mb43dg" - -Node: COVID19_cases_india/E0/3 -observationDate: "2020-02-03" -observationAbout: dcid:geoId/06 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 3 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-03value=3" -dcid: "dc/o/3fy1n7xyn3892" - -Node: COVID19_cases_india/E0/4 -observationDate: "2020-02-03" -observationAbout: dcid:geoId/06 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 8 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-02-03value=8" -dcid: "dc/o/g27txk44wl6s3" - -Node: COVID19_cases_india/E0/5 -observationDate: "2020-03-02" -observationAbout: dcid:geoId/06 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 1 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-02value=1" -dcid: "dc/o/r42zpvjzy07dg" - -Node: COVID19_cases_india/E0/6 -observationDate: "2020-03-02" -observationAbout: dcid:geoId/06 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 1 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-02value=1" -dcid: "dc/o/r42zpvjzy07dg" - -Node: COVID19_cases_india/E0/7 -observationDate: "2020-03-02" -observationAbout: dcid:geoId/07 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 3 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/07variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-02value=3" -dcid: "dc/o/v0y39w5kdrtg8" - -Node: COVID19_cases_india/E0/8 -observationDate: "2020-03-02" -observationAbout: dcid:geoId/08 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 1 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/08variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-02value=1" -dcid: "dc/o/sp3qzcdfs118c" - -Node: COVID19_cases_india/E0/9 -observationDate: "2020-03-03" -observationAbout: dcid:geoId/07 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 7 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/07variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-03value=7" -dcid: "dc/o/yn9nd8ccr6web" - -Node: COVID19_cases_india/E0/10 -observationDate: "2020-03-03" -observationAbout: dcid:geoId/09 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 1 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/09variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-03value=1" -dcid: "dc/o/x2y2t00cv7ml7" - -Node: COVID19_cases_india/E0/11 -observationDate: "2020-03-03" -observationAbout: dcid:geoId/10 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 3 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/10variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-03value=3" -dcid: "dc/o/16qe2klkdwmp9" - -Node: COVID19_cases_india/E0/12 -observationDate: "2020-03-03" -observationAbout: dcid:geoId/11 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 1 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/11variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-03value=1" -dcid: "dc/o/6lx0c3wezdwj6" - -Node: COVID19_cases_india/E0/13 -observationDate: "2020-03-03" -observationAbout: dcid:geoId/06 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 1 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-03value=1" -dcid: "dc/o/fhbcclhv5tt1h" - -Node: COVID19_cases_india/E0/14 -observationDate: "2020-03" -observationAbout: dcid:geoId/0601 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 1 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/0601variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03value=1" -dcid: "dc/o/kk45pqqtqtcvf" - -Node: COVID19_cases_india/E0/15 -observationDate: "2020-03-04" -observationAbout: dcid:geoId/0601 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 1 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/0601variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-04value=1" -dcid: "dc/o/4l60pgk4w8mz7" - -Node: COVID19_cases_india/E0/16 -observationDate: "2020-03-05" -observationAbout: dcid:geoId/0601 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 1 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/0601variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-05value=1" -dcid: "dc/o/vsl0ckr7dml67" - -Node: COVID19_cases_india/E0/17 -observationDate: "2020-03-06" -observationAbout: dcid:geoId/0601 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 1 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/0601variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-03-06value=1" -dcid: "dc/o/x2fe937dfz44d" - -Node: COVID19_cases_india/E0/17 -observationDate: "2020-05-03" -observationAbout: dcid:geoId/06 -variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive -value: 8 -typeOf: dcid:StatVarObservation -keyString: "observationAbout=geoId/06variableMeasured=CumulativeCount_MedicalTest_ConditionCOVID_19_PositiveobservationDate=2020-05-03value=8" -dcid: "dc/o/l1cfwgnzc9mx5" - diff --git a/tool/src/test/resources/org/datacommons/tool/genmcf/successtmcf/output/table_nodes_SuccessTmcf.mcf b/tool/src/test/resources/org/datacommons/tool/genmcf/successtmcf/output/table_mcf_nodes_SuccessTmcf.mcf similarity index 100% rename from tool/src/test/resources/org/datacommons/tool/genmcf/successtmcf/output/table_nodes_SuccessTmcf.mcf rename to tool/src/test/resources/org/datacommons/tool/genmcf/successtmcf/output/table_mcf_nodes_SuccessTmcf.mcf diff --git a/tool/src/test/resources/org/datacommons/tool/lint/allfiletypes/output/report.json b/tool/src/test/resources/org/datacommons/tool/lint/allfiletypes/output/report.json index c2566137..37b55ef3 100644 --- a/tool/src/test/resources/org/datacommons/tool/lint/allfiletypes/output/report.json +++ b/tool/src/test/resources/org/datacommons/tool/lint/allfiletypes/output/report.json @@ -3,7 +3,7 @@ "LEVEL_INFO": { "counters": { "NumRowSuccesses": "11", - "NumPVSuccesses": "83", + "NumPVSuccesses": "107", "Existence_NumChecks": "249", "NumNodeSuccesses": "15", "CSV_MalformedDCIDPVFailures": "4", @@ -33,6 +33,7 @@ "MCF_InvalidLongitude": "1", "Sanity_VeryLongDcid": "1", "Sanity_InvalidObsDate": "3", + "Resolution_IrreplaceableLocalRef": "4", "Mutator_MissingTypeOf": "1", "MCF_MalformedComplexValueParts": "2", "Sanity_NonAsciiValueInSchema": "1", @@ -51,6 +52,7 @@ "MCF_QuantityMalformedValue": "2", "Sanity_NonAsciiValueInNonText": "2", "Sanity_MissingOrEmpty_measuredProperty": "1", + "Resolution_UnassignableNodeDcid": "4", "MCF_InvalidLatitude": "1", "Sanity_UnexpectedPropInClass": "1", "Sanity_NotInitUpper_nameInClass": "1", @@ -60,9 +62,11 @@ "Sanity_MissingOrEmpty_statType": "1", "MCF_UnexpectedProperty": "1", "Sanity_InvalidChars_observationAbout": "2", + "Resolution_OrphanLocalReference_containedInPlace": "1", "Sanity_MultipleDcidValues": "2", "MCF_MalformedNodeName": "1", "Sanity_MissingOrEmpty_populationType": "2", + "Resolution_DcidAssignmentFailure_City": "1", "Sanity_MissingOrEmpty_observationAbout": "2", "Sanity_NonDoubleObsValue": "1" } @@ -468,6 +472,86 @@ }, "userMessage": "Failed reference existence check :: subject: '', predicate: 'domainIncludes', object: '', node: 'dcid:Count_Death_10To12'", "counterKey": "Existence_MissingReference_domainIncludes" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "AllFileTypes.mcf", + "lineNumber": "59" + }, + "userMessage": "Found orphan local ref :: ref: 'l:USACountry', property: 'containedInPlace', node: 'dcid:dc/mx44'", + "counterKey": "Resolution_OrphanLocalReference_containedInPlace" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "AllFileTypes.mcf", + "lineNumber": "10" + }, + "userMessage": "Failed to assign DCID :: type: 'City', node: 'CityStats/E2/2'", + "counterKey": "Resolution_DcidAssignmentFailure_City" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "AllFileTypes.mcf", + "lineNumber": "41" + }, + "userMessage": "Unable to replace a local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/4'", + "counterKey": "Resolution_IrreplaceableLocalRef" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "AllFileTypes.mcf", + "lineNumber": "32" + }, + "userMessage": "Unable to replace a local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/3'", + "counterKey": "Resolution_IrreplaceableLocalRef" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "AllFileTypes.mcf", + "lineNumber": "23" + }, + "userMessage": "Unable to replace a local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/2'", + "counterKey": "Resolution_IrreplaceableLocalRef" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "AllFileTypes.mcf", + "lineNumber": "15" + }, + "userMessage": "Unable to replace a local reference :: ref: 'CityStats/E2/2', node: 'CityStats/E3/2'", + "counterKey": "Resolution_IrreplaceableLocalRef" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "AllFileTypes.mcf", + "lineNumber": "41" + }, + "userMessage": "Unable to assign DCID due to unresolved local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/4'", + "counterKey": "Resolution_UnassignableNodeDcid" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "AllFileTypes.mcf", + "lineNumber": "32" + }, + "userMessage": "Unable to assign DCID due to unresolved local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/3'", + "counterKey": "Resolution_UnassignableNodeDcid" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "AllFileTypes.mcf", + "lineNumber": "23" + }, + "userMessage": "Unable to assign DCID due to unresolved local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/2'", + "counterKey": "Resolution_UnassignableNodeDcid" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "AllFileTypes.mcf", + "lineNumber": "15" + }, + "userMessage": "Unable to assign DCID due to unresolved local reference :: ref: 'CityStats/E2/2', node: 'CityStats/E3/2'", + "counterKey": "Resolution_UnassignableNodeDcid" }, { "level": "LEVEL_ERROR", "location": { @@ -855,7 +939,7 @@ }], "commandArgs": { "existenceChecks": true, - "resolution": "RESOLUTION_MODE_NONE", + "resolution": "RESOLUTION_MODE_LOCAL", "numThreads": 1, "statChecks": true } diff --git a/tool/src/test/resources/org/datacommons/tool/lint/mcfonly/output/report.json b/tool/src/test/resources/org/datacommons/tool/lint/mcfonly/output/report.json index 04b88097..874a2478 100644 --- a/tool/src/test/resources/org/datacommons/tool/lint/mcfonly/output/report.json +++ b/tool/src/test/resources/org/datacommons/tool/lint/mcfonly/output/report.json @@ -24,6 +24,7 @@ "Sanity_DifferentDcidsForSameStatVar": "1", "MCF_InvalidLongitude": "1", "Sanity_InvalidObsDate": "1", + "Resolution_IrreplaceableLocalRef": "4", "Mutator_MissingTypeOf": "1", "MCF_MalformedComplexValueParts": "1", "Sanity_NonAsciiValueInSchema": "1", @@ -40,6 +41,7 @@ "MCF_QuantityMalformedValue": "1", "Sanity_NonAsciiValueInNonText": "1", "Sanity_MissingOrEmpty_measuredProperty": "1", + "Resolution_UnassignableNodeDcid": "4", "Sanity_SameDcidForDifferentStatVars": "1", "MCF_InvalidLatitude": "1", "Sanity_UnexpectedPropInClass": "1", @@ -48,9 +50,11 @@ "Sanity_DcidNameMismatchInSchema": "2", "Sanity_MissingOrEmpty_statType": "1", "MCF_UnexpectedProperty": "1", + "Resolution_OrphanLocalReference_containedInPlace": "1", "Sanity_MultipleDcidValues": "1", "MCF_MalformedNodeName": "1", "Sanity_MissingOrEmpty_populationType": "2", + "Resolution_DcidAssignmentFailure_City": "1", "Sanity_NonDoubleObsValue": "1" } } @@ -479,10 +483,90 @@ }, "userMessage": "Failed reference existence check :: subject: '', predicate: 'domainIncludes', object: '', node: 'dcid:Count_Death_10To12'", "counterKey": "Existence_MissingReference_domainIncludes" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "McfOnly.mcf", + "lineNumber": "59" + }, + "userMessage": "Found orphan local ref :: ref: 'l:USACountry', property: 'containedInPlace', node: 'dcid:dc/mx44'", + "counterKey": "Resolution_OrphanLocalReference_containedInPlace" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "McfOnly.mcf", + "lineNumber": "10" + }, + "userMessage": "Failed to assign DCID :: type: 'City', node: 'CityStats/E2/2'", + "counterKey": "Resolution_DcidAssignmentFailure_City" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "McfOnly.mcf", + "lineNumber": "41" + }, + "userMessage": "Unable to replace a local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/4'", + "counterKey": "Resolution_IrreplaceableLocalRef" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "McfOnly.mcf", + "lineNumber": "32" + }, + "userMessage": "Unable to replace a local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/3'", + "counterKey": "Resolution_IrreplaceableLocalRef" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "McfOnly.mcf", + "lineNumber": "23" + }, + "userMessage": "Unable to replace a local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/2'", + "counterKey": "Resolution_IrreplaceableLocalRef" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "McfOnly.mcf", + "lineNumber": "15" + }, + "userMessage": "Unable to replace a local reference :: ref: 'CityStats/E2/2', node: 'CityStats/E3/2'", + "counterKey": "Resolution_IrreplaceableLocalRef" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "McfOnly.mcf", + "lineNumber": "41" + }, + "userMessage": "Unable to assign DCID due to unresolved local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/4'", + "counterKey": "Resolution_UnassignableNodeDcid" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "McfOnly.mcf", + "lineNumber": "32" + }, + "userMessage": "Unable to assign DCID due to unresolved local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/3'", + "counterKey": "Resolution_UnassignableNodeDcid" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "McfOnly.mcf", + "lineNumber": "23" + }, + "userMessage": "Unable to assign DCID due to unresolved local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/2'", + "counterKey": "Resolution_UnassignableNodeDcid" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "McfOnly.mcf", + "lineNumber": "15" + }, + "userMessage": "Unable to assign DCID due to unresolved local reference :: ref: 'CityStats/E2/2', node: 'CityStats/E3/2'", + "counterKey": "Resolution_UnassignableNodeDcid" }], "commandArgs": { "existenceChecks": true, - "resolution": "RESOLUTION_MODE_NONE", + "resolution": "RESOLUTION_MODE_LOCAL", "numThreads": 1, "statChecks": true } diff --git a/tool/src/test/resources/org/datacommons/tool/lint/nocsv/output/report.json b/tool/src/test/resources/org/datacommons/tool/lint/nocsv/output/report.json index e49763d5..556b83b6 100644 --- a/tool/src/test/resources/org/datacommons/tool/lint/nocsv/output/report.json +++ b/tool/src/test/resources/org/datacommons/tool/lint/nocsv/output/report.json @@ -25,6 +25,7 @@ "MCF_InvalidLongitude": "1", "TMCF_MalformedEntity": "2", "Sanity_InvalidObsDate": "1", + "Resolution_IrreplaceableLocalRef": "4", "TMCF_MalformedSchemaTerm": "1", "Mutator_MissingTypeOf": "2", "MCF_MalformedComplexValueParts": "1", @@ -44,6 +45,7 @@ "MCF_QuantityMalformedValue": "1", "Sanity_NonAsciiValueInNonText": "1", "Sanity_MissingOrEmpty_measuredProperty": "1", + "Resolution_UnassignableNodeDcid": "4", "MCF_InvalidLatitude": "1", "Sanity_UnexpectedPropInClass": "1", "Sanity_TmcfMissingEntityDef": "5", @@ -52,9 +54,11 @@ "Sanity_DcidNameMismatchInSchema": "2", "Sanity_MissingOrEmpty_statType": "1", "MCF_UnexpectedProperty": "2", + "Resolution_OrphanLocalReference_containedInPlace": "1", "Sanity_MultipleDcidValues": "2", "MCF_MalformedNodeName": "2", "Sanity_MissingOrEmpty_populationType": "2", + "Resolution_DcidAssignmentFailure_City": "1", "Sanity_DcidTableEntity": "1", "Sanity_NonDoubleObsValue": "1" } @@ -460,6 +464,86 @@ }, "userMessage": "Failed reference existence check :: subject: '', predicate: 'domainIncludes', object: '', node: 'dcid:Count_Death_10To12'", "counterKey": "Existence_MissingReference_domainIncludes" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "NoCsv.mcf", + "lineNumber": "59" + }, + "userMessage": "Found orphan local ref :: ref: 'l:USACountry', property: 'containedInPlace', node: 'dcid:dc/mx44'", + "counterKey": "Resolution_OrphanLocalReference_containedInPlace" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "NoCsv.mcf", + "lineNumber": "10" + }, + "userMessage": "Failed to assign DCID :: type: 'City', node: 'CityStats/E2/2'", + "counterKey": "Resolution_DcidAssignmentFailure_City" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "NoCsv.mcf", + "lineNumber": "41" + }, + "userMessage": "Unable to replace a local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/4'", + "counterKey": "Resolution_IrreplaceableLocalRef" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "NoCsv.mcf", + "lineNumber": "32" + }, + "userMessage": "Unable to replace a local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/3'", + "counterKey": "Resolution_IrreplaceableLocalRef" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "NoCsv.mcf", + "lineNumber": "23" + }, + "userMessage": "Unable to replace a local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/2'", + "counterKey": "Resolution_IrreplaceableLocalRef" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "NoCsv.mcf", + "lineNumber": "15" + }, + "userMessage": "Unable to replace a local reference :: ref: 'CityStats/E2/2', node: 'CityStats/E3/2'", + "counterKey": "Resolution_IrreplaceableLocalRef" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "NoCsv.mcf", + "lineNumber": "41" + }, + "userMessage": "Unable to assign DCID due to unresolved local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/4'", + "counterKey": "Resolution_UnassignableNodeDcid" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "NoCsv.mcf", + "lineNumber": "32" + }, + "userMessage": "Unable to assign DCID due to unresolved local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/3'", + "counterKey": "Resolution_UnassignableNodeDcid" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "NoCsv.mcf", + "lineNumber": "23" + }, + "userMessage": "Unable to assign DCID due to unresolved local reference :: ref: 'CityStats/E3/2', node: 'CityStats/E4/2'", + "counterKey": "Resolution_UnassignableNodeDcid" + }, { + "level": "LEVEL_ERROR", + "location": { + "file": "NoCsv.mcf", + "lineNumber": "15" + }, + "userMessage": "Unable to assign DCID due to unresolved local reference :: ref: 'CityStats/E2/2', node: 'CityStats/E3/2'", + "counterKey": "Resolution_UnassignableNodeDcid" }, { "level": "LEVEL_ERROR", "location": { @@ -506,7 +590,7 @@ "file": "NoCsv.tmcf", "lineNumber": "3" }, - "userMessage": "No definition found for a referenced 'E:' value :: reference: 'E:SVTest->E30', property: 'observationAbout' node: 'E:SVTest->E0'", + "userMessage": "No definition found for a referenced 'E:' value :: reference: 'E:SVTest->E3', property: 'observationAbout' node: 'E:SVTest->E0'", "counterKey": "Sanity_TmcfMissingEntityDef" }, { "level": "LEVEL_ERROR", @@ -514,7 +598,7 @@ "file": "NoCsv.tmcf", "lineNumber": "3" }, - "userMessage": "No definition found for a referenced 'E:' value :: reference: 'E:SVTest->E3', property: 'observationAbout' node: 'E:SVTest->E0'", + "userMessage": "No definition found for a referenced 'E:' value :: reference: 'E:SVTest->E30', property: 'observationAbout' node: 'E:SVTest->E0'", "counterKey": "Sanity_TmcfMissingEntityDef" }, { "level": "LEVEL_ERROR", @@ -570,7 +654,7 @@ "file": "NoCsv.tmcf", "lineNumber": "19" }, - "userMessage": "No definition found for a referenced 'E:' value :: reference: 'E:SVTest->E13', property: 'dcid' node: 'E:SVTest->E3'", + "userMessage": "No definition found for a referenced 'E:' value :: reference: 'E:SVTest->E10', property: 'dcid' node: 'E:SVTest->E3'", "counterKey": "Sanity_TmcfMissingEntityDef" }, { "level": "LEVEL_ERROR", @@ -578,7 +662,7 @@ "file": "NoCsv.tmcf", "lineNumber": "19" }, - "userMessage": "No definition found for a referenced 'E:' value :: reference: 'E:SVTest->E10', property: 'dcid' node: 'E:SVTest->E3'", + "userMessage": "No definition found for a referenced 'E:' value :: reference: 'E:SVTest->E13', property: 'dcid' node: 'E:SVTest->E3'", "counterKey": "Sanity_TmcfMissingEntityDef" }, { "level": "LEVEL_ERROR", @@ -623,7 +707,7 @@ }], "commandArgs": { "existenceChecks": true, - "resolution": "RESOLUTION_MODE_NONE", + "resolution": "RESOLUTION_MODE_LOCAL", "numThreads": 1, "statChecks": true } diff --git a/tool/src/test/resources/org/datacommons/tool/lint/statchecks/input/covid.mcf b/tool/src/test/resources/org/datacommons/tool/lint/statchecks/input/covid.mcf index 82577a8a..6a0d363a 100644 --- a/tool/src/test/resources/org/datacommons/tool/lint/statchecks/input/covid.mcf +++ b/tool/src/test/resources/org/datacommons/tool/lint/statchecks/input/covid.mcf @@ -134,7 +134,7 @@ value: 1 typeOf: dcid:StatVarObservation dcid: "dc/o/x2fe937dfz44d" -Node: COVID19_cases_india/E0/17 +Node: COVID19_cases_india/E0/18 observationDate: "2020-05-03" observationAbout: dcid:geoId/06 variableMeasured: dcid:CumulativeCount_MedicalTest_ConditionCOVID_19_Positive diff --git a/tool/src/test/resources/org/datacommons/tool/lint/statchecks/output/report.json b/tool/src/test/resources/org/datacommons/tool/lint/statchecks/output/report.json index ebd669b0..723951a8 100644 --- a/tool/src/test/resources/org/datacommons/tool/lint/statchecks/output/report.json +++ b/tool/src/test/resources/org/datacommons/tool/lint/statchecks/output/report.json @@ -24,9 +24,9 @@ "level": "LEVEL_ERROR", "location": { "file": "covid.mcf", - "lineNumber": "25" + "lineNumber": "17" }, - "userMessage": "Found nodes with different values for the same StatVarObservation :: observationAbout: 'geoId/06', variableMeasured: 'CumulativeCount_MedicalTest_ConditionCOVID_19_Positive', observationDate: '2020-02-03', value1: 3.0, value2: 8.0", + "userMessage": "Found nodes with different values for the same StatVarObservation :: observationAbout: 'geoId/06', variableMeasured: 'CumulativeCount_MedicalTest_ConditionCOVID_19_Positive', observationDate: '2020-02-03', value1: 8.0, value2: 3.0", "counterKey": "Sanity_InconsistentSvObsValues" }], "statsCheckSummary": [{ @@ -41,16 +41,16 @@ "problemPoints": [{ "date": "2020-02-03", "values": [{ - "value": 3.0, + "value": 8.0, "locations": [{ "file": "covid.mcf", - "lineNumber": "17" + "lineNumber": "25" }] }, { - "value": 8.0, + "value": 3.0, "locations": [{ "file": "covid.mcf", - "lineNumber": "25" + "lineNumber": "17" }] }] }] @@ -111,7 +111,7 @@ }], "commandArgs": { "existenceChecks": true, - "resolution": "RESOLUTION_MODE_NONE", + "resolution": "RESOLUTION_MODE_LOCAL", "numThreads": 1, "statChecks": true }