Skip to content

Commit

Permalink
Merge branch 'main' into soil-pca
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil authored Nov 11, 2024
2 parents 2472d34 + 324c7eb commit 0d1c4b1
Show file tree
Hide file tree
Showing 1,322 changed files with 195,172 additions and 25,025 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
test/build
test/input
test/output
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-this-alias": 0,
"@typescript-eslint/no-unused-vars": ["error", {"ignoreRestSiblings": true}],
"import/consistent-type-specifier-style": "warn",
"import/first": "warn",
"import/newline-after-import": "warn",
"import/no-duplicates": "off",
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ask git to not change line endings (to preserve content hashes).
* -text
63 changes: 12 additions & 51 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
workflow_dispatch: {}
push:
branches: [main]
schedule:
- cron: "15 10 * * *"

jobs:
deploy:
Expand All @@ -19,57 +21,16 @@ jobs:
with:
node-version: 20
cache: 'yarn'
cache-dependency-path: |
yarn.lock
'examples/*/yarn.lock'
- run: yarn --frozen-lockfile
- id: date
run: echo "date=$(TZ=America/Los_Angeles date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- id: cache-data
uses: actions/cache@v4
with:
path: docs/.observablehq/cache
key: data-${{ hashFiles('docs/data/*') }}-${{ steps.date.outputs.date }}
- run: yarn build
- name: Build example "api"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/api
- name: Build example "chess"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/chess
- name: Build example "eia"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/eia
env:
EIA_KEY: ${{ secrets.EIA_KEY }}
- name: Build example "google-analytics"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/google-analytics
- run: yarn docs:build
- run: yarn docs:deploy
env:
GA_PROPERTY_ID: ${{ vars.GA_PROPERTY_ID }}
GA_CLIENT_EMAIL: ${{ secrets.GA_CLIENT_EMAIL }}
GA_PRIVATE_KEY: ${{ secrets.GA_PRIVATE_KEY }}
- name: Build example "hello-world"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/hello-world
- name: Build example "mortgage-rates"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/mortgage-rates
- name: Build example "penguin-classification"
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
yarn --frozen-lockfile && yarn build
working-directory: examples/penguin-classification
- name: Build example "plot"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/plot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: mkdir dist/examples && for i in examples/*; do if [ -d $i/dist ]; then mv -v $i/dist dist/examples/$(basename $i); fi; done
- uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: framework-pages
directory: dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
# TODO: This doesn't include the examples. How can we fix that?
# TODO: Re-enable deploy to Observable
# - name: Deploy to Observable
# run: yarn deploy -m "$(git log -1 --pretty=%s)"
# env:
# OBSERVABLE_TOKEN: ${{ secrets.OBSERVABLE_API_TOKEN }}
OBSERVABLE_TOKEN: ${{ secrets.OBSERVABLE_API_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Publish

on:
workflow_dispatch: {}
release:
types: [published]

Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,26 @@ jobs:
strategy:
matrix:
version: [20, 21]
runs-on: ubuntu-latest
os: [ubuntu-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
cache: yarn
- run: yarn --frozen-lockfile
- run: yarn c8 --check-coverage -x src/**/*.d.ts -x src/preview.ts -x src/observableApiConfig.ts -x src/client --lines 80 --per-file yarn test:mocha
- run: yarn test:coverage
- run: yarn test:tsc
- run: |
echo ::add-matcher::.github/eslint.json
yarn run eslint src test --format=compact
yarn run eslint src test --format=compact --max-warnings=0
- run: yarn test:prettier
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output-changes
name: test-output-changes-${{ matrix.os }}-${{ matrix.version }}
path: |
test/output/*-changed.*
test/output/build/*-changed/
15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
.DS_Store
**/.observablehq/cache/
coverage/
docs/themes.md
docs/theme/*.md
dist/
.DS_Store
.env
/coverage/
/dist/
/docs/.observablehq/dist/
/test/build/
/test/output/**/*-changed.*
/test/output/build/**/*-changed/
node_modules/
test/output/*-changed.*
test/output/build/*-changed/
yarn-error.log
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Observable Framework

- [Documentation](https://observablehq.com/framework/)
- [Changelog](https://github.com/observablehq/framework/releases)
- [Issues](https://github.com/observablehq/framework/issues)
[**Observable Framework**](https://observablehq.com/framework/) is a free, [open-source](./LICENSE), static site generator for data apps, dashboards, reports, and more. Framework combines JavaScript on the front-end for interactive graphics with any language on the back-end for data analysis. Framework features [data loaders](https://observablehq.com/framework/loaders) that precompute static snapshots of data at build time for dashboards that load instantly.

<a href="https://observablehq.observablehq.cloud/oss-analytics/@observablehq/framework">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://observablehq.observablehq.cloud/oss-analytics/@observablehq/framework/downloads-dark.svg">
<img alt="Daily downloads of Observable Framework" src="https://observablehq.observablehq.cloud/oss-analytics/@observablehq/framework/downloads.svg">
</picture>
</a>

<sub>Daily downloads of Observable Framework · [oss-analytics](https://observablehq.observablehq.cloud/oss-analytics/)</sub>

## Documentation 📚

https://observablehq.com/framework/

## Examples 🖼️

https://github.com/observablehq/framework/tree/main/examples

## Releases (changelog) 🚀

https://github.com/observablehq/framework/releases

## Getting help 🏠

Please [open a discussion](https://github.com/observablehq/framework/discussions) if you’d like help. We also recommend [searching issues](https://github.com/observablehq/framework/issues).

## Contributing 🙏

See [Contributing](https://observablehq.com/framework/contributing).
4 changes: 0 additions & 4 deletions bin/observable-init.js

This file was deleted.

202 changes: 0 additions & 202 deletions bin/observable.ts

This file was deleted.

Loading

0 comments on commit 0d1c4b1

Please sign in to comment.