Merge pull request #966 from quantified-uncertainty/develop
Develop -> Master, Aug 8
This commit is contained in:
commit
f015e2ed19
7
.github/dependabot.yml
vendored
7
.github/dependabot.yml
vendored
|
@ -11,3 +11,10 @@ updates:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
commit-message:
|
commit-message:
|
||||||
prefix: "⬆️"
|
prefix: "⬆️"
|
||||||
|
open-pull-requests-limit: 100
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
commit-message:
|
||||||
|
prefix: "⬆️"
|
||||||
|
|
28
.github/workflows/ci.yml
vendored
28
.github/workflows/ci.yml
vendored
|
@ -24,27 +24,27 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- id: skip_lang_check
|
- id: skip_lang_check
|
||||||
name: Check if the changes are about squiggle-lang src files
|
name: Check if the changes are about squiggle-lang src files
|
||||||
uses: fkirc/skip-duplicate-actions@v3.4.1
|
uses: fkirc/skip-duplicate-actions@v4.0.0
|
||||||
with:
|
with:
|
||||||
paths: '["packages/squiggle-lang/**"]'
|
paths: '["packages/squiggle-lang/**"]'
|
||||||
- id: skip_components_check
|
- id: skip_components_check
|
||||||
name: Check if the changes are about components src files
|
name: Check if the changes are about components src files
|
||||||
uses: fkirc/skip-duplicate-actions@v3.4.1
|
uses: fkirc/skip-duplicate-actions@v4.0.0
|
||||||
with:
|
with:
|
||||||
paths: '["packages/components/**"]'
|
paths: '["packages/components/**"]'
|
||||||
- id: skip_website_check
|
- id: skip_website_check
|
||||||
name: Check if the changes are about website src files
|
name: Check if the changes are about website src files
|
||||||
uses: fkirc/skip-duplicate-actions@v3.4.1
|
uses: fkirc/skip-duplicate-actions@v4.0.0
|
||||||
with:
|
with:
|
||||||
paths: '["packages/website/**"]'
|
paths: '["packages/website/**"]'
|
||||||
- id: skip_vscodeext_check
|
- id: skip_vscodeext_check
|
||||||
name: Check if the changes are about vscode extension src files
|
name: Check if the changes are about vscode extension src files
|
||||||
uses: fkirc/skip-duplicate-actions@v3.4.1
|
uses: fkirc/skip-duplicate-actions@v4.0.0
|
||||||
with:
|
with:
|
||||||
paths: '["packages/vscode-ext/**"]'
|
paths: '["packages/vscode-ext/**"]'
|
||||||
- id: skip_cli_check
|
- id: skip_cli_check
|
||||||
name: Check if the changes are about cli src files
|
name: Check if the changes are about cli src files
|
||||||
uses: fkirc/skip-duplicate-actions@v3.4.1
|
uses: fkirc/skip-duplicate-actions@v4.0.0
|
||||||
with:
|
with:
|
||||||
paths: '["packages/cli/**"]'
|
paths: '["packages/cli/**"]'
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: packages/squiggle-lang
|
working-directory: packages/squiggle-lang
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: cd ../../ && yarn
|
run: cd ../../ && yarn
|
||||||
- name: Check rescript lint
|
- name: Check rescript lint
|
||||||
|
@ -79,7 +79,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: packages/squiggle-lang
|
working-directory: packages/squiggle-lang
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
- name: Install dependencies from monorepo level
|
- name: Install dependencies from monorepo level
|
||||||
|
@ -107,7 +107,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: packages/components
|
working-directory: packages/components
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Check javascript, typescript, and markdown lint
|
- name: Check javascript, typescript, and markdown lint
|
||||||
uses: creyD/prettier_action@v4.2
|
uses: creyD/prettier_action@v4.2
|
||||||
with:
|
with:
|
||||||
|
@ -124,7 +124,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: packages/components
|
working-directory: packages/components
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Install dependencies from monorepo level
|
- name: Install dependencies from monorepo level
|
||||||
run: cd ../../ && yarn
|
run: cd ../../ && yarn
|
||||||
- name: Build rescript codebase in squiggle-lang
|
- name: Build rescript codebase in squiggle-lang
|
||||||
|
@ -144,7 +144,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: packages/website
|
working-directory: packages/website
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Check javascript, typescript, and markdown lint
|
- name: Check javascript, typescript, and markdown lint
|
||||||
uses: creyD/prettier_action@v4.2
|
uses: creyD/prettier_action@v4.2
|
||||||
with:
|
with:
|
||||||
|
@ -161,7 +161,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: packages/website
|
working-directory: packages/website
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Install dependencies from monorepo level
|
- name: Install dependencies from monorepo level
|
||||||
run: cd ../../ && yarn
|
run: cd ../../ && yarn
|
||||||
- name: Build rescript in squiggle-lang
|
- name: Build rescript in squiggle-lang
|
||||||
|
@ -181,7 +181,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: packages/vscode-ext
|
working-directory: packages/vscode-ext
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Install dependencies from monorepo level
|
- name: Install dependencies from monorepo level
|
||||||
run: cd ../../ && yarn
|
run: cd ../../ && yarn
|
||||||
- name: Lint the VSCode Extension source code
|
- name: Lint the VSCode Extension source code
|
||||||
|
@ -197,7 +197,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: packages/vscode-ext
|
working-directory: packages/vscode-ext
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Install dependencies from monorepo level
|
- name: Install dependencies from monorepo level
|
||||||
run: cd ../../ && yarn
|
run: cd ../../ && yarn
|
||||||
- name: Build
|
- name: Build
|
||||||
|
@ -213,7 +213,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: packages/cli
|
working-directory: packages/cli
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Check javascript, typescript, and markdown lint
|
- name: Check javascript, typescript, and markdown lint
|
||||||
uses: creyD/prettier_action@v4.2
|
uses: creyD/prettier_action@v4.2
|
||||||
with:
|
with:
|
||||||
|
|
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
|
@ -33,11 +33,11 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v2
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
@ -48,7 +48,7 @@ jobs:
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v1
|
uses: github/codeql-action/autobuild@v2
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn
|
run: yarn
|
||||||
- name: Build rescript
|
- name: Build rescript
|
||||||
|
@ -65,4 +65,4 @@ jobs:
|
||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v1
|
uses: github/codeql-action/analyze@v2
|
||||||
|
|
140
.github/workflows/release-please.yml
vendored
Normal file
140
.github/workflows/release-please.yml
vendored
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
name: Run Release Please
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- develop
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pre_check:
|
||||||
|
name: Precheck for skipping redundant jobs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
should_skip_lang: ${{ steps.skip_lang_check.outputs.should_skip }}
|
||||||
|
should_skip_components: ${{ steps.skip_components_check.outputs.should_skip }}
|
||||||
|
should_skip_website: ${{ steps.skip_website_check.outputs.should_skip }}
|
||||||
|
should_skip_vscodeext: ${{ steps.skip_vscodeext_check.outputs.should_skip }}
|
||||||
|
should_skip_cli: ${{ steps.skip_cli_check.outputs.should_skip }}
|
||||||
|
steps:
|
||||||
|
- id: skip_lang_check
|
||||||
|
name: Check if the changes are about squiggle-lang src files
|
||||||
|
uses: fkirc/skip-duplicate-actions@v4.0.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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
with:
|
||||||
|
paths: '["packages/cli/**"]'
|
||||||
|
|
||||||
|
relplz-lang:
|
||||||
|
name: for squiggle-lang
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: pre_check
|
||||||
|
if: ${{ needs.pre_check.outputs.should_skip_lang != 'true' }}
|
||||||
|
steps:
|
||||||
|
- name: Release please (squiggle-lang)
|
||||||
|
uses: google-github-actions/release-please-action@v3
|
||||||
|
id: release
|
||||||
|
with:
|
||||||
|
token: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
command: manifest-pr
|
||||||
|
path: packages/squiggle-lang
|
||||||
|
bump-patch-for-minor-pre-major: true
|
||||||
|
skip-github-release: true
|
||||||
|
# - name: Publish: Checkout source
|
||||||
|
# uses: actions/checkout@v2
|
||||||
|
# # these if statements ensure that a publication only occurs when
|
||||||
|
# # a new release is created:
|
||||||
|
# if: ${{ steps.release.outputs.release_created }}
|
||||||
|
# - name: Publish: Install dependencies
|
||||||
|
# run: yarn
|
||||||
|
# if: ${{ steps.release.outputs.release_created }}
|
||||||
|
# - name: Publish
|
||||||
|
# run: cd packages/squiggle-lang && yarn publish
|
||||||
|
# env:
|
||||||
|
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||||
|
# if: ${{ steps.release.outputs.release_created }}
|
||||||
|
relplz-components:
|
||||||
|
name: for components
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: pre_check
|
||||||
|
if: ${{ needs.pre_check.outputs.should_skip_components != 'true' }}
|
||||||
|
steps:
|
||||||
|
- name: Release please (components)
|
||||||
|
uses: google-github-actions/release-please-action@v3
|
||||||
|
with:
|
||||||
|
token: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
command: manifest-pr
|
||||||
|
path: packages/components
|
||||||
|
bump-patch-for-minor-pre-major: true
|
||||||
|
skip-github-release: true
|
||||||
|
# - name: Publish: Checkout source
|
||||||
|
# uses: actions/checkout@v2
|
||||||
|
# # these if statements ensure that a publication only occurs when
|
||||||
|
# # a new release is created:
|
||||||
|
# if: ${{ steps.release.outputs.release_created }}
|
||||||
|
# - name: Publish: Install dependencies
|
||||||
|
# run: yarn
|
||||||
|
# if: ${{ steps.release.outputs.release_created }}
|
||||||
|
# - name: Publish
|
||||||
|
# run: cd packages/components && yarn publish
|
||||||
|
# env:
|
||||||
|
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||||
|
relplz-website:
|
||||||
|
name: for website
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: pre_check
|
||||||
|
if: ${{ needs.pre_check.outputs.should_skip_website != 'true' }}
|
||||||
|
steps:
|
||||||
|
- name: Release please (website)
|
||||||
|
uses: google-github-actions/release-please-action@v3
|
||||||
|
with:
|
||||||
|
token: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
command: manifest-pr
|
||||||
|
path: packages/website
|
||||||
|
bump-patch-for-minor-pre-major: true
|
||||||
|
skip-github-release: true
|
||||||
|
relplz-vscodeext:
|
||||||
|
name: for vscode-ext
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: pre_check
|
||||||
|
if: ${{ needs.pre_check.outputs.should_skip_vscodeext != 'true' }}
|
||||||
|
steps:
|
||||||
|
- name: Release please (vscode-ext)
|
||||||
|
uses: google-github-actions/release-please-action@v3
|
||||||
|
with:
|
||||||
|
token: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
command: manifest-pr
|
||||||
|
path: packages/vscode-ext
|
||||||
|
bump-patch-for-minor-pre-major: true
|
||||||
|
skip-github-release: true
|
||||||
|
relplz-cl:
|
||||||
|
name: for cli
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: pre_check
|
||||||
|
if: ${{ needs.pre_check.outputs.should_skip_cli != 'true' }}
|
||||||
|
steps:
|
||||||
|
- name: Release please (cli)
|
||||||
|
uses: google-github-actions/release-please-action@v3
|
||||||
|
with:
|
||||||
|
token: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
command: manifest-pr
|
||||||
|
path: packages/cli
|
||||||
|
bump-patch-for-minor-pre-major: true
|
||||||
|
skip-github-release: true
|
7
.release-please-manifest.json
Normal file
7
.release-please-manifest.json
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"packages/cli": "0.0.3",
|
||||||
|
"packages/components": "0.2.24",
|
||||||
|
"packages/squiggle-lang": "0.2.11",
|
||||||
|
"packages/vscode-ext": "0.3.1",
|
||||||
|
"packages/website": "0.2.1"
|
||||||
|
}
|
|
@ -12,8 +12,8 @@ _An estimation language_.
|
||||||
|
|
||||||
- [Gallery](https://www.squiggle-language.com/docs/Discussions/Gallery)
|
- [Gallery](https://www.squiggle-language.com/docs/Discussions/Gallery)
|
||||||
- [Squiggle playground](https://squiggle-language.com/playground)
|
- [Squiggle playground](https://squiggle-language.com/playground)
|
||||||
- [Language basics](https://www.squiggle-language.com/docs/Features/Language)
|
- [Language basics](https://www.squiggle-language.com/docs/Guides/Language)
|
||||||
- [Squiggle functions source of truth](https://www.squiggle-language.com/docs/Features/Functions)
|
- [Squiggle functions source of truth](https://www.squiggle-language.com/docs/Guides/Functions)
|
||||||
- [Known bugs](https://www.squiggle-language.com/docs/Discussions/Bugs)
|
- [Known bugs](https://www.squiggle-language.com/docs/Discussions/Bugs)
|
||||||
- [Original lesswrong sequence](https://www.lesswrong.com/s/rDe8QE5NvXcZYzgZ3)
|
- [Original lesswrong sequence](https://www.lesswrong.com/s/rDe8QE5NvXcZYzgZ3)
|
||||||
- [Author your squiggle models as Observable notebooks](https://observablehq.com/@hazelfire/squiggle)
|
- [Author your squiggle models as Observable notebooks](https://observablehq.com/@hazelfire/squiggle)
|
||||||
|
|
|
@ -3,43 +3,43 @@
|
||||||
"version": "0.2.24",
|
"version": "0.2.24",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@floating-ui/react-dom": "^0.7.2",
|
"@floating-ui/react-dom": "^1.0.0",
|
||||||
"@floating-ui/react-dom-interactions": "^0.6.6",
|
"@floating-ui/react-dom-interactions": "^0.9.1",
|
||||||
"@headlessui/react": "^1.6.6",
|
"@headlessui/react": "^1.6.6",
|
||||||
"@heroicons/react": "^1.0.6",
|
"@heroicons/react": "^1.0.6",
|
||||||
"@hookform/resolvers": "^2.9.6",
|
"@hookform/resolvers": "^2.9.7",
|
||||||
"@quri/squiggle-lang": "^0.2.8",
|
"@quri/squiggle-lang": "^0.2.8",
|
||||||
"@react-hook/size": "^2.1.2",
|
"@react-hook/size": "^2.1.2",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
"framer-motion": "^6.5.1",
|
"framer-motion": "^7.0.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"react": "^18.1.0",
|
"react": "^18.1.0",
|
||||||
"react-ace": "^10.1.0",
|
"react-ace": "^10.1.0",
|
||||||
"react-hook-form": "^7.33.1",
|
"react-hook-form": "^7.34.0",
|
||||||
"react-use": "^17.4.0",
|
"react-use": "^17.4.0",
|
||||||
"react-vega": "^7.6.0",
|
"react-vega": "^7.6.0",
|
||||||
"vega": "^5.22.1",
|
"vega": "^5.22.1",
|
||||||
"vega-embed": "^6.21.0",
|
"vega-embed": "^6.21.0",
|
||||||
"vega-lite": "^5.3.0",
|
"vega-lite": "^5.4.0",
|
||||||
"vscode-uri": "^3.0.3",
|
"vscode-uri": "^3.0.3",
|
||||||
"yup": "^0.32.11"
|
"yup": "^0.32.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/plugin-proposal-private-property-in-object": "^7.18.6",
|
"@babel/plugin-proposal-private-property-in-object": "^7.18.6",
|
||||||
"@storybook/addon-actions": "^6.5.9",
|
"@storybook/addon-actions": "^6.5.9",
|
||||||
"@storybook/addon-essentials": "^6.5.9",
|
"@storybook/addon-essentials": "^6.5.10",
|
||||||
"@storybook/addon-links": "^6.5.9",
|
"@storybook/addon-links": "^6.5.10",
|
||||||
"@storybook/builder-webpack5": "^6.5.9",
|
"@storybook/builder-webpack5": "^6.5.10",
|
||||||
"@storybook/manager-webpack5": "^6.5.9",
|
"@storybook/manager-webpack5": "^6.5.10",
|
||||||
"@storybook/node-logger": "^6.5.9",
|
"@storybook/node-logger": "^6.5.9",
|
||||||
"@storybook/preset-create-react-app": "^4.1.2",
|
"@storybook/preset-create-react-app": "^4.1.2",
|
||||||
"@storybook/react": "^6.5.9",
|
"@storybook/react": "^6.5.10",
|
||||||
"@testing-library/jest-dom": "^5.16.4",
|
"@testing-library/jest-dom": "^5.16.5",
|
||||||
"@testing-library/react": "^13.3.0",
|
"@testing-library/react": "^13.3.0",
|
||||||
"@testing-library/user-event": "^14.3.0",
|
"@testing-library/user-event": "^14.4.2",
|
||||||
"@types/jest": "^27.5.0",
|
"@types/jest": "^27.5.0",
|
||||||
"@types/lodash": "^4.14.182",
|
"@types/lodash": "^4.14.182",
|
||||||
"@types/node": "^18.6.1",
|
"@types/node": "^18.6.4",
|
||||||
"@types/react": "^18.0.9",
|
"@types/react": "^18.0.9",
|
||||||
"@types/styled-components": "^5.1.24",
|
"@types/styled-components": "^5.1.24",
|
||||||
"@types/webpack": "^5.28.0",
|
"@types/webpack": "^5.28.0",
|
||||||
|
@ -51,9 +51,9 @@
|
||||||
"react": "^18.1.0",
|
"react": "^18.1.0",
|
||||||
"react-scripts": "^5.0.1",
|
"react-scripts": "^5.0.1",
|
||||||
"style-loader": "^3.3.1",
|
"style-loader": "^3.3.1",
|
||||||
"tailwindcss": "^3.1.6",
|
"tailwindcss": "^3.1.8",
|
||||||
"ts-loader": "^9.3.0",
|
"ts-loader": "^9.3.0",
|
||||||
"tsconfig-paths-webpack-plugin": "^3.5.2",
|
"tsconfig-paths-webpack-plugin": "^4.0.0",
|
||||||
"typescript": "^4.7.4",
|
"typescript": "^4.7.4",
|
||||||
"web-vitals": "^2.1.4",
|
"web-vitals": "^2.1.4",
|
||||||
"webpack": "^5.74.0",
|
"webpack": "^5.74.0",
|
||||||
|
|
|
@ -59,6 +59,13 @@ export const ExpressionViewer: React.FC<Props> = ({
|
||||||
expression,
|
expression,
|
||||||
width,
|
width,
|
||||||
}) => {
|
}) => {
|
||||||
|
if (typeof expression !== "object") {
|
||||||
|
return (
|
||||||
|
<VariableList path={path} heading="Error">
|
||||||
|
{() => `Unknown expression: ${expression}`}
|
||||||
|
</VariableList>
|
||||||
|
);
|
||||||
|
}
|
||||||
switch (expression.tag) {
|
switch (expression.tag) {
|
||||||
case "number":
|
case "number":
|
||||||
return (
|
return (
|
||||||
|
@ -281,10 +288,16 @@ export const ExpressionViewer: React.FC<Props> = ({
|
||||||
);
|
);
|
||||||
default: {
|
default: {
|
||||||
return (
|
return (
|
||||||
<div>
|
<VariableList path={path} heading="Error">
|
||||||
<span>No display for type: </span>{" "}
|
{() => (
|
||||||
<span className="font-semibold text-slate-600">{expression.tag}</span>
|
<div>
|
||||||
</div>
|
<span>No display for type: </span>{" "}
|
||||||
|
<span className="font-semibold text-slate-600">
|
||||||
|
{expression.tag}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</VariableList>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ environment created from the squiggle code.
|
||||||
```js
|
```js
|
||||||
import { run } from "@quri/squiggle-lang";
|
import { run } from "@quri/squiggle-lang";
|
||||||
run(
|
run(
|
||||||
"normal(0, 1) * fromSamples([-3,-2,-1,1,2,3,3,3,4,9]"
|
"normal(0, 1) * SampleSet.fromList([-3, 2,-1,1,2,3,3,3,4,9])"
|
||||||
).value.value.toSparkline().value;
|
).value.value.toSparkline().value;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,15 @@ describe("eval", () => {
|
||||||
test("index", () => expectEvalToBe("r = {a: 1}; r.a", "Ok(1)"))
|
test("index", () => expectEvalToBe("r = {a: 1}; r.a", "Ok(1)"))
|
||||||
test("index", () => expectEvalToBe("r = {a: 1}; r.b", "Error(Record property not found: b)"))
|
test("index", () => expectEvalToBe("r = {a: 1}; r.b", "Error(Record property not found: b)"))
|
||||||
testEvalError("{a: 1}.b") // invalid syntax
|
testEvalError("{a: 1}.b") // invalid syntax
|
||||||
|
test("always the same property ending", () =>
|
||||||
|
expectEvalToBe(
|
||||||
|
`{
|
||||||
|
a: 1,
|
||||||
|
b: 2,
|
||||||
|
}`,
|
||||||
|
"Ok({a: 1,b: 2})",
|
||||||
|
)
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("multi-line", () => {
|
describe("multi-line", () => {
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
"bisect_ppx": "^2.7.1",
|
"bisect_ppx": "^2.7.1",
|
||||||
"chalk": "^5.0.1",
|
"chalk": "^5.0.1",
|
||||||
"codecov": "^3.8.3",
|
"codecov": "^3.8.3",
|
||||||
"fast-check": "^3.1.0",
|
"fast-check": "^3.1.1",
|
||||||
"gentype": "^4.5.0",
|
"gentype": "^4.5.0",
|
||||||
"jest": "^27.5.1",
|
"jest": "^27.5.1",
|
||||||
"moduleserve": "^0.9.1",
|
"moduleserve": "^0.9.1",
|
||||||
|
|
|
@ -18,6 +18,7 @@ import { tagged, tag } from "./types";
|
||||||
|
|
||||||
// Raw rescript types.
|
// Raw rescript types.
|
||||||
export type rescriptExport =
|
export type rescriptExport =
|
||||||
|
| 0 // EvVoid
|
||||||
| {
|
| {
|
||||||
TAG: 0; // EvArray
|
TAG: 0; // EvArray
|
||||||
_0: rescriptExport[];
|
_0: rescriptExport[];
|
||||||
|
@ -140,6 +141,10 @@ export function convertRawToTypescript(
|
||||||
result: rescriptExport,
|
result: rescriptExport,
|
||||||
environment: environment
|
environment: environment
|
||||||
): squiggleExpression {
|
): squiggleExpression {
|
||||||
|
if (typeof result === "number") {
|
||||||
|
// EvVoid
|
||||||
|
return tag("void", "");
|
||||||
|
}
|
||||||
switch (result.TAG) {
|
switch (result.TAG) {
|
||||||
case 0: // EvArray
|
case 0: // EvArray
|
||||||
return tag(
|
return tag(
|
||||||
|
|
|
@ -277,9 +277,13 @@ arrayConstructor 'array'
|
||||||
{ return [head, ...tail]; }
|
{ return [head, ...tail]; }
|
||||||
|
|
||||||
recordConstructor 'record'
|
recordConstructor 'record'
|
||||||
= '{' _nl args:array_recordArguments _nl '}'
|
= '{' _nl args:array_recordArguments _nl end_of_record
|
||||||
{ return h.constructRecord(args); }
|
{ return h.constructRecord(args); }
|
||||||
|
|
||||||
|
end_of_record
|
||||||
|
= '}'
|
||||||
|
/ ',' _nl '}'
|
||||||
|
|
||||||
array_recordArguments
|
array_recordArguments
|
||||||
= head:keyValuePair tail:(_ ',' _nl @keyValuePair)*
|
= head:keyValuePair tail:(_ ',' _nl @keyValuePair)*
|
||||||
{ return [head, ...tail]; }
|
{ return [head, ...tail]; }
|
||||||
|
|
|
@ -7,6 +7,9 @@ module ErrorValue = Reducer_ErrorValue
|
||||||
@genType.opaque
|
@genType.opaque
|
||||||
type internalCode = Object
|
type internalCode = Object
|
||||||
|
|
||||||
|
@genType.opaque
|
||||||
|
type hiddenNameSpace = Object
|
||||||
|
|
||||||
@genType
|
@genType
|
||||||
type rec externalExpressionValue =
|
type rec externalExpressionValue =
|
||||||
| EvArray(array<externalExpressionValue>)
|
| EvArray(array<externalExpressionValue>)
|
||||||
|
@ -27,14 +30,16 @@ type rec externalExpressionValue =
|
||||||
| EvType(record)
|
| EvType(record)
|
||||||
| EvVoid
|
| EvVoid
|
||||||
and record = Js.Dict.t<externalExpressionValue>
|
and record = Js.Dict.t<externalExpressionValue>
|
||||||
and externalBindings = record
|
|
||||||
and lambdaValue = {
|
and lambdaValue = {
|
||||||
parameters: array<string>,
|
parameters: array<string>,
|
||||||
context: externalBindings,
|
context: hiddenNameSpace,
|
||||||
body: internalCode,
|
body: internalCode,
|
||||||
}
|
}
|
||||||
and lambdaDeclaration = Declaration.declaration<lambdaValue>
|
and lambdaDeclaration = Declaration.declaration<lambdaValue>
|
||||||
|
|
||||||
|
@genType
|
||||||
|
type externalBindings = record
|
||||||
|
|
||||||
@genType
|
@genType
|
||||||
type t = externalExpressionValue
|
type t = externalExpressionValue
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,29 @@ type internalExpressionValue = t
|
||||||
|
|
||||||
type functionCall = (string, array<t>)
|
type functionCall = (string, array<t>)
|
||||||
|
|
||||||
|
module Internal = {
|
||||||
|
module NameSpace = {
|
||||||
|
external castNameSpaceToHidden: nameSpace => ExternalExpressionValue.hiddenNameSpace =
|
||||||
|
"%identity"
|
||||||
|
external castHiddenToNameSpace: ExternalExpressionValue.hiddenNameSpace => nameSpace =
|
||||||
|
"%identity"
|
||||||
|
}
|
||||||
|
module Lambda = {
|
||||||
|
let toInternal = (v: ExternalExpressionValue.lambdaValue): lambdaValue => {
|
||||||
|
let p = v.parameters
|
||||||
|
let c = v.context->NameSpace.castHiddenToNameSpace
|
||||||
|
let b = v.body
|
||||||
|
{parameters: p, context: c, body: b}
|
||||||
|
}
|
||||||
|
and toExternal = (v: lambdaValue): ExternalExpressionValue.lambdaValue => {
|
||||||
|
let p = v.parameters
|
||||||
|
let c = v.context->NameSpace.castNameSpaceToHidden
|
||||||
|
let b = v.body
|
||||||
|
{parameters: p, context: c, body: b}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let rec toString = aValue =>
|
let rec toString = aValue =>
|
||||||
switch aValue {
|
switch aValue {
|
||||||
| IEvArray(anArray) => {
|
| IEvArray(anArray) => {
|
||||||
|
@ -244,12 +267,7 @@ let rec toExternal = (iev: t): ExternalExpressionValue.t => {
|
||||||
}
|
}
|
||||||
and mapToExternal = v =>
|
and mapToExternal = v =>
|
||||||
v->Belt.Map.String.map(e => toExternal(e))->Belt.Map.String.toArray->Js.Dict.fromArray
|
v->Belt.Map.String.map(e => toExternal(e))->Belt.Map.String.toArray->Js.Dict.fromArray
|
||||||
and lambdaValueToExternal = v => {
|
and lambdaValueToExternal = Internal.Lambda.toExternal
|
||||||
let p = v.parameters
|
|
||||||
let c = v.context->nameSpaceToTypeScriptBindings
|
|
||||||
let b = v.body
|
|
||||||
{parameters: p, context: c, body: b}
|
|
||||||
}
|
|
||||||
and nameSpaceToTypeScriptBindings = (
|
and nameSpaceToTypeScriptBindings = (
|
||||||
nameSpace: nameSpace,
|
nameSpace: nameSpace,
|
||||||
): ReducerInterface_ExternalExpressionValue.externalBindings => {
|
): ReducerInterface_ExternalExpressionValue.externalBindings => {
|
||||||
|
@ -284,12 +302,7 @@ let rec toInternal = (ev: ExternalExpressionValue.t): t => {
|
||||||
}
|
}
|
||||||
and recordToInternal = v =>
|
and recordToInternal = v =>
|
||||||
v->Js.Dict.entries->Belt.Map.String.fromArray->Belt.Map.String.map(e => toInternal(e))
|
v->Js.Dict.entries->Belt.Map.String.fromArray->Belt.Map.String.map(e => toInternal(e))
|
||||||
and lambdaValueToInternal = v => {
|
and lambdaValueToInternal = Internal.Lambda.toInternal
|
||||||
let p = v.parameters
|
|
||||||
let c = v.context->nameSpaceFromTypeScriptBindings
|
|
||||||
let b = v.body
|
|
||||||
{parameters: p, context: c, body: b}
|
|
||||||
}
|
|
||||||
and nameSpaceFromTypeScriptBindings = (
|
and nameSpaceFromTypeScriptBindings = (
|
||||||
r: ReducerInterface_ExternalExpressionValue.externalBindings,
|
r: ReducerInterface_ExternalExpressionValue.externalBindings,
|
||||||
): nameSpace =>
|
): nameSpace =>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"displayName": "Squiggle",
|
"displayName": "Squiggle",
|
||||||
"description": "Squiggle language support",
|
"description": "Squiggle language support",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "0.2.0",
|
"version": "0.3.1",
|
||||||
"publisher": "QURI",
|
"publisher": "QURI",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
},
|
},
|
||||||
"icon": "media/vendor/icon.png",
|
"icon": "media/vendor/icon.png",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.68.0"
|
"vscode": "^1.69.0"
|
||||||
},
|
},
|
||||||
"categories": [
|
"categories": [
|
||||||
"Programming Languages",
|
"Programming Languages",
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
"vscode:prepublish": "yarn run compile",
|
"vscode:prepublish": "yarn run compile",
|
||||||
"compile:tsc": "tsc -b",
|
"compile:tsc": "tsc -b",
|
||||||
"compile:grammar": "js-yaml syntaxes/squiggle.tmLanguage.yaml >syntaxes/squiggle.tmLanguage.json",
|
"compile:grammar": "js-yaml syntaxes/squiggle.tmLanguage.yaml >syntaxes/squiggle.tmLanguage.json",
|
||||||
"compile:vendor": "(cd ../squiggle-lang && yarn run build) && (cd ../components && yarn run bundle && yarn run build:css) && mkdir -p media/vendor && cp ../components/dist/bundle.js media/vendor/components.js && cp ../components/dist/main.css media/vendor/components.css && cp ../../node_modules/react/umd/react.production.min.js media/vendor/react.js && cp ../../node_modules/react-dom/umd/react-dom.production.min.js media/vendor/react-dom.js && cp ../website/static/img/quri-logo.png media/vendor/icon.png",
|
"compile:vendor": "(cd ../squiggle-lang && yarn run build) && (cd ../components && yarn run bundle && yarn run build:css) && mkdir -p media/vendor && cp ../components/dist/bundle.js media/vendor/components.js && cp ../components/dist/main.css media/vendor/components.css && cp ../../node_modules/react/umd/react.production.min.js media/vendor/react.js && cp ../../node_modules/react-dom/umd/react-dom.production.min.js media/vendor/react-dom.js && cp ../website/static/img/squiggle-logo.png media/vendor/icon.png",
|
||||||
"compile": "yarn run compile:vendor && yarn run compile:grammar && yarn run compile:tsc",
|
"compile": "yarn run compile:vendor && yarn run compile:grammar && yarn run compile:tsc",
|
||||||
"watch": "tsc -b -watch",
|
"watch": "tsc -b -watch",
|
||||||
"pretest": "yarn run compile && yarn run lint",
|
"pretest": "yarn run compile && yarn run lint",
|
||||||
|
@ -128,10 +128,10 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/glob": "^7.2.0",
|
"@types/glob": "^7.2.0",
|
||||||
"@types/node": "18.x",
|
"@types/node": "18.x",
|
||||||
"@types/vscode": "^1.69.0",
|
"@types/vscode": "^1.70.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
"@typescript-eslint/eslint-plugin": "^5.32.0",
|
||||||
"@typescript-eslint/parser": "^5.30.7",
|
"@typescript-eslint/parser": "^5.32.0",
|
||||||
"eslint": "^8.20.0",
|
"eslint": "^8.21.0",
|
||||||
"glob": "^8.0.3",
|
"glob": "^8.0.3",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"typescript": "^4.7.4",
|
"typescript": "^4.7.4",
|
||||||
|
|
8
packages/website/CHANGELOG.md
Normal file
8
packages/website/CHANGELOG.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
### [0.2.1](https://www.github.com/quantified-uncertainty/squiggle/compare/squiggle-website-v0.2.0...squiggle-website-v0.2.1) (2022-08-01)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- added NextJS starter to `Integrations.md` ([7ea9522](https://www.github.com/quantified-uncertainty/squiggle/commit/7ea95225b2fa3bd638b75a23bfd2d55ea1b7d595))
|
||||||
|
- so the PR it opens is proper this time ([fd411c4](https://www.github.com/quantified-uncertainty/squiggle/commit/fd411c49b9013ba215ed305ae6ed66850592433b))
|
|
@ -32,3 +32,7 @@ This extention allows you to run and visualize Squiggle code.
|
||||||
## [Observable Library](https://observablehq.com/@hazelfire/squiggle)
|
## [Observable Library](https://observablehq.com/@hazelfire/squiggle)
|
||||||
|
|
||||||
An exportable [Observable Notebook](https://observablehq.com/@hazelfire/squiggle) of the key components that you can directly import and use in Observable notebooks.
|
An exportable [Observable Notebook](https://observablehq.com/@hazelfire/squiggle) of the key components that you can directly import and use in Observable notebooks.
|
||||||
|
|
||||||
|
## [NextJS starter](https://github.com/quantified-uncertainty/next-app-with-squiggle)
|
||||||
|
|
||||||
|
A template for presenting estimates on a nextjs site.
|
||||||
|
|
|
@ -29,6 +29,8 @@ import { SquiggleEditorWithImportedBindings } from "../../src/components/Squiggl
|
||||||
/>;
|
/>;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Notice, you need to wrap the export of `@quri/squiggle-components` in custom code for dynamicism, please view `packages/website/src/components/` in github for details.
|
||||||
|
|
||||||
Which would then look exactly like
|
Which would then look exactly like
|
||||||
|
|
||||||
<SquiggleEditorWithImportedBindings
|
<SquiggleEditorWithImportedBindings
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "squiggle-website",
|
"name": "squiggle-website",
|
||||||
"version": "0.0.0",
|
"version": "0.2.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -12,8 +12,8 @@
|
||||||
"format": "prettier --write ."
|
"format": "prettier --write ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/core": "2.0.0-rc.1",
|
"@docusaurus/core": "2.0.1",
|
||||||
"@docusaurus/preset-classic": "2.0.0-rc.1",
|
"@docusaurus/preset-classic": "2.0.1",
|
||||||
"@heroicons/react": "^1.0.6",
|
"@heroicons/react": "^1.0.6",
|
||||||
"@quri/squiggle-components": "^0.2.23",
|
"@quri/squiggle-components": "^0.2.23",
|
||||||
"base64-js": "^1.5.1",
|
"base64-js": "^1.5.1",
|
||||||
|
|
14
release-please-config.json
Normal file
14
release-please-config.json
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"bump-patch-for-minor-pre-major": true,
|
||||||
|
"release-type": "node",
|
||||||
|
"packages": {
|
||||||
|
"packages/squiggle-lang": {},
|
||||||
|
"packages/components": {},
|
||||||
|
"packages/website": {},
|
||||||
|
"packages/vscode-ext": {},
|
||||||
|
"packages/cli": {}
|
||||||
|
},
|
||||||
|
"skip-github-release": true,
|
||||||
|
"commit-search-depth": 50,
|
||||||
|
"plugins": ["node-workspace"]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user