After pair programming with @Hazelfire, still need to fix playground scripts (rebase: README and index.js)
This commit is contained in:
parent
8f82f1fc47
commit
f492899117
8
.github/workflows/ci.yaml
vendored
8
.github/workflows/ci.yaml
vendored
|
@ -39,6 +39,8 @@ jobs:
|
||||||
run: yarn build
|
run: yarn build
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: yarn test
|
run: yarn test
|
||||||
|
- name: Run tsc and webpack
|
||||||
|
run: yarn bundle
|
||||||
|
|
||||||
components-build-test:
|
components-build-test:
|
||||||
name: Components build and test
|
name: Components build and test
|
||||||
|
@ -54,6 +56,6 @@ jobs:
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
run: yarn
|
run: yarn
|
||||||
- name: See if storybook builds
|
- name: See if storybook builds
|
||||||
run: yarn build-storybook
|
run: yarn build
|
||||||
- name: Run tsc
|
- name: Run tsc and webpack
|
||||||
run: yarn ci
|
run: yarn bundle
|
||||||
|
|
|
@ -16,7 +16,7 @@ Squiggle is currently pre-alpha.
|
||||||
|
|
||||||
# Bug reports
|
# Bug reports
|
||||||
|
|
||||||
Anyone (with a github account) can file an issue at any time. Please allow Quinn, Sam, and Ozzie to triage, but we encourage you to use either the `Bug` or `Enhancement` labels depending on the nature of the issue you're filing. `
|
Anyone (with a github account) can file an issue at any time. Please allow Quinn, Sam, and Ozzie to triage, but otherwise just follow the suggestions in the issue templates.
|
||||||
|
|
||||||
# Project structure
|
# Project structure
|
||||||
|
|
||||||
|
|
22
README.md
22
README.md
|
@ -5,18 +5,18 @@ This is an experiment DSL/language for making probabilistic estimates.
|
||||||
This monorepo has several packages that can be used for various purposes. All
|
This monorepo has several packages that can be used for various purposes. All
|
||||||
the packages can be found in `packages`.
|
the packages can be found in `packages`.
|
||||||
|
|
||||||
`@squiggle/lang` in `packages/squiggle-lang` contains the core language, particularly
|
`@quri/squiggle-lang` in `packages/squiggle-lang` contains the core language, particularly
|
||||||
an interface to parse squiggle expressions and return descriptions of distributions
|
an interface to parse squiggle expressions and return descriptions of distributions
|
||||||
or results.
|
or results.
|
||||||
|
|
||||||
`@squiggle/components` in `packages/components` contains React components that
|
`@quri/squiggle-components` in `packages/components` contains React components that
|
||||||
can be passed squiggle strings as props, and return a presentation of the result
|
can be passed squiggle strings as props, and return a presentation of the result
|
||||||
of the calculation.
|
of the calculation.
|
||||||
|
|
||||||
`@squiggle/playground` in `packages/playground` contains a website for a playground
|
`@quri/playground` in `packages/playground` contains a website for a playground
|
||||||
for squiggle. This website is hosted at `playground.squiggle-language.com`
|
for squiggle. This website is hosted at `playground.squiggle-language.com`
|
||||||
|
|
||||||
`@squiggle/website` in `packages/website` The main descriptive website for squiggle,
|
`@quri/squiggle-website` in `packages/website` The main descriptive website for squiggle,
|
||||||
it is hosted at `squiggle-language.com`.
|
it is hosted at `squiggle-language.com`.
|
||||||
|
|
||||||
The playground depends on the components library which then depends on the language.
|
The playground depends on the components library which then depends on the language.
|
||||||
|
@ -24,16 +24,12 @@ This means that if you wish to work on the components library, you will need
|
||||||
to package the language, and for the playground to work, you will need to package
|
to package the language, and for the playground to work, you will need to package
|
||||||
the components library and the playground.
|
the components library and the playground.
|
||||||
|
|
||||||
Scripts are available for you in the root directory to do important activities,
|
# Develop
|
||||||
such as:
|
|
||||||
|
|
||||||
- `yarn build:lang`. Builds and packages the language
|
For any project in the repo, begin by running `yarn` in the top level
|
||||||
- `yarn storybook:components`. Hosts the component storybook
|
|
||||||
|
|
||||||
# Local playground
|
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
yarn build:playground
|
yarn
|
||||||
cd packages/playground
|
|
||||||
yarn parcel
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
See `packages/*/README.md` to work with whatever project you're interested in.
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
"build:playground": "cd packages/playground && yarn && yarn parcel-build",
|
"build:playground": "cd packages/playground && yarn && yarn parcel-build",
|
||||||
"ci:lang": "yarn workspace @quri/squiggle-lang ci",
|
"ci:lang": "yarn workspace @quri/squiggle-lang ci",
|
||||||
"ci:components": "yarn ci:lang && yarn workspace @quri/squiggle-components ci",
|
"ci:components": "yarn ci:lang && yarn workspace @quri/squiggle-components ci",
|
||||||
"ci:playground": "yarn ci:components && yarn workspace @quri/squiggle-playground ci"
|
"ci:playground": "yarn ci:components && yarn workspace @quri/squiggle-playground ci",
|
||||||
|
"nodeclean": "rm -r node_modules && rm -r packages/*/node_modules && "
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Squiggle Components
|
# Squiggle Components
|
||||||
This package contains all the components for squiggle. These can be used either as a library or hosted as a [storybook](https://storybook.js.org/).
|
This package contains all the components for squiggle. These can be used either as a library or hosted as a [storybook](https://storybook.js.org/).
|
||||||
# Build for development
|
|
||||||
|
|
||||||
|
# Build for development
|
||||||
You need to _prepare_ by building and bundling `squiggle-lang`
|
You need to _prepare_ by building and bundling `squiggle-lang`
|
||||||
``` sh
|
``` sh
|
||||||
cd ../squiggle-language
|
cd ../squiggle-language
|
||||||
|
@ -23,7 +23,7 @@ Run a development server
|
||||||
yarn start
|
yarn start
|
||||||
```
|
```
|
||||||
|
|
||||||
And build artefacts for production,
|
And build artefacts for production,
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
yarn bundle # builds components library
|
yarn bundle # builds components library
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
|
# TODO: REVIVE PLAYGROUND.
|
||||||
|
|
||||||
# Squiggle Playground
|
# Squiggle Playground
|
||||||
|
|
||||||
This repository contains the squiggle playground, a small web interface
|
This repository contains the squiggle playground, a small web interface
|
||||||
for playing around with squiggle concepts.
|
for playing around with squiggle concepts.
|
||||||
|
|
||||||
It depends on `@squiggle/components` and `@squiggle/lang` so both of them will
|
It depends on `@quri/squiggle-components` and `@quri/squiggle-lang` so both of them will
|
||||||
need to be packaged for this to work. This can be done from the root directory
|
need to be packaged for this to work. This can be done from the root directory
|
||||||
with
|
with
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,27 @@
|
||||||
|
# Squiggle language
|
||||||
|
|
||||||
|
# Build for development
|
||||||
|
``` sh
|
||||||
|
yarn
|
||||||
|
yarn build
|
||||||
|
yarn bundle
|
||||||
|
```
|
||||||
|
|
||||||
|
Other:
|
||||||
|
``` sh
|
||||||
|
yarn start # listens to files and recompiles at every mutation
|
||||||
|
yarn test
|
||||||
|
yarn test:watch # keeps an active session and runs all tests at every mutation
|
||||||
|
```
|
||||||
|
|
||||||
|
# TODO: clean up this README.md
|
||||||
|
|
||||||
# Squiggle Language
|
# Squiggle Language
|
||||||
Squiggle is a language for representing probability distributions, as well as
|
Squiggle is a language for representing probability distributions, as well as
|
||||||
functions that return probability distributions. Its original intended use is
|
functions that return probability distributions. Its original intended use is
|
||||||
for improving epistemics around EA decisions.
|
for improving epistemics around EA decisions.
|
||||||
|
|
||||||
This package, @squiggle/lang, contains the core language of squiggle. The main
|
This package, @quri/squiggle-lang, contains the core language of squiggle. The main
|
||||||
feature revolves around evaluating squiggle expressions. Currently the package
|
feature revolves around evaluating squiggle expressions. Currently the package
|
||||||
only exports a single function, named "run", which from a squiggle string returns
|
only exports a single function, named "run", which from a squiggle string returns
|
||||||
an object representing the result of the evaluation.
|
an object representing the result of the evaluation.
|
||||||
|
|
|
@ -8,11 +8,8 @@
|
||||||
"start": "rescript build -w -with-deps",
|
"start": "rescript build -w -with-deps",
|
||||||
"clean": "rescript clean",
|
"clean": "rescript clean",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:ci": "yarn jest ./__tests__/Lodash__test.res",
|
"test:watch": "jest --watchAll",
|
||||||
"watch:test": "jest --watchAll",
|
"all": "yarn build && yarn bundle && yarn test"
|
||||||
"watch:s": "yarn jest -- Converter_test --watch",
|
|
||||||
"package": "tsc",
|
|
||||||
"ci": "yarn build && yarn package"
|
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Rescript"
|
"Rescript"
|
||||||
|
|
|
@ -4,38 +4,32 @@ This website is built using [Docusaurus 2](https://docusaurus.io/), a modern sta
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
```
|
``` sh
|
||||||
$ yarn
|
yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
### Local Development
|
### Local Development
|
||||||
|
|
||||||
```
|
``` sh
|
||||||
$ yarn start
|
yarn start
|
||||||
```
|
```
|
||||||
|
|
||||||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
||||||
|
|
||||||
### Build
|
### Build
|
||||||
|
|
||||||
```
|
``` sh
|
||||||
$ yarn build
|
yarn build
|
||||||
```
|
```
|
||||||
|
|
||||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
||||||
|
|
||||||
### Deployment
|
### Clean
|
||||||
|
|
||||||
Using SSH:
|
Clean up the build artefacts.
|
||||||
|
``` sh
|
||||||
```
|
yarn clean
|
||||||
$ USE_SSH=true yarn deploy
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Not using SSH:
|
# TODO: unify formatting across `packages/*/README.md`
|
||||||
|
# TODO: build docs in `ci.yaml`.
|
||||||
```
|
|
||||||
$ GIT_USER=<Your GitHub username> yarn deploy
|
|
||||||
```
|
|
||||||
|
|
||||||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
|
||||||
|
|
|
@ -3,15 +3,10 @@
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docusaurus": "docusaurus",
|
|
||||||
"start": "docusaurus start",
|
"start": "docusaurus start",
|
||||||
"build": "docusaurus build",
|
"build": "docusaurus build",
|
||||||
"swizzle": "docusaurus swizzle",
|
"clean": "docusaurus clear",
|
||||||
"deploy": "docusaurus deploy",
|
"all": "yarn build"
|
||||||
"clear": "docusaurus clear",
|
|
||||||
"serve": "docusaurus serve",
|
|
||||||
"write-translations": "docusaurus write-translations",
|
|
||||||
"write-heading-ids": "docusaurus write-heading-ids"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/core": "2.0.0-beta.15",
|
"@docusaurus/core": "2.0.0-beta.15",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user