Commit 90ee5431 authored by Wohlgemuth, Jason's avatar Wohlgemuth, Jason
Browse files

feat: Initial input concurrency capability (needs testing)

parent e521b9a1
Loading
Loading
Loading
Loading
Loading
+672 −630
Original line number Diff line number Diff line
@@ -108,170 +108,37 @@ LH:0
end_of_record
TN:
SF:/root/dev/command/pipe-cli/src/commands/run/mod.rs
FNF:0
DA:21,0
DA:22,0
DA:35,0
FN:13,run
FNF:1
FNDA:0,run
DA:13,0
DA:23,0
DA:24,0
DA:25,0
DA:27,0
DA:28,0
DA:30,0
DA:32,0
DA:33,0
DA:34,0
DA:36,0
DA:37,0
DA:38,0
DA:39,0
DA:40,0
DA:43,0
DA:44,0
DA:41,0
DA:45,0
DA:46,0
DA:47,0
DA:48,0
DA:49,0
DA:51,0
DA:52,0
DA:53,0
DA:54,0
DA:55,0
DA:59,0
DA:56,0
DA:57,0
DA:60,0
DA:61,0
DA:65,0
DA:67,0
DA:70,0
DA:75,0
DA:77,0
DA:82,0
DA:85,0
DA:88,0
DA:90,0
DA:92,0
DA:94,0
DA:97,0
DA:98,0
DA:99,0
DA:102,0
DA:104,0
DA:105,0
DA:106,0
DA:108,0
DA:113,0
DA:115,0
DA:117,0
DA:119,0
DA:120,0
DA:124,0
DA:125,0
DA:126,0
DA:129,0
DA:131,0
DA:132,0
DA:134,0
DA:137,0
DA:138,0
DA:140,0
DA:141,0
DA:143,0
DA:144,0
DA:145,0
DA:146,0
DA:147,0
DA:148,0
DA:150,0
DA:160,0
DA:161,0
DA:162,0
DA:163,0
DA:165,0
DA:169,0
DA:171,0
DA:173,0
DA:174,0
DA:178,0
DA:188,0
DA:189,0
DA:190,0
DA:191,0
DA:193,0
DA:198,0
DA:199,0
DA:203,0
DA:206,0
DA:209,0
DA:211,0
DA:213,0
DA:220,0
DA:221,0
DA:223,0
DA:224,0
DA:225,0
DA:226,0
DA:227,0
DA:228,0
DA:229,0
DA:231,0
DA:234,0
DA:237,0
DA:240,0
DA:242,0
DA:243,0
DA:244,0
DA:245,0
DA:246,0
DA:247,0
DA:248,0
DA:250,0
DA:253,0
DA:256,0
DA:260,0
DA:261,0
DA:262,0
DA:263,0
DA:264,0
DA:266,0
DA:267,0
DA:268,0
DA:269,0
DA:270,0
DA:271,0
DA:272,0
DA:273,0
DA:275,0
DA:278,0
DA:281,0
DA:284,0
DA:286,0
DA:291,0
DA:301,0
DA:302,0
DA:303,0
DA:305,0
DA:306,0
DA:308,0
DA:310,0
DA:311,0
DA:312,0
DA:314,0
DA:315,0
DA:317,0
DA:318,0
DA:319,0
DA:322,0
DA:323,0
DA:327,0
DA:328,0
DA:330,0
DA:331,0
DA:332,0
DA:333,0
DA:334,0
DA:335,0
DA:336,0
DA:338,0
DA:340,0
DA:341,0
DA:346,0
DA:348,0
DA:349,0
DA:350,0
DA:354,0
DA:355,0
DA:359,0
DA:361,0
LF:162
LF:27
LH:0
end_of_record
TN:
@@ -393,76 +260,87 @@ LH:0
end_of_record
TN:
SF:/root/dev/command/pipe-lib/src/lib.rs
FN:468,Command::test
FN:491,Config::read
FN:515,Config::read_json
FN:536,Config::read_yaml
FN:553,Config::set_environment_variables
FN:569,Config::verify_requirements
FN:587,Config::verify_resources
FN:592,<impl PartialEq for Details>::eq
FN:599,EnvironmentValue::from_string
FN:602,EnvironmentValue::from_value
FN:610,EnvironmentValue::prepend_prefix
FN:614,EnvironmentValue::trim_prefix
FN:618,EnvironmentValue::get_from_config
FN:625,EnvironmentValue::get_from_serde
FN:639,EnvironmentValue::get_all
FN:649,EnvironmentValue::print_all
FN:654,EnvironmentValue::set_variable
FN:664,EnvironmentValue::set_variables
FN:671,Extension::from_string
FN:680,Label::dry_run
FN:684,Label::invalid
FN:688,Label::fail
FN:692,Label::found
FN:696,Label::not_found
FN:700,Label::output
FN:704,Label::pass
FN:708,Label::read
FN:712,Label::rejected
FN:716,Label::run
FN:720,Label::using
FN:726,ModuleUri<'_>::from
FN:736,ModuleUri<'_>::hash
FN:760,ModuleUri<'_>::get_whitelist
FN:763,ModuleUri<'_>::is_allowed
FN:766,ModuleUri<'_>::test
FN:767,ModuleUri<'_>::test::check
FN:784,ModuleUri<'_>::working_directory
FN:796,SemanticVersion::from_string
FN:805,Script::ensure_relative
FN:824,Script::expand_arguments
FN:859,Script::expand_arguments_from
FN:894,Script::from_module
FN:952,Script::from_path
FN:967,Script::from_template
FN:987,Script::get_command
FN:997,Script::get_arguments
FN:1037,Script::maybe_create_virtual_environment
FN:1082,Script::maybe_git_clone
FN:1089,Script::python_default
FN:1103,Script::run
FN:1170,Script::with_container
FN:1177,Script::with_current_dir
FN:1182,Script::with_envs
FN:1224,Script::with_virtual_environment
FN:1230,ScriptTemplate::from_path
FN:1242,ScriptTemplate::resolve_python_virtual_environment
FN:1270,StringTemplate::new
FN:1279,StringTemplate::expand
FN:1286,StringTemplate::get_variable
FN:1316,StringTemplate::is_handlebars
FN:1351,StringTemplate::remove_spaces
FN:1361,add_dot_slash
FN:1369,add_forward_slash
FN:1376,download_binary
FN:1377,download_binary::download
FNF:65
FN:467,Command::test
FN:490,Config::get_environment_variables
FN:502,Config::get_inputs
FN:539,Config::prepare_modules
FN:721,Config::read
FN:745,Config::read_json
FN:766,Config::read_yaml
FN:786,Config::run_workflow
FN:858,Config::set_environment_variables
FN:874,Config::verify_requirements
FN:892,Config::verify_resources
FN:901,<impl PartialEq for Details>::eq
FN:908,EnvironmentValue::from_string
FN:911,EnvironmentValue::from_value
FN:919,EnvironmentValue::prepend_prefix
FN:923,EnvironmentValue::trim_prefix
FN:927,EnvironmentValue::get_from_serde
FN:941,EnvironmentValue::get_all
FN:951,EnvironmentValue::print_all
FN:956,EnvironmentValue::set_variable
FN:966,EnvironmentValue::set_variables
FN:973,Extension::from_string
FN:982,Label::dry_run
FN:986,Label::invalid
FN:989,Label::fmt_invalid
FN:993,Label::fail
FN:996,Label::fmt_fail
FN:1000,Label::found
FN:1004,Label::not_found
FN:1007,Label::fmt_not_found
FN:1011,Label::output
FN:1014,Label::fmt_output
FN:1018,Label::pass
FN:1022,Label::read
FN:1026,Label::rejected
FN:1030,Label::run
FN:1034,Label::using
FN:1040,ModuleUri<'_>::from
FN:1050,ModuleUri<'_>::hash
FN:1074,ModuleUri<'_>::get_whitelist
FN:1077,ModuleUri<'_>::is_allowed
FN:1080,ModuleUri<'_>::test
FN:1081,ModuleUri<'_>::test::check
FN:1098,ModuleUri<'_>::working_directory
FN:1110,SemanticVersion::from_string
FN:1119,Script::ensure_relative
FN:1138,Script::expand_arguments
FN:1173,Script::expand_arguments_from
FN:1208,Script::from_module
FN:1266,Script::from_path
FN:1281,Script::from_template
FN:1301,Script::get_command
FN:1311,Script::get_arguments
FN:1351,Script::maybe_create_virtual_environment
FN:1392,Script::maybe_git_clone
FN:1399,Script::python_default
FN:1413,Script::run
FN:1480,Script::with_container
FN:1487,Script::with_current_dir
FN:1492,Script::with_envs
FN:1534,Script::with_virtual_environment
FN:1540,ScriptTemplate::from_path
FN:1552,ScriptTemplate::resolve_python_virtual_environment
FN:1580,StringTemplate::new
FN:1589,StringTemplate::expand
FN:1596,StringTemplate::get_variable
FN:1626,StringTemplate::is_handlebars
FN:1661,StringTemplate::remove_spaces
FN:1671,add_dot_slash
FN:1679,add_forward_slash
FN:1686,download_binary
FN:1687,download_binary::download
FNF:72
FNDA:1,Command::test
FNDA:0,Config::get_environment_variables
FNDA:0,Config::get_inputs
FNDA:0,Config::prepare_modules
FNDA:1,Config::read
FNDA:1,Config::read_json
FNDA:1,Config::read_yaml
FNDA:0,Config::run_workflow
FNDA:0,Config::set_environment_variables
FNDA:0,Config::verify_requirements
FNDA:0,Config::verify_resources
@@ -471,7 +349,6 @@ FNDA:0,EnvironmentValue::from_string
FNDA:0,EnvironmentValue::from_value
FNDA:0,EnvironmentValue::prepend_prefix
FNDA:1,EnvironmentValue::trim_prefix
FNDA:0,EnvironmentValue::get_from_config
FNDA:0,EnvironmentValue::get_from_serde
FNDA:1,EnvironmentValue::get_all
FNDA:0,EnvironmentValue::print_all
@@ -480,10 +357,14 @@ FNDA:0,EnvironmentValue::set_variables
FNDA:1,Extension::from_string
FNDA:0,Label::dry_run
FNDA:0,Label::invalid
FNDA:0,Label::fmt_invalid
FNDA:0,Label::fail
FNDA:0,Label::fmt_fail
FNDA:0,Label::found
FNDA:0,Label::not_found
FNDA:0,Label::fmt_not_found
FNDA:1,Label::output
FNDA:3,Label::fmt_output
FNDA:0,Label::pass
FNDA:0,Label::read
FNDA:0,Label::rejected
@@ -524,507 +405,668 @@ FNDA:1,add_dot_slash
FNDA:1,add_forward_slash
FNDA:0,download_binary
FNDA:0,download_binary::download
DA:468,1
DA:469,2
DA:470,1
DA:467,1
DA:468,2
DA:469,1
DA:470,5
DA:471,4
DA:472,4
DA:474,6
DA:475,2
DA:473,6
DA:474,2
DA:477,0
DA:478,0
DA:479,0
DA:484,3
DA:485,1
DA:491,1
DA:492,2
DA:493,2
DA:494,1
DA:483,3
DA:484,1
DA:490,0
DA:491,0
DA:492,0
DA:493,0
DA:494,0
DA:495,0
DA:497,2
DA:498,1
DA:499,0
DA:503,2
DA:504,1
DA:496,0
DA:502,0
DA:503,0
DA:504,0
DA:505,0
DA:506,0
DA:507,0
DA:515,1
DA:516,2
DA:517,2
DA:509,0
DA:510,0
DA:511,0
DA:513,0
DA:514,0
DA:518,0
DA:519,0
DA:520,0
DA:523,3
DA:524,2
DA:525,4
DA:526,0
DA:528,6
DA:529,2
DA:536,1
DA:537,2
DA:538,1
DA:523,0
DA:524,0
DA:529,0
DA:539,0
DA:540,0
DA:541,0
DA:544,2
DA:545,1
DA:546,2
DA:542,0
DA:544,0
DA:547,0
DA:549,3
DA:550,1
DA:548,0
DA:549,0
DA:550,0
DA:551,0
DA:552,0
DA:553,0
DA:554,0
DA:555,0
DA:556,0
DA:557,0
DA:558,0
DA:559,0
DA:563,0
DA:569,0
DA:570,0
DA:571,0
DA:572,0
DA:573,0
DA:574,0
DA:575,0
DA:579,0
DA:581,0
DA:587,0
DA:588,0
DA:592,1
DA:593,1
DA:599,0
DA:600,0
DA:586,0
DA:589,0
DA:592,0
DA:594,0
DA:596,0
DA:598,0
DA:601,0
DA:602,0
DA:603,0
DA:604,0
DA:605,0
DA:606,0
DA:607,0
DA:608,0
DA:609,0
DA:610,0
DA:611,0
DA:614,1
DA:615,1
DA:616,2
DA:618,0
DA:612,0
DA:617,0
DA:619,0
DA:620,0
DA:621,0
DA:622,0
DA:623,0
DA:625,0
DA:626,0
DA:627,0
DA:624,0
DA:628,0
DA:629,0
DA:630,0
DA:631,0
DA:632,0
DA:633,0
DA:635,0
DA:637,0
DA:639,1
DA:640,1
DA:641,2
DA:642,2
DA:643,2
DA:644,2
DA:645,1
DA:636,0
DA:638,0
DA:641,0
DA:642,0
DA:644,0
DA:645,0
DA:647,0
DA:648,0
DA:649,0
DA:650,0
DA:651,0
DA:652,0
DA:654,0
DA:655,0
DA:656,0
DA:657,0
DA:658,0
DA:659,0
DA:660,0
DA:664,0
DA:665,0
DA:666,0
DA:667,0
DA:671,1
DA:672,2
DA:673,2
DA:674,3
DA:669,0
DA:673,0
DA:675,0
DA:680,0
DA:681,0
DA:677,0
DA:678,0
DA:682,0
DA:684,0
DA:685,0
DA:686,0
DA:688,0
DA:689,0
DA:690,0
DA:692,0
DA:693,0
DA:694,0
DA:696,0
DA:695,0
DA:697,0
DA:698,0
DA:700,1
DA:701,3
DA:702,3
DA:704,0
DA:705,0
DA:706,0
DA:708,0
DA:709,0
DA:702,0
DA:703,0
DA:707,0
DA:710,0
DA:712,0
DA:713,0
DA:714,0
DA:716,0
DA:715,0
DA:717,0
DA:718,0
DA:720,0
DA:721,0
DA:722,0
DA:726,2
DA:719,0
DA:721,1
DA:722,2
DA:723,2
DA:724,1
DA:725,0
DA:727,2
DA:728,5
DA:729,2
DA:730,2
DA:731,0
DA:733,1
DA:736,1
DA:737,1
DA:738,1
DA:739,2
DA:740,2
DA:741,0
DA:743,4
DA:747,4
DA:748,4
DA:750,4
DA:751,2
DA:753,4
DA:728,1
DA:729,0
DA:733,2
DA:734,1
DA:736,0
DA:737,0
DA:745,1
DA:746,2
DA:747,2
DA:749,0
DA:750,0
DA:753,3
DA:754,2
DA:755,4
DA:756,0
DA:760,0
DA:761,0
DA:763,0
DA:764,0
DA:766,0
DA:767,0
DA:768,0
DA:758,6
DA:759,2
DA:766,1
DA:767,2
DA:768,1
DA:770,0
DA:771,0
DA:772,0
DA:773,0
DA:774,0
DA:775,0
DA:776,0
DA:778,0
DA:780,0
DA:784,0
DA:785,0
DA:774,2
DA:775,1
DA:776,2
DA:777,0
DA:779,3
DA:780,1
DA:786,0
DA:787,0
DA:788,0
DA:789,0
DA:790,0
DA:791,0
DA:796,1
DA:797,1
DA:798,3
DA:799,3
DA:800,3
DA:805,1
DA:806,1
DA:807,2
DA:808,1
DA:824,1
DA:825,2
DA:828,2
DA:829,1
DA:830,2
DA:831,1
DA:832,1
DA:834,2
DA:838,1
DA:839,1
DA:859,1
DA:860,2
DA:863,2
DA:864,1
DA:865,2
DA:866,2
DA:869,2
DA:871,1
DA:873,2
DA:877,1
DA:878,1
DA:894,0
DA:896,0
DA:897,0
DA:898,0
DA:901,0
DA:902,0
DA:903,0
DA:904,0
DA:905,0
DA:907,0
DA:792,0
DA:793,0
DA:794,0
DA:795,0
DA:797,0
DA:800,0
DA:803,0
DA:806,0
DA:808,0
DA:809,0
DA:810,0
DA:811,0
DA:812,0
DA:813,0
DA:814,0
DA:816,0
DA:819,0
DA:822,0
DA:826,0
DA:827,0
DA:828,0
DA:829,0
DA:830,0
DA:832,0
DA:833,0
DA:835,0
DA:836,0
DA:837,0
DA:838,0
DA:839,0
DA:840,0
DA:841,0
DA:843,0
DA:846,0
DA:849,0
DA:852,0
DA:854,0
DA:858,0
DA:859,0
DA:860,0
DA:861,0
DA:862,0
DA:863,0
DA:868,0
DA:874,0
DA:875,0
DA:876,0
DA:877,0
DA:878,0
DA:879,0
DA:880,0
DA:884,0
DA:886,0
DA:892,0
DA:893,0
DA:901,1
DA:902,1
DA:908,0
DA:909,0
DA:911,0
DA:912,0
DA:913,0
DA:914,0
DA:915,0
DA:918,0
DA:916,0
DA:919,0
DA:920,0
DA:923,0
DA:925,0
DA:926,0
DA:923,1
DA:924,1
DA:925,2
DA:927,0
DA:928,0
DA:929,0
DA:930,0
DA:931,0
DA:932,0
DA:933,0
DA:934,0
DA:935,0
DA:936,0
DA:952,1
DA:953,1
DA:954,1
DA:967,1
DA:968,1
DA:969,3
DA:973,2
DA:937,0
DA:939,0
DA:941,1
DA:942,1
DA:943,2
DA:944,2
DA:945,2
DA:946,2
DA:947,1
DA:951,0
DA:952,0
DA:953,0
DA:956,0
DA:957,0
DA:958,0
DA:959,0
DA:960,0
DA:961,0
DA:962,0
DA:966,0
DA:967,0
DA:969,0
DA:973,1
DA:974,2
DA:975,2
DA:977,2
DA:981,1
DA:982,1
DA:983,1
DA:985,2
DA:987,1
DA:988,1
DA:989,1
DA:990,1
DA:992,1
DA:993,2
DA:994,1
DA:997,1
DA:998,1
DA:999,1
DA:1000,1
DA:1001,1
DA:1002,1
DA:1003,0
DA:976,3
DA:977,0
DA:982,0
DA:983,0
DA:984,0
DA:986,0
DA:987,0
DA:989,0
DA:990,0
DA:991,0
DA:993,0
DA:994,0
DA:996,0
DA:997,0
DA:998,0
DA:1000,0
DA:1001,0
DA:1002,0
DA:1004,0
DA:1005,0
DA:1006,0
DA:1009,2
DA:1010,1
DA:1012,1
DA:1014,1
DA:1015,1
DA:1016,1
DA:1017,2
DA:1018,2
DA:1020,1
DA:1022,2
DA:1023,2
DA:1025,0
DA:1007,0
DA:1008,0
DA:1009,0
DA:1011,1
DA:1012,3
DA:1014,3
DA:1015,3
DA:1016,3
DA:1018,0
DA:1019,0
DA:1020,0
DA:1022,0
DA:1023,0
DA:1024,0
DA:1026,0
DA:1029,1
DA:1030,1
DA:1032,1
DA:1037,0
DA:1042,0
DA:1043,0
DA:1044,0
DA:1046,0
DA:1047,0
DA:1048,0
DA:1049,0
DA:1050,0
DA:1051,0
DA:1053,0
DA:1054,0
DA:1027,0
DA:1028,0
DA:1030,0
DA:1031,0
DA:1032,0
DA:1034,0
DA:1035,0
DA:1036,0
DA:1040,2
DA:1041,2
DA:1042,3
DA:1043,1
DA:1044,2
DA:1045,0
DA:1047,1
DA:1050,1
DA:1051,1
DA:1052,1
DA:1053,1
DA:1054,1
DA:1055,0
DA:1056,0
DA:1057,0
DA:1058,0
DA:1059,0
DA:1061,0
DA:1062,0
DA:1065,0
DA:1069,0
DA:1057,2
DA:1061,2
DA:1062,2
DA:1064,2
DA:1065,2
DA:1067,2
DA:1070,0
DA:1073,0
DA:1074,0
DA:1075,0
DA:1077,0
DA:1078,0
DA:1082,1
DA:1083,2
DA:1084,2
DA:1085,2
DA:1086,3
DA:1087,1
DA:1080,0
DA:1081,0
DA:1082,0
DA:1084,0
DA:1085,0
DA:1086,0
DA:1087,0
DA:1088,0
DA:1089,0
DA:1090,0
DA:1091,0
DA:1092,0
DA:1094,0
DA:1098,0
DA:1099,0
DA:1103,1
DA:1104,1
DA:1105,1
DA:1106,2
DA:1107,2
DA:1108,3
DA:1109,1
DA:1110,7
DA:1111,2
DA:1112,1
DA:1113,1
DA:1114,1
DA:1115,1
DA:1120,2
DA:1121,1
DA:1123,0
DA:1124,0
DA:1127,1
DA:1128,1
DA:1129,2
DA:1130,2
DA:1133,2
DA:1134,1
DA:1136,0
DA:1137,0
DA:1140,1
DA:1141,1
DA:1100,0
DA:1101,0
DA:1102,0
DA:1104,0
DA:1105,0
DA:1110,1
DA:1111,1
DA:1112,3
DA:1113,3
DA:1114,3
DA:1119,1
DA:1120,1
DA:1121,2
DA:1122,1
DA:1138,1
DA:1139,2
DA:1142,2
DA:1143,3
DA:1143,1
DA:1144,2
DA:1147,2
DA:1148,1
DA:1149,3
DA:1150,1
DA:1151,3
DA:1152,3
DA:1145,1
DA:1146,1
DA:1148,2
DA:1152,1
DA:1153,1
DA:1155,0
DA:1156,0
DA:1157,0
DA:1160,0
DA:1161,0
DA:1162,0
DA:1166,0
DA:1167,0
DA:1170,1
DA:1171,1
DA:1172,1
DA:1177,1
DA:1178,2
DA:1179,1
DA:1182,0
DA:1183,0
DA:1184,0
DA:1224,1
DA:1225,1
DA:1226,1
DA:1230,1
DA:1231,2
DA:1232,1
DA:1173,1
DA:1174,2
DA:1177,2
DA:1178,1
DA:1179,2
DA:1180,2
DA:1183,2
DA:1185,1
DA:1187,2
DA:1191,1
DA:1192,1
DA:1208,0
DA:1210,0
DA:1211,0
DA:1212,0
DA:1215,0
DA:1216,0
DA:1217,0
DA:1218,0
DA:1219,0
DA:1221,0
DA:1222,0
DA:1223,0
DA:1226,0
DA:1227,0
DA:1228,0
DA:1229,0
DA:1232,0
DA:1233,0
DA:1234,0
DA:1235,0
DA:1238,2
DA:1240,1
DA:1242,0
DA:1237,0
DA:1239,0
DA:1240,0
DA:1243,0
DA:1244,0
DA:1245,0
DA:1246,0
DA:1247,0
DA:1248,0
DA:1249,0
DA:1251,0
DA:1252,0
DA:1253,0
DA:1258,0
DA:1259,0
DA:1260,0
DA:1270,2
DA:1272,2
DA:1279,1
DA:1280,6
DA:1281,5
DA:1286,1
DA:1250,0
DA:1266,1
DA:1267,1
DA:1268,1
DA:1281,1
DA:1282,1
DA:1283,3
DA:1287,2
DA:1288,2
DA:1289,1
DA:1290,2
DA:1292,0
DA:1316,2
DA:1317,4
DA:1318,4
DA:1319,2
DA:1289,2
DA:1291,2
DA:1295,1
DA:1296,1
DA:1297,1
DA:1299,2
DA:1301,1
DA:1302,1
DA:1303,1
DA:1304,1
DA:1306,1
DA:1307,2
DA:1308,1
DA:1311,1
DA:1312,1
DA:1313,1
DA:1314,1
DA:1315,1
DA:1316,1
DA:1317,0
DA:1319,0
DA:1320,0
DA:1322,0
DA:1351,1
DA:1352,2
DA:1353,1
DA:1323,2
DA:1324,2
DA:1326,1
DA:1328,1
DA:1329,1
DA:1330,2
DA:1331,2
DA:1332,2
DA:1334,2
DA:1336,4
DA:1337,2
DA:1339,0
DA:1340,0
DA:1343,2
DA:1344,2
DA:1346,1
DA:1351,0
DA:1352,0
DA:1353,0
DA:1354,0
DA:1356,3
DA:1357,1
DA:1361,1
DA:1362,2
DA:1363,2
DA:1365,4
DA:1369,1
DA:1370,2
DA:1356,0
DA:1357,0
DA:1358,0
DA:1359,0
DA:1360,0
DA:1361,0
DA:1363,0
DA:1364,0
DA:1365,0
DA:1366,0
DA:1367,0
DA:1368,0
DA:1369,0
DA:1371,0
DA:1373,2
DA:1376,0
DA:1377,0
DA:1378,0
DA:1372,0
DA:1375,0
DA:1379,0
DA:1380,0
DA:1381,0
DA:1382,0
DA:1383,0
DA:1384,0
DA:1385,0
DA:1386,0
DA:1387,0
DA:1389,0
DA:1391,0
DA:1394,0
DA:1395,0
DA:1396,0
DA:1397,0
DA:1409,1
DA:1410,2
DA:1411,2
DA:1412,2
DA:1413,2
DA:1414,5
DA:1417,1
DA:1419,2
DA:1421,4
DA:1424,0
DA:1388,0
DA:1392,1
DA:1393,2
DA:1394,2
DA:1395,2
DA:1396,3
DA:1397,1
DA:1399,0
DA:1400,0
DA:1401,0
DA:1409,0
DA:1413,1
DA:1414,1
DA:1415,1
DA:1416,2
DA:1417,2
DA:1418,3
DA:1419,1
DA:1420,7
DA:1421,2
DA:1422,1
DA:1423,1
DA:1424,1
DA:1425,1
DA:1430,2
DA:1431,1
DA:1433,0
DA:1434,0
DA:1437,1
DA:1438,1
DA:1439,2
DA:1440,2
DA:1443,2
DA:1444,1
DA:1446,0
DA:1447,0
DA:1450,1
DA:1451,1
DA:1452,2
DA:1453,2
DA:1454,1
DA:1455,6
DA:1467,1
DA:1469,0
DA:1471,1
DA:1486,1
DA:1453,3
DA:1454,2
DA:1457,2
DA:1458,1
DA:1459,3
DA:1460,1
DA:1461,3
DA:1462,3
DA:1463,1
DA:1465,0
DA:1466,0
DA:1467,0
DA:1470,0
DA:1471,0
DA:1472,0
DA:1476,0
DA:1477,0
DA:1480,1
DA:1481,1
DA:1482,1
DA:1487,1
DA:1490,1
DA:1491,3
DA:1503,1
DA:1504,1
DA:1507,0
DA:1508,0
DA:1509,0
DA:1511,0
DA:1515,0
DA:1516,0
DA:1517,0
DA:1519,0
DA:1533,2
DA:1534,2
DA:1535,4
DA:1536,4
DA:1537,12
DA:1538,8
DA:1488,2
DA:1489,1
DA:1492,0
DA:1493,0
DA:1494,0
DA:1534,1
DA:1535,1
DA:1536,1
DA:1540,1
DA:1541,3
DA:1541,2
DA:1542,1
DA:1545,1
DA:1547,1
DA:1548,4
LF:501
LH:252
DA:1544,0
DA:1545,0
DA:1548,2
DA:1550,1
DA:1552,0
DA:1553,0
DA:1554,0
DA:1555,0
DA:1556,0
DA:1557,0
DA:1558,0
DA:1559,0
DA:1561,0
DA:1562,0
DA:1563,0
DA:1568,0
DA:1569,0
DA:1570,0
DA:1580,2
DA:1582,2
DA:1589,1
DA:1590,6
DA:1591,5
DA:1596,1
DA:1597,2
DA:1598,2
DA:1599,1
DA:1600,2
DA:1602,0
DA:1626,2
DA:1627,4
DA:1628,4
DA:1629,2
DA:1630,0
DA:1632,0
DA:1661,1
DA:1662,2
DA:1663,1
DA:1664,0
DA:1666,3
DA:1667,1
DA:1671,1
DA:1672,2
DA:1673,2
DA:1675,4
DA:1679,1
DA:1680,2
DA:1681,0
DA:1683,2
DA:1686,0
DA:1687,0
DA:1688,0
DA:1689,0
DA:1690,0
DA:1691,0
DA:1692,0
DA:1693,0
DA:1694,0
DA:1695,0
DA:1696,0
DA:1697,0
DA:1699,0
DA:1701,0
DA:1704,0
DA:1705,0
DA:1706,0
DA:1707,0
DA:1722,1
DA:1723,1
DA:1724,4
DA:1725,2
DA:1729,1
DA:1730,2
DA:1731,2
DA:1732,2
DA:1733,2
DA:1734,5
DA:1737,1
DA:1739,2
DA:1741,4
DA:1744,0
DA:1771,1
DA:1772,2
DA:1773,2
DA:1774,1
DA:1775,6
DA:1787,1
DA:1789,0
DA:1791,1
DA:1806,1
DA:1807,1
DA:1810,1
DA:1811,3
DA:1823,1
DA:1824,1
DA:1827,0
DA:1828,0
DA:1829,0
DA:1831,0
DA:1835,0
DA:1836,0
DA:1837,0
DA:1839,0
DA:1843,0
DA:1845,0
DA:1851,1
DA:1853,2
DA:1854,1
DA:1855,1
DA:1857,3
DA:1870,2
DA:1871,2
DA:1872,4
DA:1873,4
DA:1874,12
DA:1875,8
DA:1877,1
DA:1878,3
DA:1879,1
DA:1882,1
DA:1884,1
DA:1885,8
LF:662
LH:263
end_of_record
+20 −30
Original line number Diff line number Diff line
%% Cell type:code id: tags:

``` rust
:dep pipe-lib = { path = "../pipe-lib" }
```

%% Cell type:code id: tags:

``` rust
:dep reqwest
:dep tokio = { version = "1.39.2", features = ["rt", "time", "rt-multi-thread"] }
:dep bytes
```

%% Cell type:code id: tags:

``` rust
use std::io::copy;
use std::io::Cursor;
use std::fs::File;
use std::fs;
use std::path::PathBuf;
use tokio;

pub fn download_binary(url: String, destination: PathBuf) -> Result<PathBuf, String> {
    async fn download(url: String, destination: PathBuf) -> Result<(), String> {
        let client = reqwest::Client::new();
        let response = client.get(url.clone()).send();
        let filename = PathBuf::from(url.clone()).file_name().unwrap().to_str().unwrap().to_string();
        match response.await {
            | Ok(data) => match data.bytes().await {
                | Ok(content) => {
                    let mut output = File::create(destination.join(filename.clone())).unwrap();
                    let _ = copy(&mut Cursor::new(content.clone()), &mut output);
                    debug!(filename = filename, "=> {} Downloaded", Label::output());
                    Ok(())
                }
                | Err(_) => Err(format!("No content downloaded from {url}")),
            },
            | Err(_) => Err(format!("Failed to download {url}")),
        }
fn path_to_string(value: PathBuf) -> String {
    let path = value.as_path().as_os_str().to_str().unwrap().to_string();
    match fs::canonicalize(path.clone()) {
        | Ok(value) => value.to_str().unwrap().to_string(),
        | Err(_) => path,
    }
    let runtime = tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap();
    let _ = runtime.block_on(download(url.clone(), destination.clone()));
    let filename = PathBuf::from(url.clone()).file_name().unwrap().to_str().unwrap().to_string();
    Ok(destination.join(filename))
}

let path = "../";
let children = match fs::read_dir(path) {
    | Ok(value) => value.flat_map(|x| x).map(|x| x.path()).map(path_to_string).collect::<Vec<_>>(),
    | Err(_) => Vec::new(),
};

children
```

%% Output

    ["/root/dev/command/pipe-py", "/root/dev/command/pipe-cli", "/root/dev/command/.git", "/root/dev/command/CITATION.cff", "/root/dev/command/pipe-lib", "/root/dev/command/tests", "/root/dev/command/Makefile", "/root/dev/command/ROADMAP.md", "/root/dev/command/notebooks", "/root/dev/command/Cargo.lock", "/root/dev/command/target", "/root/dev/command/Cross.toml", "/root/dev/command/.rustfmt.toml", "/root/dev/command/.vscode", "/root/dev/command/.gitlab-ci.yml", "/root/dev/command/ARCHITECTURE.md", "/root/dev/command/LICENSE", "/root/dev/command/CONTRIBUTING.md", "/root/dev/command/README.md", "/root/dev/command/lcov.info", "/root/dev/command/.gitignore", "/root/dev/command/Cargo.toml"]

%% Cell type:code id: tags:

``` rust
let url = "https://code.ornl.gov/api/v4/projects/15383/packages/generic/x86_64-unknown-linux-gnu/v0.0.3/pipe".to_string();
let content = download_binary(url, PathBuf::from("/root/dev/notebooks"));
println!("{:?}", content);
std::env::current_dir()
```

%% Output

    Downloaded pipe
    Ok("/root/dev/command/notebooks")

%% Cell type:code id: tags:

``` rust
let path = "/tmp/pipe/iopbgzaGbV/pipe";
```
+10 −304

File changed.

Preview size limit exceeded, changes collapsed.

+364 −27

File changed.

Preview size limit exceeded, changes collapsed.

+28 −1
Original line number Diff line number Diff line
@@ -133,6 +133,19 @@ fn test_get_checksum_panic() {
    assert_eq!(get_checksum(PathBuf::from("/path/does/not/exist.txt")), "");
}

#[test]
fn test_get_children() {
    assert_eq!(get_children("../../does/not/exist".to_string()), Vec::<String>::new());
    match PathBuf::from("/root/dev/command").try_exists() {
        | Ok(true) => {
            let expected = to_string(vec!["/root/dev/command/pipe-lib/src", "/root/dev/command/pipe-lib/Cargo.toml"]);
            assert_eq!(get_children("../pipe-lib".to_string()), expected);
        }
        | Ok(false) => (),
        | Err(_) => (),
    };
}

#[test]
fn test_get_conda_environment_list() {
    let list = get_conda_environment_list();
@@ -222,6 +235,20 @@ fn test_module_uri_hash() {
    assert_eq!(expected, url.hash());
}

#[test]
fn test_path_to_string() {
    assert_eq!(path_to_string(PathBuf::from("foo/bar")), "foo/bar");
    assert_eq!(path_to_string(PathBuf::from("../../../does/not/exist")), "../../../does/not/exist");
    let path = "/root/dev/command/pipe-cli/Cargo.toml";
    match PathBuf::from(path).try_exists() {
        | Ok(true) => {
            assert_eq!(path_to_string(PathBuf::from("../pipe-cli/Cargo.toml")), path);
        }
        | Ok(false) => (),
        | Err(_) => (),
    }
}

#[test]
fn test_semantic_version() {
    let version = SemanticVersion::from_string("1.2.3");
@@ -450,7 +477,7 @@ fn test_script_get_arguments() {
fn test_script_git_clone() {
    let url = "https://code.ornl.gov/some/project".to_string();
    let current_dir = ".".to_string();
    if let Some(script) = Script::maybe_git_clone(url.clone(), current_dir, None) {
    if let Some(script) = Script::maybe_git_clone(url.clone(), current_dir) {
        assert_eq!(script.to_string(), format!("git clone {} code_ornl_gov_some_project", url.clone()));
    };
}