From f82cff9c19ec5c1cd9cbf5944271d3b04d2efe72 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Sat, 24 Sep 2022 10:13:20 -0400 Subject: [PATCH 01/12] Delete Function.md --- packages/website/docs/Api/Function.md | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 packages/website/docs/Api/Function.md diff --git a/packages/website/docs/Api/Function.md b/packages/website/docs/Api/Function.md deleted file mode 100644 index 1c08bb8f..00000000 --- a/packages/website/docs/Api/Function.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -sidebar_position: 6 -title: Function ---- - -## declare (experimental) - -Adds metadata to a function of the input ranges. Works now for numeric and date inputs. This is useful when making formal predictions. It allows you to limit the domain that your prediction will be used and scored within. - -The one function that declarations currently have is that they impact plotting. If you `declare` a single-variable function within a specific range, this specific range will be plotted. - -Declarations are currently experimental and will likely be removed or changed in the future. - -``` -Function.declare: (dict<{fn: lambda, inputs: array>}>) => declaration -``` - -**Examples** - -```javascript -Function.declare({ - fn: {|a| a+10 }, - inputs: [ - {min: 30, max: 100} - ] -}) -``` From bfcea1df02315e7f466d7fe141c3f199aec6679f Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Sat, 24 Sep 2022 19:08:41 +0400 Subject: [PATCH 02/12] implement SampleSet.cdf --- .../ReducerInterface_Distribution_test.res | 1 + .../rescript/Distributions/GenericDist.res | 19 ++++++------------- .../SampleSetDist/SampleSetDist.res | 4 ++++ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/packages/squiggle-lang/__tests__/ReducerInterface/ReducerInterface_Distribution_test.res b/packages/squiggle-lang/__tests__/ReducerInterface/ReducerInterface_Distribution_test.res index c8207131..46ed4c42 100644 --- a/packages/squiggle-lang/__tests__/ReducerInterface/ReducerInterface_Distribution_test.res +++ b/packages/squiggle-lang/__tests__/ReducerInterface/ReducerInterface_Distribution_test.res @@ -98,6 +98,7 @@ describe("eval on distribution functions", () => { "log(normal(5,2), normal(10,1))", "Error(Distribution Math Error: Logarithm of input error: First input must be completely greater than 0)", ) + testEval("log(2, SampleSet.fromDist(0.0001 to 5))", "Ok(Sample Set Distribution)") // log with low values, see https://github.com/quantified-uncertainty/squiggle/issues/1098 testEval("log(uniform(5,8))", "Ok(Sample Set Distribution)") testEval("log10(uniform(5,8))", "Ok(Sample Set Distribution)") }) diff --git a/packages/squiggle-lang/src/rescript/Distributions/GenericDist.res b/packages/squiggle-lang/src/rescript/Distributions/GenericDist.res index f9f5a5d0..231a893c 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/GenericDist.res +++ b/packages/squiggle-lang/src/rescript/Distributions/GenericDist.res @@ -86,6 +86,7 @@ let toFloatOperation = ( | (SampleSet(sampleSet), #Inv(r)) => SampleSetDist.percentile(sampleSet, r)->Some | (SampleSet(sampleSet), #Min) => SampleSetDist.min(sampleSet)->Some | (SampleSet(sampleSet), #Max) => SampleSetDist.max(sampleSet)->Some + | (SampleSet(sampleSet), #Cdf(r)) => SampleSetDist.cdf(sampleSet, r)->Some | _ => None } @@ -277,22 +278,14 @@ module AlgebraicCombination = { Right now we don't yet have a way of getting probability mass, so I'll leave this for later. */ let getLogarithmInputError = (t1: t, t2: t, ~toPointSetFn: toPointSetFn): option => { - let firstOperandIsGreaterThanZero = + let isDistGreaterThanZero = t => toFloatOperation( - t1, + t, ~toPointSetFn, ~distToFloatOperation=#Cdf(MagicNumbers.Epsilon.ten), - ) |> E.R.fmap(r => r > 0.) - let secondOperandIsGreaterThanZero = - toFloatOperation( - t2, - ~toPointSetFn, - ~distToFloatOperation=#Cdf(MagicNumbers.Epsilon.ten), - ) |> E.R.fmap(r => r > 0.) - let items = E.A.R.firstErrorOrOpen([ - firstOperandIsGreaterThanZero, - secondOperandIsGreaterThanZero, - ]) + )->E.R2.fmap(r => r > 0.) + + let items = E.A.R.firstErrorOrOpen([isDistGreaterThanZero(t1), isDistGreaterThanZero(t2)]) switch items { | Error(r) => Some(r) | Ok([true, _]) => diff --git a/packages/squiggle-lang/src/rescript/Distributions/SampleSetDist/SampleSetDist.res b/packages/squiggle-lang/src/rescript/Distributions/SampleSetDist/SampleSetDist.res index 41856882..17fbe431 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/SampleSetDist/SampleSetDist.res +++ b/packages/squiggle-lang/src/rescript/Distributions/SampleSetDist/SampleSetDist.res @@ -131,6 +131,10 @@ let max = t => T.get(t)->E.A.Floats.max let stdev = t => T.get(t)->E.A.Floats.stdev let variance = t => T.get(t)->E.A.Floats.variance let percentile = (t, f) => T.get(t)->E.A.Floats.percentile(f) +let cdf = (t: t, f: float) => { + let countBelowF = t->E.A.reduce(0, (acc, x) => acc + (x <= f ? 1 : 0)) + countBelowF->Js.Int.toFloat /. t->length->Js.Int.toFloat +} let mixture = (values: array<(t, float)>, intendedLength: int) => { let totalWeight = values->E.A2.fmap(E.Tuple2.second)->E.A.Floats.sum From 1548033fb40417fd1b527c3cbefa96c8bf7b1961 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 14:36:11 +0000 Subject: [PATCH 03/12] :arrow_up: Bump fkirc/skip-duplicate-actions from 4.0.0 to 5.1.0 Bumps [fkirc/skip-duplicate-actions](https://github.com/fkirc/skip-duplicate-actions) from 4.0.0 to 5.1.0. - [Release notes](https://github.com/fkirc/skip-duplicate-actions/releases) - [Commits](https://github.com/fkirc/skip-duplicate-actions/compare/v4.0.0...v5.1.0) --- updated-dependencies: - dependency-name: fkirc/skip-duplicate-actions dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 10 +++++----- .github/workflows/release-please.yml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 184ac544..2fac5a89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,27 +25,27 @@ jobs: steps: - id: skip_lang_check name: Check if the changes are about squiggle-lang src files - uses: fkirc/skip-duplicate-actions@v4.0.0 + uses: fkirc/skip-duplicate-actions@v5.1.0 with: paths: '["packages/squiggle-lang/**"]' - id: skip_components_check name: Check if the changes are about components src files - uses: fkirc/skip-duplicate-actions@v4.0.0 + uses: fkirc/skip-duplicate-actions@v5.1.0 with: paths: '["packages/components/**"]' - id: skip_website_check name: Check if the changes are about website src files - uses: fkirc/skip-duplicate-actions@v4.0.0 + uses: fkirc/skip-duplicate-actions@v5.1.0 with: paths: '["packages/website/**"]' - id: skip_vscodeext_check name: Check if the changes are about vscode extension src files - uses: fkirc/skip-duplicate-actions@v4.0.0 + uses: fkirc/skip-duplicate-actions@v5.1.0 with: paths: '["packages/vscode-ext/**"]' - id: skip_cli_check name: Check if the changes are about cli src files - uses: fkirc/skip-duplicate-actions@v4.0.0 + uses: fkirc/skip-duplicate-actions@v5.1.0 with: paths: '["packages/cli/**"]' diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index bd3fa87b..bea4046b 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -18,27 +18,27 @@ jobs: steps: - id: skip_lang_check name: Check if the changes are about squiggle-lang src files - uses: fkirc/skip-duplicate-actions@v4.0.0 + uses: fkirc/skip-duplicate-actions@v5.1.0 with: paths: '["packages/squiggle-lang/**"]' - id: skip_components_check name: Check if the changes are about components src files - uses: fkirc/skip-duplicate-actions@v4.0.0 + uses: fkirc/skip-duplicate-actions@v5.1.0 with: paths: '["packages/components/**"]' - id: skip_website_check name: Check if the changes are about website src files - uses: fkirc/skip-duplicate-actions@v4.0.0 + uses: fkirc/skip-duplicate-actions@v5.1.0 with: paths: '["packages/website/**"]' - id: skip_vscodeext_check name: Check if the changes are about vscode extension src files - uses: fkirc/skip-duplicate-actions@v4.0.0 + uses: fkirc/skip-duplicate-actions@v5.1.0 with: paths: '["packages/vscode-ext/**"]' - id: skip_cli_check name: Check if the changes are about cli src files - uses: fkirc/skip-duplicate-actions@v4.0.0 + uses: fkirc/skip-duplicate-actions@v5.1.0 with: paths: '["packages/cli/**"]' From bf3f71c7212c4535713addadccfbe69a5c8284cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 14:38:43 +0000 Subject: [PATCH 04/12] :arrow_up: Bump @types/react from 18.0.20 to 18.0.21 Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.0.20 to 18.0.21. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/components/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index 1734e641..ea94aedb 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -40,7 +40,7 @@ "@types/jest": "^27.5.0", "@types/lodash": "^4.14.185", "@types/node": "^18.7.18", - "@types/react": "^18.0.18", + "@types/react": "^18.0.21", "@types/styled-components": "^5.1.26", "@types/webpack": "^5.28.0", "cross-env": "^7.0.3", diff --git a/yarn.lock b/yarn.lock index bf0fa3c4..cd1e8680 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4776,10 +4776,10 @@ "@types/history" "^4.7.11" "@types/react" "*" -"@types/react@*", "@types/react@^18.0.1", "@types/react@^18.0.18": - version "18.0.20" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.20.tgz#e4c36be3a55eb5b456ecf501bd4a00fd4fd0c9ab" - integrity sha512-MWul1teSPxujEHVwZl4a5HxQ9vVNsjTchVA+xRqv/VYGCuKGAU6UhfrTdF5aBefwD1BHUD8i/zq+O/vyCm/FrA== +"@types/react@*", "@types/react@^18.0.1", "@types/react@^18.0.21": + version "18.0.21" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.21.tgz#b8209e9626bb00a34c76f55482697edd2b43cc67" + integrity sha512-7QUCOxvFgnD5Jk8ZKlUAhVcRj7GuJRjnjjiY/IUBWKgOlnvDvTMLD4RTF7NPyVmbRhNrbomZiOepg7M/2Kj1mA== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" From 730851379e2640440735ca870fa0b1503224e963 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 18:08:09 +0000 Subject: [PATCH 05/12] :arrow_up: Bump framer-motion from 7.3.5 to 7.4.0 Bumps [framer-motion](https://github.com/framer/motion) from 7.3.5 to 7.4.0. - [Release notes](https://github.com/framer/motion/releases) - [Changelog](https://github.com/framer/motion/blob/main/CHANGELOG.md) - [Commits](https://github.com/framer/motion/compare/v7.3.5...v7.4.0) --- updated-dependencies: - dependency-name: framer-motion dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/components/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index ea94aedb..aceb2a48 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -11,7 +11,7 @@ "@quri/squiggle-lang": "^0.4.2", "@react-hook/size": "^2.1.2", "clsx": "^1.2.1", - "framer-motion": "^7.3.5", + "framer-motion": "^7.4.0", "lodash": "^4.17.21", "react": "^18.1.0", "react-ace": "^10.1.0", diff --git a/yarn.lock b/yarn.lock index cd1e8680..4baae284 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9501,10 +9501,10 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -framer-motion@^7.3.5: - version "7.3.5" - resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-7.3.5.tgz#9a3d30658290a473acca268f19c3b65e4c6aeb70" - integrity sha512-JrLLVCi59LMI3+ZvSSbxf/Z7SOIdYRZrgdkUvJkzyT2RXu34HtGy26n41jNrcD5K85boqlZhGTbfqnAIfMHRLQ== +framer-motion@^7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-7.4.0.tgz#318c52a76517f9f854aa4a298c292be04941521b" + integrity sha512-tcvL5L1cASYjIeBG6mQHhzfndm7MdyHjOwqIdOzOetIVa1yUqeYMufAoljgqg69XFgsgZet+c4iuSuFF+Vgbjg== dependencies: "@motionone/dom" "10.13.1" framesync "6.1.2" From f02e522a2eddf59de7af4636438cd31ecd19ed05 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 18:12:34 +0000 Subject: [PATCH 06/12] :arrow_up: Bump fast-check from 3.1.3 to 3.1.4 Bumps [fast-check](https://github.com/dubzzz/fast-check/tree/HEAD/packages/fast-check) from 3.1.3 to 3.1.4. - [Release notes](https://github.com/dubzzz/fast-check/releases) - [Changelog](https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/CHANGELOG.md) - [Commits](https://github.com/dubzzz/fast-check/commits/v3.1.4/packages/fast-check) --- updated-dependencies: - dependency-name: fast-check dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/squiggle-lang/package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/squiggle-lang/package.json b/packages/squiggle-lang/package.json index 39e7751e..fcd0efe2 100644 --- a/packages/squiggle-lang/package.json +++ b/packages/squiggle-lang/package.json @@ -56,7 +56,7 @@ "bisect_ppx": "^2.7.1", "chalk": "^5.0.1", "codecov": "^3.8.3", - "fast-check": "^3.1.3", + "fast-check": "^3.1.4", "gentype": "^4.5.0", "jest": "^27.5.1", "moduleserve": "^0.9.1", diff --git a/yarn.lock b/yarn.lock index cd1e8680..3b7f74f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9130,12 +9130,12 @@ fast-check@^2.17.0: dependencies: pure-rand "^5.0.1" -fast-check@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-3.1.3.tgz#134e5852e3c56b65e47a48b1a5022bee14c10ba3" - integrity sha512-IFY7xJrOUktiC1ZnaJdrinaRpFgDZtURRPwzAiOhL8eyt2NbBTHNF1CO7vZUla1BoUeJVI7gLnTQA+Lko0T2dQ== +fast-check@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-3.1.4.tgz#e755623b4a63d0a26c285acbd1c1d8e3ea283a6e" + integrity sha512-AC4o8U7riY668tHAcJ10PHWpmhaNDfyzs2THFwQ6FJMPP05EmHKEmYvup7B1DCS+kKAzzosjSF51TamUM5IyPA== dependencies: - pure-rand "^5.0.1" + pure-rand "^5.0.2" fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3, fast-deep-equal@~3.1.3: version "3.1.3" @@ -14697,10 +14697,10 @@ pure-color@^1.2.0: resolved "https://registry.yarnpkg.com/pure-color/-/pure-color-1.3.0.tgz#1fe064fb0ac851f0de61320a8bf796836422f33e" integrity sha512-QFADYnsVoBMw1srW7OVKEYjG+MbIa49s54w1MA1EDY6r2r/sTcKKYqRX1f4GYvnXP7eN/Pe9HFcX+hwzmrXRHA== -pure-rand@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-5.0.1.tgz#97a287b4b4960b2a3448c0932bf28f2405cac51d" - integrity sha512-ksWccjmXOHU2gJBnH0cK1lSYdvSZ0zLoCMSz/nTGh6hDvCSgcRxDyIcOBD6KNxFz3xhMPm/T267Tbe2JRymKEQ== +pure-rand@^5.0.1, pure-rand@^5.0.2: + version "5.0.3" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-5.0.3.tgz#a2f15dfbc3be8433d1d8ed67ee411aa83fb90406" + integrity sha512-9N8x1h8dptBQpHyC7aZMS+iNOAm97WMGY0AFrguU1cpfW3I5jINkWe5BIY5md0ofy+1TCIELsVcm/GJXZSaPbw== q@^1.1.2: version "1.5.1" From 28ba89b8c8b99731296d3ff15a909d92ffa59496 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 18:21:37 +0000 Subject: [PATCH 07/12] :arrow_up: Bump react-hook-form from 7.35.0 to 7.36.1 Bumps [react-hook-form](https://github.com/react-hook-form/react-hook-form) from 7.35.0 to 7.36.1. - [Release notes](https://github.com/react-hook-form/react-hook-form/releases) - [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md) - [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.35.0...v7.36.1) --- updated-dependencies: - dependency-name: react-hook-form dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/components/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index ea94aedb..d904e428 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -15,7 +15,7 @@ "lodash": "^4.17.21", "react": "^18.1.0", "react-ace": "^10.1.0", - "react-hook-form": "^7.35.0", + "react-hook-form": "^7.36.1", "react-use": "^17.4.0", "react-vega": "^7.6.0", "vega": "^5.22.1", diff --git a/yarn.lock b/yarn.lock index cd1e8680..9b7f58de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14940,10 +14940,10 @@ react-helmet-async@*, react-helmet-async@^1.3.0: react-fast-compare "^3.2.0" shallowequal "^1.1.0" -react-hook-form@^7.35.0: - version "7.35.0" - resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.35.0.tgz#b133de48fc84b1e62f9277ba79dfbacd9bb13dd3" - integrity sha512-9CYdOed+Itbiu5VMVxW0PK9mBR3f0gDGJcZEyUSm0eJbDymQ913TRs2gHcQZZmfTC+rtxyDFRuelMxx/+xwMcw== +react-hook-form@^7.36.1: + version "7.36.1" + resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.36.1.tgz#82a311fe8cbe75e689fd4529f083b7c983da6520" + integrity sha512-EbYYkCG2p8ywe7ikOH2l02lAFMrrrslZi1I8fqd8ifDGNAkhomHZQzQsP6ksvzrWBKntRe8b5L5L7Zsd+Gm02Q== react-inspector@^5.1.0: version "5.1.1" From bc1bfeb5cd661c0bc3c9bff4d192e842d93d14ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 18:24:06 +0000 Subject: [PATCH 08/12] :arrow_up: Bump webpack-dev-server from 4.11.0 to 4.11.1 Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.11.0 to 4.11.1. - [Release notes](https://github.com/webpack/webpack-dev-server/releases) - [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.11.0...v4.11.1) --- updated-dependencies: - dependency-name: webpack-dev-server dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/components/package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index ea94aedb..c4cb900b 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -59,7 +59,7 @@ "web-vitals": "^3.0.2", "webpack": "^5.74.0", "webpack-cli": "^4.10.0", - "webpack-dev-server": "^4.11.0" + "webpack-dev-server": "^4.11.1" }, "peerDependencies": { "react": "^16.8.0 || ^17 || ^18", diff --git a/yarn.lock b/yarn.lock index cd1e8680..f2b321f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15890,10 +15890,10 @@ select-hose@^2.0.0: resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" integrity sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg== -selfsigned@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.0.1.tgz#8b2df7fa56bf014d19b6007655fff209c0ef0a56" - integrity sha512-LmME957M1zOsUhG+67rAjKfiWFox3SBxE/yymatMZsAx+oMrJ0YQ8AToOnyCm7xbeg2ep37IHLxdu0o2MavQOQ== +selfsigned@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.1.1.tgz#18a7613d714c0cd3385c48af0075abf3f266af61" + integrity sha512-GSL3aowiF7wa/WtSFwnUrludWFoNhftq8bUkH9pkzjpN2XSPOAYEgg6e0sS9s0rZwgJzJiQRPU18A6clnoW5wQ== dependencies: node-forge "^1" @@ -18486,10 +18486,10 @@ webpack-dev-middleware@^5.3.1: range-parser "^1.2.1" schema-utils "^4.0.0" -webpack-dev-server@^4.11.0, webpack-dev-server@^4.6.0, webpack-dev-server@^4.9.3: - version "4.11.0" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.11.0.tgz#290ee594765cd8260adfe83b2d18115ea04484e7" - integrity sha512-L5S4Q2zT57SK7tazgzjMiSMBdsw+rGYIX27MgPgx7LDhWO0lViPrHKoLS7jo5In06PWYAhlYu3PbyoC6yAThbw== +webpack-dev-server@^4.11.1, webpack-dev-server@^4.6.0, webpack-dev-server@^4.9.3: + version "4.11.1" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.11.1.tgz#ae07f0d71ca0438cf88446f09029b92ce81380b5" + integrity sha512-lILVz9tAUy1zGFwieuaQtYiadImb5M3d+H+L1zDYalYoDl0cksAB1UNyuE5MMWJrG6zR1tXkCP2fitl7yoUJiw== dependencies: "@types/bonjour" "^3.5.9" "@types/connect-history-api-fallback" "^1.3.5" @@ -18514,7 +18514,7 @@ webpack-dev-server@^4.11.0, webpack-dev-server@^4.6.0, webpack-dev-server@^4.9.3 p-retry "^4.5.0" rimraf "^3.0.2" schema-utils "^4.0.0" - selfsigned "^2.0.1" + selfsigned "^2.1.1" serve-index "^1.9.1" sockjs "^0.3.24" spdy "^4.0.2" From 3098cf7b7119a6681706b3714334a67b20516f7e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 18:24:08 +0000 Subject: [PATCH 09/12] :arrow_up: Bump @types/node from 18.7.18 to 18.7.22 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.7.18 to 18.7.22. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/components/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index ea94aedb..93a04825 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -39,7 +39,7 @@ "@testing-library/user-event": "^14.4.3", "@types/jest": "^27.5.0", "@types/lodash": "^4.14.185", - "@types/node": "^18.7.18", + "@types/node": "^18.7.22", "@types/react": "^18.0.21", "@types/styled-components": "^5.1.26", "@types/webpack": "^5.28.0", diff --git a/yarn.lock b/yarn.lock index cd1e8680..8421f07e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4678,10 +4678,10 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@18.x", "@types/node@^18.7.18": - version "18.7.18" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.18.tgz#633184f55c322e4fb08612307c274ee6d5ed3154" - integrity sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg== +"@types/node@*", "@types/node@18.x", "@types/node@^18.7.22": + version "18.7.22" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.22.tgz#76f7401362ad63d9d7eefa7dcdfa5fcd9baddff3" + integrity sha512-TsmoXYd4zrkkKjJB0URF/mTIKPl+kVcbqClB2F/ykU7vil1BfWZVndOnpEIozPv4fURD28gyPFeIkW2G+KXOvw== "@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0": version "16.11.56" From d001b3c24504b58e05ea8534e17c10635eb40799 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Wed, 28 Sep 2022 09:52:45 -0400 Subject: [PATCH 10/12] Add epic-0.5.0 to pull_request branch --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fac5a89..dac2c269 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ on: - develop - reducer-dev - epic-reducer-project + - epic-0.5.0 jobs: pre_check: From 8477b0c5f74307281ca48aedcf661d369361a3d1 Mon Sep 17 00:00:00 2001 From: Sam Nolan Date: Fri, 30 Sep 2022 10:36:42 +1000 Subject: [PATCH 11/12] Format Rescript + fix ts error --- .../components/SquiggleViewer/ExpressionViewer.tsx | 2 +- packages/squiggle-lang/src/rescript/FR/FR_Dict.res | 3 ++- .../squiggle-lang/src/rescript/FR/FR_Pointset.res | 3 ++- .../FunctionRegistry/FunctionRegistry_Core.res | 11 ++++------- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/components/src/components/SquiggleViewer/ExpressionViewer.tsx b/packages/components/src/components/SquiggleViewer/ExpressionViewer.tsx index 8bd32292..c2677789 100644 --- a/packages/components/src/components/SquiggleViewer/ExpressionViewer.tsx +++ b/packages/components/src/components/SquiggleViewer/ExpressionViewer.tsx @@ -298,7 +298,7 @@ export const ExpressionViewer: React.FC = ({ value, width }) => { {() => (
No display for type: {" "} - {value.tag} + {(value as {tag: string}).tag}
)} diff --git a/packages/squiggle-lang/src/rescript/FR/FR_Dict.res b/packages/squiggle-lang/src/rescript/FR/FR_Dict.res index d135717c..77ca49a7 100644 --- a/packages/squiggle-lang/src/rescript/FR/FR_Dict.res +++ b/packages/squiggle-lang/src/rescript/FR/FR_Dict.res @@ -71,7 +71,8 @@ let library = [ ~inputs=[FRTypeArray(FRTypeDict(FRTypeAny))], ~run=(inputs, _, _) => { switch inputs { - | [IEvArray(dicts)] => dicts + | [IEvArray(dicts)] => + dicts ->Belt.Array.map(dictValue => switch dictValue { | IEvRecord(dict) => dict diff --git a/packages/squiggle-lang/src/rescript/FR/FR_Pointset.res b/packages/squiggle-lang/src/rescript/FR/FR_Pointset.res index ee4f7ca8..a12164bd 100644 --- a/packages/squiggle-lang/src/rescript/FR/FR_Pointset.res +++ b/packages/squiggle-lang/src/rescript/FR/FR_Pointset.res @@ -7,7 +7,8 @@ let requiresNamespace = true let inputsToDist = (inputs: array, xyShapeToPointSetDist) => { // TODO - rewrite in more functional/functor-based style switch inputs { - | [IEvArray(items)] => items + | [IEvArray(items)] => + items ->Belt.Array.map(item => switch item { | IEvRecord(map) => { diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res index 5d606bb8..9683147f 100644 --- a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res @@ -83,15 +83,12 @@ module FRType = { | (FRTypeNumeric, IEvNumber(_)) => true | (FRTypeNumeric, IEvDistribution(Symbolic(#Float(_)))) => true | (FRTypeLambda, IEvLambda(_)) => true - | (FRTypeArray(intendedType), IEvArray(elements)) => elements->Belt.Array.every(v => - matchWithValue(intendedType, v) - ) + | (FRTypeArray(intendedType), IEvArray(elements)) => + elements->Belt.Array.every(v => matchWithValue(intendedType, v)) | (FRTypeDict(r), IEvRecord(map)) => map->Belt.Map.String.valuesToArray->Belt.Array.every(v => matchWithValue(r, v)) - | (FRTypeRecord(recordParams), IEvRecord(map)) => recordParams->Belt.Array.every((( - name, - input, - )) => { + | (FRTypeRecord(recordParams), IEvRecord(map)) => + recordParams->Belt.Array.every(((name, input)) => { switch map->Belt.Map.String.get(name) { | Some(v) => matchWithValue(input, v) | None => false From 6cd368ba7dbe3b2d224054eacd917f306a9ac070 Mon Sep 17 00:00:00 2001 From: Sam Nolan Date: Fri, 30 Sep 2022 10:38:48 +1000 Subject: [PATCH 12/12] Format components --- .../src/components/SquiggleViewer/ExpressionViewer.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/components/src/components/SquiggleViewer/ExpressionViewer.tsx b/packages/components/src/components/SquiggleViewer/ExpressionViewer.tsx index c2677789..cb40c509 100644 --- a/packages/components/src/components/SquiggleViewer/ExpressionViewer.tsx +++ b/packages/components/src/components/SquiggleViewer/ExpressionViewer.tsx @@ -298,7 +298,9 @@ export const ExpressionViewer: React.FC = ({ value, width }) => { {() => (
No display for type: {" "} - {(value as {tag: string}).tag} + + {(value as { tag: string }).tag} +
)}