From 00e045ee6a5476e617cb9fd21093b426645eaac6 Mon Sep 17 00:00:00 2001 From: Rodrigo Racanicci Date: Tue, 21 Mar 2023 10:03:02 -0300 Subject: [PATCH] updating rust dependencies using cargo --- Cargo.lock | 406 +++++------ ...dp_aggregate_seeded_detailed_example.ipynb | 681 +++++++++--------- .../dp_aggregate_seeded_short_example.ipynb | 148 ++-- packages/lib-wasm/Cargo.toml | 1 + .../processing/aggregator/aggregate_stats.rs | 4 +- .../evaluator/microdata_data_stats.rs | 4 +- .../processing/navigator/navigate_result.rs | 5 +- .../base_synthesis_parameters.rs | 6 +- .../sds_processor/csv_data_parameters.rs | 6 +- .../processing/sds_processor/dp_parameters.rs | 6 +- .../processing/sds_processor/header_names.rs | 6 +- .../sds_processor/multi_value_columns.rs | 6 +- .../sds_processor/noisy_count_threshold.rs | 6 +- .../sds_processor/oversampling_parameters.rs | 6 +- .../src/processing/sds_processor/processor.rs | 2 +- .../lib-wasm/src/utils/js/ts_definitions.rs | 16 + 16 files changed, 649 insertions(+), 660 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7d99dcb..07c2f92 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15,18 +15,18 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.18" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" dependencies = [ "memchr", ] [[package]] name = "ansi_term" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ "winapi", ] @@ -53,15 +53,15 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base-x" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" [[package]] name = "bitflags" @@ -69,29 +69,17 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "bstr" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" -dependencies = [ - "lazy_static", - "memchr", - "regex-automata", - "serde", -] - [[package]] name = "bumpalo" -version = "3.8.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "bytemuck" -version = "1.12.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f5715e491b5a1598fc2bef5a606847b5dc1d48ea625bd3c02c00de8285591da" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" [[package]] name = "cc" @@ -107,9 +95,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "2.33.3" +version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", @@ -132,9 +120,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.1" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" dependencies = [ "cfg-if", "crossbeam-utils", @@ -142,9 +130,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ "cfg-if", "crossbeam-epoch", @@ -153,34 +141,32 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" dependencies = [ + "autocfg", "cfg-if", "crossbeam-utils", - "lazy_static", - "memoffset 0.6.5", + "memoffset", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.8" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if", - "lazy_static", ] [[package]] name = "csv" -version = "1.1.6" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" +checksum = "0b015497079b9a9d69c02ad25de6c0a6edef051ea6360a327d0bd05802ef64ad" dependencies = [ - "bstr", "csv-core", "itoa", "ryu", @@ -204,15 +190,15 @@ checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" [[package]] name = "either" -version = "1.6.1" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "env_logger" -version = "0.9.0" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" dependencies = [ "atty", "humantime", @@ -263,9 +249,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "js-sys", @@ -301,6 +287,15 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + [[package]] name = "hermit-abi" version = "0.3.1" @@ -315,9 +310,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "indoc" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05a0bd019339e5d968b37855180087b7b9d512c5046fbd244cf8c95687927d6e" +checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" [[package]] name = "instant" @@ -334,19 +329,20 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfa919a82ea574332e2de6e74b4c36e74d41982b335080fa59d4ef31be20fdf3" +checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" dependencies = [ + "hermit-abi 0.3.1", "libc", "windows-sys", ] [[package]] name = "is-terminal" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" +checksum = "8687c819457e979cc940d09cb16e42a1bf70aa6b60a549de6d3a62a0ee90c69e" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", @@ -356,24 +352,24 @@ dependencies = [ [[package]] name = "itertools" -version = "0.10.1" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" -version = "0.4.8" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "js-sys" -version = "0.3.55" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" dependencies = [ "wasm-bindgen", ] @@ -392,9 +388,9 @@ checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" [[package]] name = "libm" -version = "0.2.1" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" +checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" [[package]] name = "linux-raw-sys" @@ -404,18 +400,19 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "lock_api" -version = "0.4.5" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" dependencies = [ + "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.14" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if", ] @@ -440,18 +437,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" - -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" @@ -488,23 +476,23 @@ checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "num-complex" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" +checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" dependencies = [ "num-traits", ] [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", "num-traits", @@ -512,9 +500,9 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", "num-integer", @@ -523,9 +511,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", "libm", @@ -533,11 +521,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi 0.1.19", + "hermit-abi 0.2.6", "libc", ] @@ -560,40 +548,38 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.11.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "instant", "lock_api", "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if", - "instant", "libc", "redox_syscall", "smallvec", - "winapi", + "windows-sys", ] [[package]] name = "paste" -version = "1.0.6" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5" +checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" [[package]] name = "ppv-lite86" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro-error" @@ -604,7 +590,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -621,11 +607,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -637,7 +623,7 @@ dependencies = [ "cfg-if", "indoc", "libc", - "memoffset 0.8.0", + "memoffset", "parking_lot", "pyo3-build-config", "pyo3-ffi", @@ -674,7 +660,7 @@ dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -685,28 +671,27 @@ checksum = "dc1f43d8e30460f36350d18631ccf85ded64c059829208fe680904c65bcd0a4c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "quote" -version = "1.0.10" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] [[package]] name = "rand" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", "rand_core", - "rand_hc", ] [[package]] @@ -721,9 +706,9 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom", ] @@ -738,15 +723,6 @@ dependencies = [ "rand", ] -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core", -] - [[package]] name = "rawpointer" version = "0.2.1" @@ -755,60 +731,51 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.5.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ - "autocfg", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.5.6" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" dependencies = [ "aho-corasick", "memchr", "regex-syntax", ] -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" - [[package]] name = "regex-syntax" -version = "0.6.26" +version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "rustc_version" @@ -821,9 +788,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.9" +version = "0.36.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" +checksum = "db4165c9963ab29e422d6c26fbc1d37f15bace6b2810221f9d925023480fcf0e" dependencies = [ "bitflags", "errno", @@ -835,9 +802,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.5" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "safe_arch" @@ -850,9 +817,9 @@ dependencies = [ [[package]] name = "scoped-tls" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" @@ -865,7 +832,7 @@ name = "sds-cli" version = "1.9.0" dependencies = [ "csv", - "env_logger 0.9.0", + "env_logger 0.9.3", "log", "sds-core", "statrs", @@ -912,6 +879,7 @@ dependencies = [ "log", "sds-core", "serde", + "serde_json", "wasm-bindgen", "wasm-bindgen-test", "web-sys", @@ -934,29 +902,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.130" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" +checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.130" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" +checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.3", ] [[package]] name = "serde_json" -version = "1.0.71" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063bf466a64011ac24040a49009724ee60a57da1b437617ceb32e53ad61bfb19" +checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" dependencies = [ "itoa", "ryu", @@ -965,9 +933,18 @@ dependencies = [ [[package]] name = "sha1" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" +checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" +dependencies = [ + "sha1_smol", +] + +[[package]] +name = "sha1_smol" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "simba" @@ -984,9 +961,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "statrs" @@ -1027,7 +1004,7 @@ dependencies = [ "quote", "serde", "serde_derive", - "syn", + "syn 1.0.109", ] [[package]] @@ -1043,7 +1020,7 @@ dependencies = [ "serde_derive", "serde_json", "sha1", - "syn", + "syn 1.0.109", ] [[package]] @@ -1060,9 +1037,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "structopt" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c" +checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" dependencies = [ "clap", "lazy_static", @@ -1079,31 +1056,42 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "syn" -version = "1.0.81" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8234ae35e70582bfa0f1fedffa6daa248e41dd045310b19800c4a36382c8f60" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] name = "target-lexicon" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1" +checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" [[package]] name = "termcolor" -version = "1.1.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] @@ -1119,33 +1107,33 @@ dependencies = [ [[package]] name = "typenum" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "unicode-ident" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-segmentation" -version = "1.8.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" - -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "unindent" -version = "0.1.7" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f14ee04d9415b52b3aeab06258a3f07093182b88ba0f9b8d203f211a7a7d41c7" +checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" [[package]] name = "vec_map" @@ -1161,15 +1149,15 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.78" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ "cfg-if", "serde", @@ -1179,24 +1167,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.78" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.28" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" +checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" dependencies = [ "cfg-if", "js-sys", @@ -1206,9 +1194,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.78" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1216,28 +1204,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.78" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.78" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wasm-bindgen-test" -version = "0.3.28" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96f1aa7971fdf61ef0f353602102dbea75a56e225ed036c1e3740564b91e6b7e" +checksum = "6db36fc0f9fb209e88fb3642590ae0205bb5a56216dabd963ba15879fe53a30b" dependencies = [ "console_error_panic_hook", "js-sys", @@ -1249,9 +1237,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.28" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6006f79628dfeb96a86d4db51fbf1344cd7fd8408f06fc9aa3c84913a4789688" +checksum = "0734759ae6b3b1717d661fe4f016efcfb9828f5edb4520c18eaee05af3b43be9" dependencies = [ "proc-macro2", "quote", @@ -1259,9 +1247,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.55" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" dependencies = [ "js-sys", "wasm-bindgen", @@ -1269,9 +1257,9 @@ dependencies = [ [[package]] name = "wide" -version = "0.7.5" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae41ecad2489a1655c8ef8489444b0b113c0a0c795944a3572a0931cf7d2525c" +checksum = "b689b6c49d6549434bf944e6b0f39238cf63693cb7a147e9d887507fffa3b223" dependencies = [ "bytemuck", "safe_arch", diff --git a/packages/lib-pacsynth/samples/dp_aggregate_seeded_detailed_example.ipynb b/packages/lib-pacsynth/samples/dp_aggregate_seeded_detailed_example.ipynb index 84c52c8..8309f4b 100644 --- a/packages/lib-pacsynth/samples/dp_aggregate_seeded_detailed_example.ipynb +++ b/packages/lib-pacsynth/samples/dp_aggregate_seeded_detailed_example.ipynb @@ -140,68 +140,68 @@ " \n", " \n", " 0\n", - " 2\n", - " \n", + " 1\n", + " 1\n", " 4\n", - " 0\n", - " 0\n", " 1\n", " 1\n", " 0\n", - " 1\n", + " 0\n", + " 0\n", + " 0\n", " 1\n", " \n", " \n", " 1\n", " \n", - " 3\n", " 2\n", - " 1\n", - " 0\n", - " 1\n", - " 1\n", - " 1\n", + " 5\n", " 0\n", " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", " \n", " \n", " 2\n", - " 1\n", + " 2\n", + " 3\n", " 3\n", - " 5\n", - " 1\n", - " 0\n", " 0\n", " 1\n", + " 1\n", " 0\n", " 1\n", + " 1\n", " 0\n", " \n", " \n", " 3\n", - " 2\n", - " 2\n", - " 1\n", - " 0\n", - " 0\n", - " 1\n", + " \n", + " \n", + " \n", " 0\n", " 1\n", " 1\n", " 0\n", + " 0\n", + " 1\n", + " 1\n", " \n", " \n", " 4\n", + " 2\n", + " 1\n", + " \n", " 1\n", " 1\n", - " 5\n", - " 1\n", - " 1\n", - " 0\n", " 1\n", " 1\n", " 0\n", " 0\n", + " 1\n", " \n", " \n", " ...\n", @@ -220,9 +220,9 @@ " 5995\n", " 2\n", " 4\n", - " 8\n", - " 0\n", - " 0\n", + " 7\n", + " 1\n", + " 1\n", " 0\n", " 0\n", " 1\n", @@ -231,52 +231,52 @@ " \n", " \n", " 5996\n", + " 1\n", " \n", - " \n", - " \n", + " 7\n", + " 0\n", + " 1\n", " 1\n", " 1\n", " 0\n", " 0\n", " 0\n", - " 1\n", - " 0\n", " \n", " \n", " 5997\n", - " 2\n", - " 6\n", - " 9\n", + " 1\n", + " \n", + " \n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", " 1\n", " 1\n", " 0\n", - " 1\n", - " 0\n", - " 1\n", - " 1\n", " \n", " \n", " 5998\n", " \n", - " 4\n", - " 6\n", + " \n", + " 8\n", + " 0\n", + " 0\n", + " 0\n", " 1\n", " 1\n", " 0\n", " 0\n", - " 1\n", - " 0\n", - " 1\n", " \n", " \n", " 5999\n", - " 2\n", " \n", - " 7\n", - " 0\n", + " 4\n", + " 10\n", " 0\n", " 0\n", " 1\n", + " 1\n", " 0\n", " 0\n", " 0\n", @@ -287,18 +287,18 @@ "" ], "text/plain": [ - " H1 H2 H3 H4 H5 H6 H7 H8 H9 H10\n", - "0 2 4 0 0 1 1 0 1 1\n", - "1 3 2 1 0 1 1 1 0 0\n", - "2 1 3 5 1 0 0 1 0 1 0\n", - "3 2 2 1 0 0 1 0 1 1 0\n", - "4 1 1 5 1 1 0 1 1 0 0\n", - "... .. .. .. .. .. .. .. .. .. ..\n", - "5995 2 4 8 0 0 0 0 1 0 0\n", - "5996 1 1 0 0 0 1 0\n", - "5997 2 6 9 1 1 0 1 0 1 1\n", - "5998 4 6 1 1 0 0 1 0 1\n", - "5999 2 7 0 0 0 1 0 0 0\n", + " H1 H2 H3 H4 H5 H6 H7 H8 H9 H10\n", + "0 1 1 4 1 1 0 0 0 0 1\n", + "1 2 5 0 0 0 0 0 0 1\n", + "2 2 3 3 0 1 1 0 1 1 0\n", + "3 0 1 1 0 0 1 1\n", + "4 2 1 1 1 1 1 0 0 1\n", + "... .. .. .. .. .. .. .. .. .. ..\n", + "5995 2 4 7 1 1 0 0 1 0 0\n", + "5996 1 7 0 1 1 1 0 0 0\n", + "5997 1 1 1 1 1 1 1 0\n", + "5998 8 0 0 0 1 1 0 0\n", + "5999 4 10 0 0 1 1 0 0 0\n", "\n", "[6000 rows x 10 columns]" ] @@ -555,68 +555,68 @@ " \n", " \n", " 0\n", - " 2\n", - " \n", + " 1\n", + " 1\n", " 4\n", - " \n", - " \n", " 1\n", " 1\n", " \n", - " 1\n", + " \n", + " \n", + " \n", " 1\n", " \n", " \n", " 1\n", " \n", - " 3\n", " 2\n", - " 1\n", - " \n", - " 1\n", - " 1\n", - " 1\n", + " 5\n", " \n", " \n", + " \n", + " \n", + " \n", + " \n", + " 1\n", " \n", " \n", " 2\n", - " 1\n", + " 2\n", + " 3\n", " 3\n", - " 5\n", - " 1\n", - " \n", " \n", " 1\n", + " 1\n", " \n", " 1\n", + " 1\n", " \n", " \n", " \n", " 3\n", - " 2\n", - " 2\n", + " \n", + " \n", + " \n", + " \n", + " 1\n", " 1\n", " \n", " \n", " 1\n", - " \n", " 1\n", - " 1\n", - " \n", " \n", " \n", " 4\n", - " 1\n", - " 1\n", - " 5\n", - " 1\n", + " 2\n", " 1\n", " \n", " 1\n", " 1\n", + " 1\n", + " 1\n", " \n", " \n", + " 1\n", " \n", " \n", " ...\n", @@ -635,9 +635,9 @@ " 5995\n", " 2\n", " 4\n", - " 8\n", - " \n", - " \n", + " 7\n", + " 1\n", + " 1\n", " \n", " \n", " 1\n", @@ -646,52 +646,52 @@ " \n", " \n", " 5996\n", + " 1\n", " \n", + " 7\n", " \n", - " \n", + " 1\n", " 1\n", " 1\n", " \n", " \n", " \n", - " 1\n", - " \n", " \n", " \n", " 5997\n", - " 2\n", - " 6\n", - " 9\n", - " 1\n", " 1\n", " \n", - " 1\n", " \n", " 1\n", " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " \n", " \n", " \n", " 5998\n", " \n", - " 4\n", - " 6\n", + " \n", + " 8\n", + " \n", + " \n", + " \n", " 1\n", " 1\n", " \n", " \n", - " 1\n", - " \n", - " 1\n", " \n", " \n", " 5999\n", - " 2\n", - " \n", - " 7\n", " \n", + " 4\n", + " 10\n", " \n", " \n", " 1\n", + " 1\n", " \n", " \n", " \n", @@ -702,18 +702,18 @@ "" ], "text/plain": [ - " H1 H2 H3 H4 H5 H6 H7 H8 H9 H10\n", - "0 2 4 1 1 1 1\n", - "1 3 2 1 1 1 1 \n", - "2 1 3 5 1 1 1 \n", - "3 2 2 1 1 1 1 \n", - "4 1 1 5 1 1 1 1 \n", - "... .. .. .. .. .. .. .. .. .. ..\n", - "5995 2 4 8 1 \n", - "5996 1 1 1 \n", - "5997 2 6 9 1 1 1 1 1\n", - "5998 4 6 1 1 1 1\n", - "5999 2 7 1 \n", + " H1 H2 H3 H4 H5 H6 H7 H8 H9 H10\n", + "0 1 1 4 1 1 1\n", + "1 2 5 1\n", + "2 2 3 3 1 1 1 1 \n", + "3 1 1 1 1\n", + "4 2 1 1 1 1 1 1\n", + "... .. .. .. .. .. .. .. .. .. ..\n", + "5995 2 4 7 1 1 1 \n", + "5996 1 7 1 1 1 \n", + "5997 1 1 1 1 1 1 1 \n", + "5998 8 1 1 \n", + "5999 4 10 1 1 \n", "\n", "[6000 rows x 10 columns]" ] @@ -826,7 +826,6 @@ } ], "source": [ - "# this explicitly outlines the default parameters\n", "params = DpAggregateSeededParametersBuilder() \\\n", " .reporting_length(3) \\\n", " .epsilon(4.0) \\\n", @@ -885,7 +884,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Number of records protected with DP: 6024\n" + "Number of records protected with DP: 6018\n" ] }, { @@ -925,8 +924,8 @@ " \n", " 0\n", " \n", - " 2\n", " 5\n", + " 8\n", " 1\n", " 1\n", " 1\n", @@ -938,8 +937,8 @@ " \n", " 1\n", " \n", - " 2\n", " 5\n", + " 8\n", " 1\n", " 1\n", " 1\n", @@ -950,9 +949,9 @@ " \n", " \n", " 2\n", + " 1\n", " \n", - " 2\n", - " 5\n", + " 8\n", " 1\n", " 1\n", " 1\n", @@ -963,9 +962,9 @@ " \n", " \n", " 3\n", + " 1\n", " \n", - " 2\n", - " 5\n", + " 8\n", " 1\n", " 1\n", " 1\n", @@ -976,9 +975,9 @@ " \n", " \n", " 4\n", + " 1\n", " \n", - " 2\n", - " 5\n", + " 8\n", " 1\n", " 1\n", " 1\n", @@ -1001,36 +1000,49 @@ " ...\n", " \n", " \n", - " 6019\n", + " 6013\n", " \n", - " 1\n", - " 8\n", - " 1\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " 6020\n", - " \n", - " 5\n", - " 5\n", - " \n", - " \n", - " \n", - " 1\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " 6021\n", - " 1\n", - " 1\n", " 3\n", + " 6\n", + " \n", + " 1\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " 6014\n", + " \n", + " 4\n", + " 2\n", + " \n", + " 1\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " 6015\n", + " \n", + " 4\n", + " 2\n", + " \n", + " 1\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " 6016\n", + " 1\n", + " 4\n", + " 2\n", " \n", " \n", " \n", @@ -1040,23 +1052,10 @@ " \n", " \n", " \n", - " 6022\n", - " 1\n", - " 1\n", - " 3\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " 6023\n", - " 1\n", - " 1\n", - " 3\n", + " 6017\n", + " 2\n", + " 4\n", + " 2\n", " \n", " \n", " \n", @@ -1067,24 +1066,24 @@ " \n", " \n", "\n", - "

6024 rows × 10 columns

\n", + "

6018 rows × 10 columns

\n", "" ], "text/plain": [ " H1 H2 H3 H4 H5 H6 H7 H8 H9 H10\n", - "0 2 5 1 1 1 1 1 1 1\n", - "1 2 5 1 1 1 1 1 1 1\n", - "2 2 5 1 1 1 1 1 1 1\n", - "3 2 5 1 1 1 1 1 1 1\n", - "4 2 5 1 1 1 1 1 1 1\n", + "0 5 8 1 1 1 1 1 1 1\n", + "1 5 8 1 1 1 1 1 1 1\n", + "2 1 8 1 1 1 1 1 1 1\n", + "3 1 8 1 1 1 1 1 1 1\n", + "4 1 8 1 1 1 1 1 1 1\n", "... .. .. .. .. .. .. .. .. .. ..\n", - "6019 1 8 1 \n", - "6020 5 5 1 \n", - "6021 1 1 3 \n", - "6022 1 1 3 \n", - "6023 1 1 3 \n", + "6013 3 6 1 \n", + "6014 4 2 1 \n", + "6015 4 2 1 \n", + "6016 1 4 2 \n", + "6017 2 4 2 \n", "\n", - "[6024 rows x 10 columns]" + "[6018 rows x 10 columns]" ] }, "execution_count": 9, @@ -1125,26 +1124,26 @@ { "data": { "text/plain": [ - "[('H2:6;H3:10;H5:1;H7:1', 47),\n", - " ('H1:1;H3:6;H4:1;H8:1', 12),\n", - " ('H1:1;H3:3;H6:1;H8:1', 50),\n", - " ('H2:5;H3:9;H6:1;H8:1', 21),\n", - " ('H1:1;H3:7;H6:1', 87),\n", - " ('H1:2;H2:5;H3:9;H9:1', 34),\n", - " ('H2:2;H3:9', 21),\n", - " ('H2:6;H3:9;H8:1', 73),\n", - " ('H10:1;H3:6;H8:1', 133),\n", - " ('H1:2;H2:5;H4:1', 141),\n", - " ('H1:1;H2:6;H3:2', 6),\n", - " ('H2:4;H3:8;H5:1;H9:1', 15),\n", - " ('H10:1;H2:1;H3:3;H4:1', 1),\n", - " ('H10:1;H3:5;H4:1;H6:1', 89),\n", - " ('H10:1;H1:1;H3:7;H8:1', 51),\n", - " ('H1:2;H2:4;H3:9;H9:1', 8),\n", - " ('H1:2;H2:6;H3:7;H4:1', 1),\n", - " ('H10:1;H1:2;H5:1;H6:1', 240),\n", - " ('H10:1;H3:7;H5:1', 74),\n", - " ('H2:4;H3:10;H4:1;H9:1', 52)]" + "[('H1:1;H2:5;H3:3;H4:1', 6),\n", + " ('H2:6;H3:10;H5:1;H7:1', 16),\n", + " ('H1:1;H3:6;H4:1;H8:1', 72),\n", + " ('H1:1;H3:2;H5:1;H8:1', 48),\n", + " ('H1:1;H3:3;H6:1;H8:1', 14),\n", + " ('H2:5;H3:9;H6:1;H8:1', 16),\n", + " ('H1:1;H3:7;H6:1', 97),\n", + " ('H1:2;H2:5;H3:9;H9:1', 48),\n", + " ('H2:2;H3:9', 12),\n", + " ('H2:6;H3:9;H8:1', 71),\n", + " ('H1:1;H2:1;H3:1;H4:1', 31),\n", + " ('H10:1;H3:6;H8:1', 99),\n", + " ('H1:2;H2:5;H4:1', 85),\n", + " ('H10:1;H2:1;H3:3;H4:1', 35),\n", + " ('H10:1;H2:1;H3:8', 9),\n", + " ('H2:4;H3:8;H5:1;H9:1', 34),\n", + " ('H2:6;H3:2;H7:1;H9:1', 3),\n", + " ('H10:1;H3:5;H4:1;H6:1', 51),\n", + " ('H10:1;H1:1;H3:7;H8:1', 23),\n", + " ('H2:1;H3:2;H6:1;H8:1', 55)]" ] }, "execution_count": 10, @@ -1249,37 +1248,37 @@ " \n", " 0\n", " 1\n", - " 1391.76 +/- 14.72\n", + " 1383.32 +/- 18.04\n", " 0.00 %\n", " 0.00 %\n", " \n", " \n", " 1\n", " 2\n", - " 432.25 +/- 18.85\n", + " 426.81 +/- 18.20\n", " 0.00 %\n", " 5.43 %\n", " \n", " \n", " 2\n", " 3\n", - " 152.53 +/- 17.02\n", - " 0.22 %\n", - " 5.14 %\n", + " 149.56 +/- 18.10\n", + " 0.44 %\n", + " 6.23 %\n", " \n", " \n", " 3\n", " 4\n", - " 57.96 +/- 15.60\n", + " 56.41 +/- 13.87\n", " 7.42 %\n", - " 2.26 %\n", + " 2.99 %\n", " \n", " \n", " 4\n", " All\n", - " 113.90 +/- 16.18\n", - " 5.07 %\n", - " 3.24 %\n", + " 111.70 +/- 15.31\n", + " 5.13 %\n", + " 4.01 %\n", " \n", " \n", "\n", @@ -1287,11 +1286,11 @@ ], "text/plain": [ " Length Count +/- Error Suppressed % Fabricated %\n", - "0 1 1391.76 +/- 14.72 0.00 % 0.00 %\n", - "1 2 432.25 +/- 18.85 0.00 % 5.43 %\n", - "2 3 152.53 +/- 17.02 0.22 % 5.14 %\n", - "3 4 57.96 +/- 15.60 7.42 % 2.26 %\n", - "4 All 113.90 +/- 16.18 5.07 % 3.24 %" + "0 1 1383.32 +/- 18.04 0.00 % 0.00 %\n", + "1 2 426.81 +/- 18.20 0.00 % 5.43 %\n", + "2 3 149.56 +/- 18.10 0.44 % 6.23 %\n", + "3 4 56.41 +/- 13.87 7.42 % 2.99 %\n", + "4 All 111.70 +/- 15.31 5.13 % 4.01 %" ] }, "execution_count": 12, @@ -1346,37 +1345,37 @@ " \n", " 0\n", " 1\n", - " 1391.76 +/- 75.48\n", + " 1383.32 +/- 81.32\n", " 0.00 %\n", " 0.00 %\n", " \n", " \n", " 1\n", " 2\n", - " 432.25 +/- 62.37\n", + " 426.81 +/- 64.75\n", " 0.00 %\n", - " 5.43 %\n", + " 5.00 %\n", " \n", " \n", " 2\n", " 3\n", - " 152.53 +/- 37.86\n", - " 0.33 %\n", - " 4.74 %\n", + " 149.56 +/- 38.39\n", + " 0.44 %\n", + " 5.35 %\n", " \n", " \n", " 3\n", " 4\n", - " 57.96 +/- 19.45\n", - " 7.67 %\n", - " 1.87 %\n", + " 56.41 +/- 19.29\n", + " 7.54 %\n", + " 2.43 %\n", " \n", " \n", " 4\n", " All\n", - " 113.90 +/- 27.53\n", - " 5.27 %\n", - " 2.88 %\n", + " 111.70 +/- 27.75\n", + " 5.22 %\n", + " 3.38 %\n", " \n", " \n", "\n", @@ -1384,11 +1383,11 @@ ], "text/plain": [ " Length Count +/- Error Suppressed % Fabricated %\n", - "0 1 1391.76 +/- 75.48 0.00 % 0.00 %\n", - "1 2 432.25 +/- 62.37 0.00 % 5.43 %\n", - "2 3 152.53 +/- 37.86 0.33 % 4.74 %\n", - "3 4 57.96 +/- 19.45 7.67 % 1.87 %\n", - "4 All 113.90 +/- 27.53 5.27 % 2.88 %" + "0 1 1383.32 +/- 81.32 0.00 % 0.00 %\n", + "1 2 426.81 +/- 64.75 0.00 % 5.00 %\n", + "2 3 149.56 +/- 38.39 0.44 % 5.35 %\n", + "3 4 56.41 +/- 19.29 7.54 % 2.43 %\n", + "4 All 111.70 +/- 27.75 5.22 % 3.38 %" ] }, "execution_count": 13, @@ -1527,10 +1526,10 @@ " ...\n", " \n", " \n", - " 6019\n", + " 6013\n", + " \n", " 2\n", " 6\n", - " 9\n", " \n", " \n", " \n", @@ -1540,10 +1539,10 @@ " \n", " \n", " \n", - " 6020\n", + " 6014\n", + " \n", " 2\n", " 6\n", - " 9\n", " \n", " \n", " \n", @@ -1553,10 +1552,10 @@ " \n", " \n", " \n", - " 6021\n", + " 6015\n", + " \n", " 2\n", " 6\n", - " 9\n", " \n", " \n", " \n", @@ -1566,10 +1565,10 @@ " \n", " \n", " \n", - " 6022\n", + " 6016\n", + " \n", " 2\n", " 6\n", - " 9\n", " \n", " \n", " \n", @@ -1579,10 +1578,10 @@ " \n", " \n", " \n", - " 6023\n", + " 6017\n", + " \n", " 2\n", " 6\n", - " 9\n", " \n", " \n", " \n", @@ -1593,7 +1592,7 @@ " \n", " \n", "\n", - "

6024 rows × 10 columns

\n", + "

6018 rows × 10 columns

\n", "" ], "text/plain": [ @@ -1604,13 +1603,13 @@ "3 6 1 1 1 1 1 1 1\n", "4 6 1 1 1 1 1 1 1\n", "... .. .. .. .. .. .. .. .. .. ..\n", - "6019 2 6 9 \n", - "6020 2 6 9 \n", - "6021 2 6 9 \n", - "6022 2 6 9 \n", - "6023 2 6 9 \n", + "6013 2 6 \n", + "6014 2 6 \n", + "6015 2 6 \n", + "6016 2 6 \n", + "6017 2 6 \n", "\n", - "[6024 rows x 10 columns]" + "[6018 rows x 10 columns]" ] }, "execution_count": 14, @@ -1705,37 +1704,37 @@ " \n", " 0\n", " 1\n", - " 1391.76 +/- 16.96\n", + " 1383.32 +/- 17.76\n", " 0.00 %\n", " 0.00 %\n", " \n", " \n", " 1\n", " 2\n", - " 432.25 +/- 18.61\n", - " 0.00 %\n", + " 426.81 +/- 19.90\n", " 0.00 %\n", + " 0.48 %\n", " \n", " \n", " 2\n", " 3\n", - " 152.53 +/- 17.84\n", - " 19.96 %\n", + " 149.56 +/- 21.45\n", + " 20.73 %\n", " 0.00 %\n", " \n", " \n", " 3\n", " 4\n", - " 57.96 +/- 17.00\n", - " 68.08 %\n", + " 56.41 +/- 17.07\n", + " 68.37 %\n", " 0.00 %\n", " \n", " \n", " 4\n", " All\n", - " 113.90 +/- 17.55\n", - " 51.19 %\n", - " 0.00 %\n", + " 111.70 +/- 19.27\n", + " 51.59 %\n", + " 0.06 %\n", " \n", " \n", "\n", @@ -1743,11 +1742,11 @@ ], "text/plain": [ " Length Count +/- Error Suppressed % Fabricated %\n", - "0 1 1391.76 +/- 16.96 0.00 % 0.00 %\n", - "1 2 432.25 +/- 18.61 0.00 % 0.00 %\n", - "2 3 152.53 +/- 17.84 19.96 % 0.00 %\n", - "3 4 57.96 +/- 17.00 68.08 % 0.00 %\n", - "4 All 113.90 +/- 17.55 51.19 % 0.00 %" + "0 1 1383.32 +/- 17.76 0.00 % 0.00 %\n", + "1 2 426.81 +/- 19.90 0.00 % 0.48 %\n", + "2 3 149.56 +/- 21.45 20.73 % 0.00 %\n", + "3 4 56.41 +/- 17.07 68.37 % 0.00 %\n", + "4 All 111.70 +/- 19.27 51.59 % 0.06 %" ] }, "execution_count": 16, @@ -1802,37 +1801,37 @@ " \n", " 0\n", " 1\n", - " 1391.76 +/- 293.40\n", + " 1383.32 +/- 274.56\n", " 0.00 %\n", " 0.00 %\n", " \n", " \n", " 1\n", " 2\n", - " 432.25 +/- 179.53\n", - " 0.00 %\n", + " 426.81 +/- 169.23\n", " 0.00 %\n", + " 0.48 %\n", " \n", " \n", " 2\n", " 3\n", - " 152.53 +/- 96.13\n", - " 20.07 %\n", + " 149.56 +/- 91.08\n", + " 20.73 %\n", " 0.00 %\n", " \n", " \n", " 3\n", " 4\n", - " 57.96 +/- 50.07\n", - " 68.08 %\n", + " 56.41 +/- 46.69\n", + " 68.37 %\n", " 0.00 %\n", " \n", " \n", " 4\n", " All\n", - " 113.90 +/- 88.73\n", - " 51.22 %\n", - " 0.00 %\n", + " 111.70 +/- 83.71\n", + " 51.59 %\n", + " 0.06 %\n", " \n", " \n", "\n", @@ -1840,11 +1839,11 @@ ], "text/plain": [ " Length Count +/- Error Suppressed % Fabricated %\n", - "0 1 1391.76 +/- 293.40 0.00 % 0.00 %\n", - "1 2 432.25 +/- 179.53 0.00 % 0.00 %\n", - "2 3 152.53 +/- 96.13 20.07 % 0.00 %\n", - "3 4 57.96 +/- 50.07 68.08 % 0.00 %\n", - "4 All 113.90 +/- 88.73 51.22 % 0.00 %" + "0 1 1383.32 +/- 274.56 0.00 % 0.00 %\n", + "1 2 426.81 +/- 169.23 0.00 % 0.48 %\n", + "2 3 149.56 +/- 91.08 20.73 % 0.00 %\n", + "3 4 56.41 +/- 46.69 68.37 % 0.00 %\n", + "4 All 111.70 +/- 83.71 51.59 % 0.06 %" ] }, "execution_count": 17, @@ -1906,7 +1905,7 @@ " \n", " \n", " 0\n", - " 1\n", + " 2\n", " \n", " \n", " 1\n", @@ -1919,7 +1918,7 @@ " \n", " \n", " 1\n", - " 1\n", + " 2\n", " \n", " \n", " 1\n", @@ -1932,7 +1931,7 @@ " \n", " \n", " 2\n", - " 1\n", + " 2\n", " \n", " \n", " 1\n", @@ -1945,7 +1944,7 @@ " \n", " \n", " 3\n", - " 1\n", + " 2\n", " \n", " \n", " 1\n", @@ -1958,7 +1957,7 @@ " \n", " \n", " 4\n", - " 1\n", + " 2\n", " \n", " \n", " 1\n", @@ -1983,9 +1982,9 @@ " ...\n", " \n", " \n", - " 6019\n", + " 6013\n", " \n", - " 4\n", + " 6\n", " 7\n", " \n", " \n", @@ -1996,10 +1995,10 @@ " \n", " \n", " \n", - " 6020\n", + " 6014\n", " \n", - " 5\n", - " 4\n", + " 6\n", + " 7\n", " \n", " \n", " \n", @@ -2009,10 +2008,10 @@ " \n", " \n", " \n", - " 6021\n", + " 6015\n", " \n", " 6\n", - " 5\n", + " 8\n", " \n", " \n", " \n", @@ -2022,10 +2021,10 @@ " \n", " \n", " \n", - " 6022\n", + " 6016\n", " \n", " 6\n", - " 5\n", + " 9\n", " \n", " \n", " \n", @@ -2035,10 +2034,10 @@ " \n", " \n", " \n", - " 6023\n", + " 6017\n", " \n", " 6\n", - " 6\n", + " 9\n", " \n", " \n", " \n", @@ -2049,24 +2048,24 @@ " \n", " \n", "\n", - "

6024 rows × 10 columns

\n", + "

6018 rows × 10 columns

\n", "" ], "text/plain": [ " H1 H2 H3 H4 H5 H6 H7 H8 H9 H10\n", - "0 1 1 1 1 1 1 1 1\n", - "1 1 1 1 1 1 1 1 1\n", - "2 1 1 1 1 1 1 1 1\n", - "3 1 1 1 1 1 1 1 1\n", - "4 1 1 1 1 1 1 1 1\n", + "0 2 1 1 1 1 1 1 1\n", + "1 2 1 1 1 1 1 1 1\n", + "2 2 1 1 1 1 1 1 1\n", + "3 2 1 1 1 1 1 1 1\n", + "4 2 1 1 1 1 1 1 1\n", "... .. .. .. .. .. .. .. .. .. ..\n", - "6019 4 7 \n", - "6020 5 4 \n", - "6021 6 5 \n", - "6022 6 5 \n", - "6023 6 6 \n", + "6013 6 7 \n", + "6014 6 7 \n", + "6015 6 8 \n", + "6016 6 9 \n", + "6017 6 9 \n", "\n", - "[6024 rows x 10 columns]" + "[6018 rows x 10 columns]" ] }, "execution_count": 18, @@ -2163,37 +2162,37 @@ " \n", " 0\n", " 1\n", - " 1391.76 +/- 9.28\n", + " 1383.32 +/- 4.08\n", " 0.00 %\n", " 0.00 %\n", " \n", " \n", " 1\n", " 2\n", - " 432.25 +/- 11.69\n", + " 426.81 +/- 12.68\n", " 0.00 %\n", - " 7.11 %\n", + " 5.00 %\n", " \n", " \n", " 2\n", " 3\n", - " 152.53 +/- 28.58\n", - " 1.21 %\n", - " 7.44 %\n", + " 149.56 +/- 25.72\n", + " 1.76 %\n", + " 4.91 %\n", " \n", " \n", " 3\n", " 4\n", - " 57.96 +/- 28.84\n", + " 56.41 +/- 29.15\n", " 32.59 %\n", - " 4.23 %\n", + " 3.01 %\n", " \n", " \n", " 4\n", " All\n", - " 113.90 +/- 27.27\n", - " 22.36 %\n", - " 5.49 %\n", + " 111.70 +/- 26.54\n", + " 22.51 %\n", + " 3.77 %\n", " \n", " \n", "\n", @@ -2201,11 +2200,11 @@ ], "text/plain": [ " Length Count +/- Error Suppressed % Fabricated %\n", - "0 1 1391.76 +/- 9.28 0.00 % 0.00 %\n", - "1 2 432.25 +/- 11.69 0.00 % 7.11 %\n", - "2 3 152.53 +/- 28.58 1.21 % 7.44 %\n", - "3 4 57.96 +/- 28.84 32.59 % 4.23 %\n", - "4 All 113.90 +/- 27.27 22.36 % 5.49 %" + "0 1 1383.32 +/- 4.08 0.00 % 0.00 %\n", + "1 2 426.81 +/- 12.68 0.00 % 5.00 %\n", + "2 3 149.56 +/- 25.72 1.76 % 4.91 %\n", + "3 4 56.41 +/- 29.15 32.59 % 3.01 %\n", + "4 All 111.70 +/- 26.54 22.51 % 3.77 %" ] }, "execution_count": 20, @@ -2260,37 +2259,37 @@ " \n", " 0\n", " 1\n", - " 1391.76 +/- 83.32\n", + " 1383.32 +/- 84.68\n", " 0.00 %\n", " 0.00 %\n", " \n", " \n", " 1\n", " 2\n", - " 432.25 +/- 106.77\n", + " 426.81 +/- 109.37\n", " 0.00 %\n", - " 6.28 %\n", + " 4.13 %\n", " \n", " \n", " 2\n", " 3\n", - " 152.53 +/- 76.03\n", - " 1.21 %\n", - " 4.78 %\n", + " 149.56 +/- 72.41\n", + " 2.09 %\n", + " 3.37 %\n", " \n", " \n", " 3\n", " 4\n", - " 57.96 +/- 50.00\n", - " 33.77 %\n", - " 2.77 %\n", + " 56.41 +/- 43.12\n", + " 34.39 %\n", + " 1.94 %\n", " \n", " \n", " 4\n", " All\n", - " 113.90 +/- 63.29\n", - " 23.16 %\n", - " 3.69 %\n", + " 111.70 +/- 58.33\n", + " 23.81 %\n", + " 2.57 %\n", " \n", " \n", "\n", @@ -2298,11 +2297,11 @@ ], "text/plain": [ " Length Count +/- Error Suppressed % Fabricated %\n", - "0 1 1391.76 +/- 83.32 0.00 % 0.00 %\n", - "1 2 432.25 +/- 106.77 0.00 % 6.28 %\n", - "2 3 152.53 +/- 76.03 1.21 % 4.78 %\n", - "3 4 57.96 +/- 50.00 33.77 % 2.77 %\n", - "4 All 113.90 +/- 63.29 23.16 % 3.69 %" + "0 1 1383.32 +/- 84.68 0.00 % 0.00 %\n", + "1 2 426.81 +/- 109.37 0.00 % 4.13 %\n", + "2 3 149.56 +/- 72.41 2.09 % 3.37 %\n", + "3 4 56.41 +/- 43.12 34.39 % 1.94 %\n", + "4 All 111.70 +/- 58.33 23.81 % 2.57 %" ] }, "execution_count": 21, diff --git a/packages/lib-pacsynth/samples/dp_aggregate_seeded_short_example.ipynb b/packages/lib-pacsynth/samples/dp_aggregate_seeded_short_example.ipynb index b578c35..cb67c1b 100644 --- a/packages/lib-pacsynth/samples/dp_aggregate_seeded_short_example.ipynb +++ b/packages/lib-pacsynth/samples/dp_aggregate_seeded_short_example.ipynb @@ -161,7 +161,7 @@ " count\n", " 6000.000000\n", " 6000.000000\n", - " 6000.00000\n", + " 6000.000000\n", " 6000.000000\n", " 6000.000000\n", " 6000.000000\n", @@ -172,35 +172,35 @@ " \n", " \n", " mean\n", - " 0.992333\n", - " 2.646333\n", - " 4.57900\n", - " 0.502333\n", + " 0.979500\n", + " 2.635167\n", + " 4.551000\n", + " 0.490000\n", + " 0.497167\n", + " 0.480333\n", + " 0.495833\n", + " 0.491500\n", + " 0.509000\n", " 0.492667\n", - " 0.497000\n", - " 0.498833\n", - " 0.501500\n", - " 0.487500\n", - " 0.493000\n", " \n", " \n", " std\n", - " 0.816324\n", - " 2.107129\n", - " 3.32665\n", - " 0.500036\n", + " 0.809643\n", + " 2.132249\n", + " 3.306088\n", + " 0.499942\n", + " 0.500034\n", + " 0.499655\n", + " 0.500024\n", + " 0.499969\n", + " 0.499961\n", " 0.499988\n", - " 0.500033\n", - " 0.500040\n", - " 0.500039\n", - " 0.499885\n", - " 0.499993\n", " \n", " \n", " min\n", " 0.000000\n", " 0.000000\n", - " 0.00000\n", + " 0.000000\n", " 0.000000\n", " 0.000000\n", " 0.000000\n", @@ -213,7 +213,7 @@ " 25%\n", " 0.000000\n", " 1.000000\n", - " 1.00000\n", + " 1.000000\n", " 0.000000\n", " 0.000000\n", " 0.000000\n", @@ -226,20 +226,20 @@ " 50%\n", " 1.000000\n", " 3.000000\n", - " 5.00000\n", - " 1.000000\n", + " 4.000000\n", + " 0.000000\n", + " 0.000000\n", " 0.000000\n", " 0.000000\n", " 0.000000\n", " 1.000000\n", " 0.000000\n", - " 0.000000\n", " \n", " \n", " 75%\n", " 2.000000\n", " 5.000000\n", - " 7.00000\n", + " 7.000000\n", " 1.000000\n", " 1.000000\n", " 1.000000\n", @@ -252,7 +252,7 @@ " max\n", " 2.000000\n", " 6.000000\n", - " 10.00000\n", + " 10.000000\n", " 1.000000\n", " 1.000000\n", " 1.000000\n", @@ -266,23 +266,23 @@ "" ], "text/plain": [ - " H1 H2 H3 H4 H5 \\\n", - "count 6000.000000 6000.000000 6000.00000 6000.000000 6000.000000 \n", - "mean 0.992333 2.646333 4.57900 0.502333 0.492667 \n", - "std 0.816324 2.107129 3.32665 0.500036 0.499988 \n", - "min 0.000000 0.000000 0.00000 0.000000 0.000000 \n", - "25% 0.000000 1.000000 1.00000 0.000000 0.000000 \n", - "50% 1.000000 3.000000 5.00000 1.000000 0.000000 \n", - "75% 2.000000 5.000000 7.00000 1.000000 1.000000 \n", - "max 2.000000 6.000000 10.00000 1.000000 1.000000 \n", + " H1 H2 H3 H4 H5 \\\n", + "count 6000.000000 6000.000000 6000.000000 6000.000000 6000.000000 \n", + "mean 0.979500 2.635167 4.551000 0.490000 0.497167 \n", + "std 0.809643 2.132249 3.306088 0.499942 0.500034 \n", + "min 0.000000 0.000000 0.000000 0.000000 0.000000 \n", + "25% 0.000000 1.000000 1.000000 0.000000 0.000000 \n", + "50% 1.000000 3.000000 4.000000 0.000000 0.000000 \n", + "75% 2.000000 5.000000 7.000000 1.000000 1.000000 \n", + "max 2.000000 6.000000 10.000000 1.000000 1.000000 \n", "\n", " H6 H7 H8 H9 H10 \n", "count 6000.000000 6000.000000 6000.000000 6000.000000 6000.000000 \n", - "mean 0.497000 0.498833 0.501500 0.487500 0.493000 \n", - "std 0.500033 0.500040 0.500039 0.499885 0.499993 \n", + "mean 0.480333 0.495833 0.491500 0.509000 0.492667 \n", + "std 0.499655 0.500024 0.499969 0.499961 0.499988 \n", "min 0.000000 0.000000 0.000000 0.000000 0.000000 \n", "25% 0.000000 0.000000 0.000000 0.000000 0.000000 \n", - "50% 0.000000 0.000000 1.000000 0.000000 0.000000 \n", + "50% 0.000000 0.000000 0.000000 1.000000 0.000000 \n", "75% 1.000000 1.000000 1.000000 1.000000 1.000000 \n", "max 1.000000 1.000000 1.000000 1.000000 1.000000 " ] @@ -337,42 +337,42 @@ " \n", " \n", " count\n", - " 6030.000000\n", - " 6030.000000\n", - " 6030.000000\n", - " 6030.000000\n", - " 6030.000000\n", - " 6030.000000\n", - " 6030.000000\n", - " 6030.000000\n", - " 6030.000000\n", - " 6030.000000\n", + " 6007.000000\n", + " 6007.000000\n", + " 6007.000000\n", + " 6007.000000\n", + " 6007.000000\n", + " 6007.000000\n", + " 6007.000000\n", + " 6007.000000\n", + " 6007.000000\n", + " 6007.000000\n", " \n", " \n", " mean\n", - " 0.937977\n", - " 2.462023\n", - " 4.250083\n", - " 0.477944\n", - " 0.470149\n", - " 0.462355\n", - " 0.478441\n", - " 0.475788\n", - " 0.465008\n", - " 0.469818\n", + " 0.934576\n", + " 2.435159\n", + " 4.194440\n", + " 0.468121\n", + " 0.481938\n", + " 0.465956\n", + " 0.480439\n", + " 0.464125\n", + " 0.480772\n", + " 0.470285\n", " \n", " \n", " std\n", - " 0.825132\n", - " 2.132173\n", - " 3.401991\n", - " 0.499555\n", - " 0.499150\n", - " 0.498622\n", - " 0.499576\n", - " 0.499455\n", - " 0.498815\n", - " 0.499130\n", + " 0.814382\n", + " 2.174861\n", + " 3.411331\n", + " 0.499024\n", + " 0.499715\n", + " 0.498881\n", + " 0.499659\n", + " 0.498753\n", + " 0.499672\n", + " 0.499158\n", " \n", " \n", " min\n", @@ -445,9 +445,9 @@ ], "text/plain": [ " H1 H2 H3 H4 H5 \\\n", - "count 6030.000000 6030.000000 6030.000000 6030.000000 6030.000000 \n", - "mean 0.937977 2.462023 4.250083 0.477944 0.470149 \n", - "std 0.825132 2.132173 3.401991 0.499555 0.499150 \n", + "count 6007.000000 6007.000000 6007.000000 6007.000000 6007.000000 \n", + "mean 0.934576 2.435159 4.194440 0.468121 0.481938 \n", + "std 0.814382 2.174861 3.411331 0.499024 0.499715 \n", "min 0.000000 0.000000 0.000000 0.000000 0.000000 \n", "25% 0.000000 0.000000 1.000000 0.000000 0.000000 \n", "50% 1.000000 2.000000 4.000000 0.000000 0.000000 \n", @@ -455,9 +455,9 @@ "max 2.000000 6.000000 10.000000 1.000000 1.000000 \n", "\n", " H6 H7 H8 H9 H10 \n", - "count 6030.000000 6030.000000 6030.000000 6030.000000 6030.000000 \n", - "mean 0.462355 0.478441 0.475788 0.465008 0.469818 \n", - "std 0.498622 0.499576 0.499455 0.498815 0.499130 \n", + "count 6007.000000 6007.000000 6007.000000 6007.000000 6007.000000 \n", + "mean 0.465956 0.480439 0.464125 0.480772 0.470285 \n", + "std 0.498881 0.499659 0.498753 0.499672 0.499158 \n", "min 0.000000 0.000000 0.000000 0.000000 0.000000 \n", "25% 0.000000 0.000000 0.000000 0.000000 0.000000 \n", "50% 0.000000 0.000000 0.000000 0.000000 0.000000 \n", diff --git a/packages/lib-wasm/Cargo.toml b/packages/lib-wasm/Cargo.toml index 5491c0f..064178d 100644 --- a/packages/lib-wasm/Cargo.toml +++ b/packages/lib-wasm/Cargo.toml @@ -14,6 +14,7 @@ default = ["console_error_panic_hook"] [dependencies] wasm-bindgen = { version = "0.2", features = ["serde-serialize"] } +serde_json = { version = "1.0" } log = { version = "0.4", features = ["std"] } csv = { version = "1.1" } web-sys = { version = "0.3", features = [ "console" ]} diff --git a/packages/lib-wasm/src/processing/aggregator/aggregate_stats.rs b/packages/lib-wasm/src/processing/aggregator/aggregate_stats.rs index 6566718..479cb2f 100644 --- a/packages/lib-wasm/src/processing/aggregator/aggregate_stats.rs +++ b/packages/lib-wasm/src/processing/aggregator/aggregate_stats.rs @@ -1,4 +1,4 @@ -use crate::utils::js::{JsAggregateStatistics, JsResult}; +use crate::utils::js::{to_js_value, JsAggregateStatistics, JsResult}; use sds_core::processing::aggregator::AggregatedMetricByString; use serde::{Deserialize, Serialize}; use wasm_bindgen::{prelude::wasm_bindgen, JsCast, JsValue}; @@ -17,7 +17,7 @@ pub struct WasmAggregateStatistics { impl WasmAggregateStatistics { #[wasm_bindgen(js_name = "toJs")] pub fn to_js(&self) -> JsResult { - JsValue::from_serde(self) + to_js_value(self) .map(|r| r.unchecked_into()) .map_err(|err| JsValue::from(err.to_string())) } diff --git a/packages/lib-wasm/src/processing/evaluator/microdata_data_stats.rs b/packages/lib-wasm/src/processing/evaluator/microdata_data_stats.rs index eb97a84..d1a4e06 100644 --- a/packages/lib-wasm/src/processing/evaluator/microdata_data_stats.rs +++ b/packages/lib-wasm/src/processing/evaluator/microdata_data_stats.rs @@ -1,6 +1,6 @@ use crate::{ processing::aggregator::WasmAggregateResult, - utils::js::{JsMicrodataStatistics, JsResult}, + utils::js::{to_js_value, JsMicrodataStatistics, JsResult}, }; use sds_core::processing::{ aggregator::{AggregatedCountByLenMap, AggregatedMetricByLenMap}, @@ -111,7 +111,7 @@ impl WasmMicrodataStatistics { #[wasm_bindgen(js_name = "toJs")] pub fn to_js(&self) -> JsResult { - Ok(JsValue::from_serde(self) + Ok(to_js_value(self) .map_err(|err| JsValue::from(err.to_string()))? .unchecked_into::()) } diff --git a/packages/lib-wasm/src/processing/navigator/navigate_result.rs b/packages/lib-wasm/src/processing/navigator/navigate_result.rs index 14a6ede..044d019 100644 --- a/packages/lib-wasm/src/processing/navigator/navigate_result.rs +++ b/packages/lib-wasm/src/processing/navigator/navigate_result.rs @@ -20,7 +20,7 @@ use crate::{ sds_processor::{HeaderNames, WasmSdsProcessor}, }, utils::js::{ - JsAttributesIntersectionByColumn, JsHeaderNames, JsNavigateResult, JsResult, + to_js_value, JsAttributesIntersectionByColumn, JsHeaderNames, JsNavigateResult, JsResult, JsSelectedAttributesByColumn, }, }; @@ -250,8 +250,7 @@ impl WasmNavigateResult { set( &result, &"headerNames".into(), - &JsValue::from_serde(&self.header_names) - .map_err(|err| JsValue::from(err.to_string()))?, + &to_js_value(&self.header_names).map_err(|err| JsValue::from(err.to_string()))?, )?; Ok(JsValue::from(result).unchecked_into::()) diff --git a/packages/lib-wasm/src/processing/sds_processor/base_synthesis_parameters.rs b/packages/lib-wasm/src/processing/sds_processor/base_synthesis_parameters.rs index 651fa89..4bfd50c 100644 --- a/packages/lib-wasm/src/processing/sds_processor/base_synthesis_parameters.rs +++ b/packages/lib-wasm/src/processing/sds_processor/base_synthesis_parameters.rs @@ -1,7 +1,7 @@ use serde::{Deserialize, Serialize}; use wasm_bindgen::{prelude::wasm_bindgen, JsValue}; -use crate::utils::js::JsBaseSynthesisParameters; +use crate::utils::js::{from_js_value, JsBaseSynthesisParameters}; #[derive(Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -16,8 +16,6 @@ impl TryFrom for WasmBaseSynthesisParameters { type Error = JsValue; fn try_from(js_base_params: JsBaseSynthesisParameters) -> Result { - js_base_params - .into_serde::() - .map_err(|err| JsValue::from(err.to_string())) + from_js_value(&js_base_params).map_err(|err| JsValue::from(err.to_string())) } } diff --git a/packages/lib-wasm/src/processing/sds_processor/csv_data_parameters.rs b/packages/lib-wasm/src/processing/sds_processor/csv_data_parameters.rs index bbb369b..ca427cc 100644 --- a/packages/lib-wasm/src/processing/sds_processor/csv_data_parameters.rs +++ b/packages/lib-wasm/src/processing/sds_processor/csv_data_parameters.rs @@ -2,7 +2,7 @@ use super::{header_names::HeaderNames, MultiValueColumns}; use serde::{Deserialize, Serialize}; use wasm_bindgen::{prelude::wasm_bindgen, JsValue}; -use crate::utils::js::JsCsvDataParameters; +use crate::utils::js::{from_js_value, JsCsvDataParameters}; #[derive(Serialize, Deserialize, Clone)] #[serde(rename_all = "camelCase")] @@ -20,8 +20,6 @@ impl TryFrom for WasmCsvDataParameters { type Error = JsValue; fn try_from(js_csv_data_params: JsCsvDataParameters) -> Result { - js_csv_data_params - .into_serde::() - .map_err(|err| JsValue::from(err.to_string())) + from_js_value(&js_csv_data_params).map_err(|err| JsValue::from(err.to_string())) } } diff --git a/packages/lib-wasm/src/processing/sds_processor/dp_parameters.rs b/packages/lib-wasm/src/processing/sds_processor/dp_parameters.rs index ac79d9d..51375ae 100644 --- a/packages/lib-wasm/src/processing/sds_processor/dp_parameters.rs +++ b/packages/lib-wasm/src/processing/sds_processor/dp_parameters.rs @@ -1,14 +1,12 @@ use sds_core::dp::DpParameters; use wasm_bindgen::JsValue; -use crate::utils::js::JsDpParameters; +use crate::utils::js::{from_js_value, JsDpParameters}; impl TryFrom for DpParameters { type Error = JsValue; fn try_from(js_dp_params: JsDpParameters) -> Result { - js_dp_params - .into_serde::() - .map_err(|err| JsValue::from(err.to_string())) + from_js_value(&js_dp_params).map_err(|err| JsValue::from(err.to_string())) } } diff --git a/packages/lib-wasm/src/processing/sds_processor/header_names.rs b/packages/lib-wasm/src/processing/sds_processor/header_names.rs index 6f619e5..c571bd3 100644 --- a/packages/lib-wasm/src/processing/sds_processor/header_names.rs +++ b/packages/lib-wasm/src/processing/sds_processor/header_names.rs @@ -1,7 +1,7 @@ use std::convert::TryFrom; use wasm_bindgen::JsValue; -use crate::utils::js::JsHeaderNames; +use crate::utils::js::{from_js_value, JsHeaderNames}; pub type HeaderNames = Vec; @@ -9,8 +9,6 @@ impl TryFrom for HeaderNames { type Error = JsValue; fn try_from(js_header_names: JsHeaderNames) -> Result { - js_header_names - .into_serde::() - .map_err(|err| JsValue::from(err.to_string())) + from_js_value(&js_header_names).map_err(|err| JsValue::from(err.to_string())) } } diff --git a/packages/lib-wasm/src/processing/sds_processor/multi_value_columns.rs b/packages/lib-wasm/src/processing/sds_processor/multi_value_columns.rs index d065c91..80528b2 100644 --- a/packages/lib-wasm/src/processing/sds_processor/multi_value_columns.rs +++ b/packages/lib-wasm/src/processing/sds_processor/multi_value_columns.rs @@ -1,7 +1,7 @@ use std::{collections::HashMap, convert::TryFrom}; use wasm_bindgen::JsValue; -use crate::utils::js::JsMultiValueColumns; +use crate::utils::js::{from_js_value, JsMultiValueColumns}; pub type MultiValueColumns = HashMap; @@ -9,8 +9,6 @@ impl TryFrom for MultiValueColumns { type Error = JsValue; fn try_from(js_multi_value_columns: JsMultiValueColumns) -> Result { - js_multi_value_columns - .into_serde::() - .map_err(|err| JsValue::from(err.to_string())) + from_js_value(&js_multi_value_columns).map_err(|err| JsValue::from(err.to_string())) } } diff --git a/packages/lib-wasm/src/processing/sds_processor/noisy_count_threshold.rs b/packages/lib-wasm/src/processing/sds_processor/noisy_count_threshold.rs index c4be28b..92dcb05 100644 --- a/packages/lib-wasm/src/processing/sds_processor/noisy_count_threshold.rs +++ b/packages/lib-wasm/src/processing/sds_processor/noisy_count_threshold.rs @@ -1,14 +1,12 @@ use sds_core::dp::NoisyCountThreshold; use wasm_bindgen::JsValue; -use crate::utils::js::JsNoisyCountThreshold; +use crate::utils::js::{from_js_value, JsNoisyCountThreshold}; impl TryFrom for NoisyCountThreshold { type Error = JsValue; fn try_from(js_threshold: JsNoisyCountThreshold) -> Result { - js_threshold - .into_serde::() - .map_err(|err| JsValue::from(err.to_string())) + from_js_value(&js_threshold).map_err(|err| JsValue::from(err.to_string())) } } diff --git a/packages/lib-wasm/src/processing/sds_processor/oversampling_parameters.rs b/packages/lib-wasm/src/processing/sds_processor/oversampling_parameters.rs index 899532c..14e06a0 100644 --- a/packages/lib-wasm/src/processing/sds_processor/oversampling_parameters.rs +++ b/packages/lib-wasm/src/processing/sds_processor/oversampling_parameters.rs @@ -1,7 +1,7 @@ use serde::{Deserialize, Serialize}; use wasm_bindgen::{prelude::wasm_bindgen, JsValue}; -use crate::utils::js::JsOversamplingParameters; +use crate::utils::js::{from_js_value, JsOversamplingParameters}; #[derive(Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -15,8 +15,6 @@ impl TryFrom for WasmOversamplingParameters { type Error = JsValue; fn try_from(js_oversampling_params: JsOversamplingParameters) -> Result { - js_oversampling_params - .into_serde::() - .map_err(|err| JsValue::from(err.to_string())) + from_js_value(&js_oversampling_params).map_err(|err| JsValue::from(err.to_string())) } } diff --git a/packages/lib-wasm/src/processing/sds_processor/processor.rs b/packages/lib-wasm/src/processing/sds_processor/processor.rs index 3870488..52c933f 100644 --- a/packages/lib-wasm/src/processing/sds_processor/processor.rs +++ b/packages/lib-wasm/src/processing/sds_processor/processor.rs @@ -38,7 +38,7 @@ impl Default for WasmSdsProcessor { } } -#[wasm_bindgen(constructor)] +#[wasm_bindgen] impl WasmSdsProcessor { #[inline] #[wasm_bindgen(constructor)] diff --git a/packages/lib-wasm/src/utils/js/ts_definitions.rs b/packages/lib-wasm/src/utils/js/ts_definitions.rs index 1d0d6a7..696b7ba 100644 --- a/packages/lib-wasm/src/utils/js/ts_definitions.rs +++ b/packages/lib-wasm/src/utils/js/ts_definitions.rs @@ -198,3 +198,19 @@ extern "C" { } pub type JsResult = Result; + +#[allow(deprecated)] +pub(crate) fn to_js_value( + value: &T, +) -> serde_json::Result { + // TODO: allow deprecated until we migrate to serde-wasm-bindgen + JsValue::from_serde(value) +} + +#[allow(deprecated)] +pub(crate) fn from_js_value serde::de::Deserialize<'a>>( + value: &JsValue, +) -> serde_json::Result { + // TODO: allow deprecated until we migrate to serde-wasm-bindgen + value.into_serde::() +}