Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize repo; TypeScript config improvements #3463

Merged
merged 8 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"@quri/content",
"@quri/squiggle-ai"
],
"changelog": "../packages/ops/dist/changelog.cjs"
"changelog": "../internal-packages/ops/dist/changelog.cjs"
}
4 changes: 2 additions & 2 deletions .github/workflows/cleanup-vercel-deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Run cleanup script
working-directory: ./packages/ops
working-directory: ./internal-packages/ops
env:
VERCEL_API_TOKEN: "${{ secrets.VERCEL_API_TOKEN }}"
run: npx tsx ./scripts/cleanup-vercel-deployments.ts
4 changes: 2 additions & 2 deletions .github/workflows/prisma-migrate-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Migrate
working-directory: ./packages/hub
working-directory: ./apps/hub
env:
DATABASE_URL: "${{ secrets.DATABASE_DIRECT_URL }}"
run: npx prisma migrate deploy
4 changes: 2 additions & 2 deletions .github/workflows/prisma-migrate-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Migrate
working-directory: ./packages/hub
working-directory: ./apps/hub
env:
DATABASE_URL: "${{ secrets.DATABASE_DIRECT_URL }}"
run: npx prisma migrate deploy
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: pnpm install

- name: Build changelog script
working-directory: packages/ops
working-directory: internal-packages/ops
run: pnpm turbo build

# if there are existing changesets, PR will be created.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reset-preview-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Reset
working-directory: ./packages/hub
working-directory: ./apps/hub
env:
DATABASE_URL: "${{ secrets.DATABASE_DIRECT_URL }}"
run: npx prisma migrate reset --force
15 changes: 4 additions & 11 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
.direnv
*.bs.js
*.gen.tsx
packages/components/storybook-static
packages/components/grammar/generated
node_modules
packages/*/node_modules
packages/website/.docusaurus
packages/squiggle-lang/lib
**/node_modules
packages/squiggle-lang/coverage/
packages/squiggle-lang/.cache/
packages/website/build/
packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.js
packages/vscode-ext/media/vendor/
packages/squiggle-lang/.nyc_output/

packages/*/dist
result
packages/prettier-plugin/test/files/
internal-packages/*/dist
apps/*/dist
12 changes: 6 additions & 6 deletions .vscode/squiggle.code-workspace.default
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
"name": "vscode-ext",
"path": "../packages/vscode-ext",
},
{
"name": "cli",
"path": "../packages/cli",
},
{
"name": "squiggle-lang",
"path": "../packages/squiggle-lang",
Expand All @@ -23,11 +19,15 @@
},
{
"name": "website",
"path": "../packages/website",
"path": "../apps/website",
},
{
"name": "hub",
"path": "../apps/hub",
},
{
"name": "content",
"path": "../packages/content",
"path": "../internal-packages/content",
},
],
"settings": {
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
See the [Changelog.mdx page](./packages/website/docs/Changelog.mdx) for the changelog.
See the [Changelog.mdx page](./internal-packages/content/content/docs/index.mdx) for the changelog.
18 changes: 7 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,22 @@

We welcome contributions from developers, especially people in React/TypeScript, and interpreters/parsers. We also are keen to hear issues filed by users!

Squiggle is currently in "Early Access" mode.
Squiggle is currently in "Beta" mode.

# Quick links

- [Squiggle documentation](https://www.squiggle-language.com/docs/Overview)
- The team presently communicates via the **EA Forecasting and Epistemics** slack (channels `#squiggle-dev` and `#squiggle-ops`). You can track down an invite by reaching out to Ozzie Gooen
- You can email `[email protected]` if you need assistance in onboarding or if you have questions
- The team presently communicates via the **EA Forecasting and Epistemics** slack (channel `#squiggle-dev`). You can track down an invite by reaching out to Ozzie Gooen
- You can email `[email protected]` (Slava Matyuhin on Slack) if you need assistance in onboarding or if you have questions
- Alternatively, you can join the public [Discord](https://discord.gg/nsTnQTgtG6), or ask in GitHub issues

# Bug reports

Anyone (with a GitHub account) can file an issue at any time. Please allow [Slava](https://github.com/berekuk) and [Ozzie](https://github.com/OAGr) to triage, but otherwise just follow the suggestions in the issue templates.

# Project structure

Squiggle is a **monorepo** with several **packages**.

- **components** is where we improve reactive interfacing with Squiggle
- **squiggle-lang** is where the magic happens: probability distributions, the interpreter, etc.
- **website** is the site [squiggle-language.com](https://www.squiggle-language.com)
- **vscode-ext** is the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=qURI.vscode-squiggle)
This is a **monorepo**. See [README.md](README.md) for more details on the structure.

# VS Code

Expand All @@ -33,11 +29,11 @@ We use Vercel, and it should only concern Slava and Ozzie.

# Development environment, building, testing, dev server

You'll need [pnpm](https://pnpm.io/).
You'll need [pnpm](https://pnpm.io/) and [turbo](https://turbo.build/repo/docs).

Being a monorepo, where packages are connected by dependency, it's important to follow `README.md`s closely. Each package has its own `README.md`, which is where the bulk of information is.

We aspire for `ci.yaml` and `README.md`s to be in one-to-one correspondence.
We aspire for `ci.yml` and `README.md`s to be in one-to-one correspondence.

# Try not to push directly to `main`

Expand Down
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,29 @@ A simple programming language for probabilistic estimation that runs on Javascri

## Packages

This monorepo has several packages that can be used for various purposes. All
the packages can be found in `packages`.
This monorepo has several packages that can be used for various purposes.

### Public packages

All packages that are published to npm can be found in `packages`.

- `@quri/squiggle-lang` in `packages/squiggle-lang` contains the core language, particularly
an interface to parse Squiggle expressions and return descriptions of distributions
or results.
- `@quri/squiggle-ui` in `packages/ui` has React components for common QURI projects.
- `@quri/squiggle-components` in `packages/components` contains React components particularly meant to be used with Squiggle visualizations.
- `packages/website` is the main documentation website for Squiggle. It is hosted at `squiggle-language.com`.
- `packages/hub` is the code behind [Squiggle Hub](https://squigglehub.org).
- `packages/vscode-ext` is the VS Code extension for writing estimation functions.
- `packages/cli` is an experimental way of using imports in Squiggle, which is also on [npm](https://www.npmjs.com/package/squiggle-cli-experimental).
- `packages/vscode-ext` is the VS Code extension for writing estimation functions. It's not published to npm, but it's published to the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle).

### Applications

Applications (usually built with Next.js) can be found in `apps`.

- `apps/website` is the main documentation website for Squiggle. It is hosted at `squiggle-language.com`.
- `apps/hub` is the code behind [Squiggle Hub](https://squigglehub.org).

### Internal packages

Internal packages (not published to npm) can be found in `internal-packages`.

# Develop

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { FC } from "react";

import { Button } from "@quri/ui";

import { ButtonProps } from "../../../ui/dist/components/Button";
import { Button, type ButtonProps } from "@quri/ui";

type Props = {
loadNext: (count: number) => void;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading