Skip to content

Commit 971e9ef

Browse files
committed
Merge branch 'main' into npm
2 parents c2c2ccc + 6b3c951 commit 971e9ef

File tree

456 files changed

+15409
-37662
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

456 files changed

+15409
-37662
lines changed

.config/.markdown-link-check-local.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"ignorePatterns": [
33
{
4-
"_comment_1": "Our pipeline depends only on our assets.",
4+
"_comment_1": "Our pipeline should only depend on our assets.",
55
"_comment_2": "If some third-party website breaks a link, we cover that in ./.markdown-link-check-all.json",
66
"_comment_3": "So this excludes anything that's not a relative link to a file in our repo or a link to our file on the web.",
77
"pattern": "^(?!https://github\\.com/(PRQL|prql)|https://prql-lang\\.org|https://raw\\.githubusercontent\\.com/(PRQL|prql)|[./]+|file://).*$"
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "lldb",
9+
"request": "launch",
10+
"name": "prqlc _a.prql",
11+
"program": "${workspaceFolder}/target/debug/prqlc",
12+
"args": ["debug", "semantics", "_a.prql"],
13+
"env": {
14+
"RUST_LOG": "debug",
15+
"RUST_BACKTRACE": "1"
16+
},
17+
"preLaunchTask": "prqlc-build",
18+
"cwd": "${workspaceFolder}"
19+
}
20+
]
21+
}
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"nixEnvSelector.args": ".#full",
3+
"nixEnvSelector.suggestion": false,
4+
"nixEnvSelector.nixFile": "${workspaceRoot}/flake.nix",
5+
// "prettier.configPath": ".config/prettier.yaml",
6+
"files.exclude": {
7+
"**/.git": true,
8+
"**/.svn": true,
9+
"**/.hg": true,
10+
"**/CVS": true,
11+
"**/.DS_Store": true,
12+
"**/Thumbs.db": true,
13+
"web/book/book": true,
14+
"web/build": true,
15+
".direnv": true,
16+
".pytest_cache": true,
17+
".mypy_cache": true
18+
}
19+
}

.config/vscode-recommended/tasks.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "prqlc-build",
6+
"type": "cargo",
7+
"command": "build",
8+
"args": ["--package=prqlc"],
9+
"presentation": {
10+
"reveal": "silent",
11+
"clear": true
12+
},
13+
"problemMatcher": ["$rustc"]
14+
}
15+
]
16+
}

.github/.codecov.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ comment: false
22

33
ignore:
44
# Contains code for integration tests which don't run in coverage
5-
- "crates/prql-compiler/tests/integration/**"
5+
- "prqlc/prql-compiler/tests/integration/**"
66

77
coverage:
88
status:
+9-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: build-wheel
22
description:
3-
"Use maturin to build python dists of prql-python. Conditional if checks
3+
"Use maturin to build python dists of prql-python. Conditional `if` checks
44
ensure only the correct OS build is called."
55
inputs:
66
target:
@@ -10,37 +10,33 @@ inputs:
1010
runs:
1111
using: composite
1212
steps:
13-
- run: ./.github/set_version.sh
14-
shell: bash
15-
- uses: Swatinem/rust-cache@v2
16-
with:
17-
save-if: ${{ github.ref == 'refs/heads/main' }}
18-
prefix-key: ${{ env.version }}
19-
shared-key: python
13+
# There's no point caching here, because the maturin action uses a container.
2014
- uses: messense/maturin-action@v1
2115
if: inputs.target == 'source'
2216
with:
2317
command: sdist
24-
args: -o dist -m bindings/prql-python/Cargo.toml
18+
args: -o target/python -m prqlc/bindings/python/Cargo.toml
2519
- uses: messense/maturin-action@v1
2620
if: runner.os == 'Linux' && inputs.target != 'source'
2721
with:
2822
target: ${{ inputs.target }}
2923
manylinux: auto
3024
command: build
31-
args: --release -o dist -m bindings/prql-python/Cargo.toml
25+
args: --release -o target/python -m prqlc/bindings/python/Cargo.toml
3226
- uses: messense/maturin-action@v1
3327
if: runner.os == 'Windows' && inputs.target != 'source'
3428
with:
3529
command: build
36-
args: --release -o dist -m bindings/prql-python/Cargo.toml
30+
args: --release -o target/python -m prqlc/bindings/python/Cargo.toml
3731
- uses: messense/maturin-action@v1
3832
if: runner.os == 'macOS' && inputs.target != 'source'
3933
with:
4034
command: build
41-
args: --release -o dist --universal2 -m bindings/prql-python/Cargo.toml
35+
args:
36+
--release -o target/python --universal2 -m
37+
prqlc/bindings/python/Cargo.toml
4238
- name: Upload wheels
4339
uses: actions/upload-artifact@v3
4440
with:
4541
name: wheels
46-
path: dist
42+
path: target/python

.github/actions/build-prqlc/action.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ runs:
2222
- run: rustup target add ${{ inputs.target }}
2323
shell: bash
2424

25-
- run: ./.github/set_version.sh
25+
- run: ./.github/workflows/scripts/set_version.sh
2626
shell: bash
2727

2828
- uses: Swatinem/rust-cache@v2
@@ -75,7 +75,7 @@ runs:
7575
export ARTIFACT_NAME="prqlc-v${{ github.ref_type == 'tag' && github.ref_name || 0 }}-${{ matrix.target }}.tar.gz"
7676
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >>"$GITHUB_ENV"
7777
cd target/${{ matrix.target }}/${{ inputs.profile == 'release' && 'release' || 'debug' }}
78-
tar czf "../../../${ARTIFACT_NAME}" prqlc ../../../LICENSE -C ../../../crates/prqlc/ README.md
78+
tar czf "../../../${ARTIFACT_NAME}" prqlc ../../../LICENSE ../../../prqlc/prqlc/README.md
7979
8080
- name: Create artifact for Windows
8181
shell: bash
@@ -84,7 +84,7 @@ runs:
8484
export ARTIFACT_NAME="prqlc-v${{ github.ref_type == 'tag' && github.ref_name || 0 }}-${{ matrix.target }}.zip"
8585
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >>"$GITHUB_ENV"
8686
cd target/${{ matrix.target }}/${{ inputs.profile == 'release' && 'release' || 'debug' }}
87-
7z a "../../../${ARTIFACT_NAME}" prqlc.exe ../../../LICENSE ../../../crates/prqlc/README.md
87+
7z a "../../../${ARTIFACT_NAME}" prqlc.exe ../../../LICENSE ../../../prqlc/prqlc/README.md
8888
8989
- name: Upload prqlc
9090
uses: actions/upload-artifact@v3

.github/actions/time-compilation/action.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ inputs:
99
runs:
1010
using: composite
1111
steps:
12-
- run: ./.github/set_version.sh
12+
- run: ./.github/workflows/scripts/set_version.sh
1313
shell: bash
1414
- name: 💰 Cache
1515
id: cache

.github/dependabot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ updates:
2222
prefix: "chore: "
2323

2424
- package-ecosystem: "npm"
25-
directory: "/bindings/prql-js"
25+
directory: "/prqlc/bindings/js"
2626
schedule:
2727
interval: daily
2828
ignore:

.github/workflows/build-devcontainer.yaml

+7-11
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,15 @@ on:
1212
type: boolean
1313
default: false
1414

15-
concurrency:
16-
group: ${{ github.workflow }}-${{ github.ref }}
17-
cancel-in-progress: true
18-
1915
jobs:
2016
build:
2117
runs-on: ubuntu-latest
2218
timeout-minutes: 3600
2319
steps:
2420
- name: 📂 Checkout code
25-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2622

27-
- uses: docker/metadata-action@v4
23+
- uses: docker/metadata-action@v5
2824
id: meta
2925
with:
3026
images: ghcr.io/${{ github.repository_owner }}/prql-devcontainer-base
@@ -33,32 +29,32 @@ jobs:
3329
type=raw,latest
3430
3531
- name: Login to GitHub Container Registry
36-
uses: docker/login-action@v2
32+
uses: docker/login-action@v3
3733
with:
3834
registry: ghcr.io
3935
username: ${{ github.repository_owner }}
4036
password: ${{ secrets.GITHUB_TOKEN }}
4137

4238
- name: Set up QEMU
43-
uses: docker/setup-qemu-action@v2
39+
uses: docker/setup-qemu-action@v3
4440

4541
- name: Set up Docker Buildx
46-
uses: docker/setup-buildx-action@v2
42+
uses: docker/setup-buildx-action@v3
4743

4844
- name: Prep args
4945
run: |
5046
echo "cargo_crates=$(yq -r '.vars.cargo_crates' Taskfile.yml)" >>"$GITHUB_ENV"
5147
5248
- name: Build
53-
uses: docker/build-push-action@v4
49+
uses: docker/build-push-action@v5
5450
timeout-minutes: 3600
5551
with:
5652
context: .devcontainer/base-image
5753
build-args: |
5854
cargo_crates=${{ env.cargo_crates }}
5955
tags: ${{ steps.meta.outputs.tags }}
6056
platforms: linux/amd64, linux/arm64
61-
push: ${{ inputs.push == 'true' }}
57+
push: ${{ inputs.push }}
6258
# `type=gha` not active, see below
6359
cache-from: |
6460
${{ steps.meta.outputs.tags }}

.github/workflows/build-web.yaml

+32-9
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ env:
1010
RUSTFLAGS: "-C debuginfo=0"
1111
RUSTDOCFLAGS: "-Dwarnings"
1212

13-
concurrency:
14-
# See notes in `tests.yaml`
15-
group: ${{ github.workflow }}-${{ github.ref }}-web
16-
cancel-in-progress: true
17-
1813
jobs:
1914
build-web:
2015
runs-on: ubuntu-latest
@@ -26,10 +21,10 @@ jobs:
2621

2722
steps:
2823
- name: 📂 Checkout code
29-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
3025

31-
# Website requires hugo
32-
- name: Setup hugo
26+
# Website requires Hugo
27+
- name: Setup Hugo
3328
uses: peaceiris/actions-hugo@v2.6.0
3429

3530
- uses: baptiste0928/cargo-install@v2
@@ -54,7 +49,7 @@ jobs:
5449
cache: "npm"
5550
cache-dependency-path: "**/package-lock.json"
5651

57-
- run: ./.github/set_version.sh
52+
- run: ./.github/workflows/scripts/set_version.sh
5853

5954
- name: 💰 Cache
6055
uses: Swatinem/rust-cache@v2
@@ -75,3 +70,31 @@ jobs:
7570
- uses: actions/upload-pages-artifact@v2.0.0
7671
with:
7772
path: web/website/public/
73+
74+
build-codemirror-demo:
75+
runs-on: ubuntu-latest
76+
77+
if: github.repository_owner == 'prql'
78+
79+
steps:
80+
- name: 📂 Checkout code
81+
uses: actions/checkout@v4
82+
- name: 🧅 Setup Bun
83+
uses: oven-sh/setup-bun@v1
84+
- name: Install CodeMirror demo dependencies
85+
working-directory: web/prql-codemirror-demo/
86+
run: bun install
87+
- name: Install Lezer dependencies
88+
working-directory: grammars/prql-lezer/
89+
run: bun install
90+
- name: Build Lezer grammar
91+
working-directory: grammars/prql-lezer/
92+
run: bun run build
93+
- name: Copy Lezer grammar into demo
94+
working-directory: web/prql-codemirror-demo/
95+
run: |
96+
mkdir src/lang-prql/prql-lezer
97+
cp ../../grammars/prql-lezer/dist/* src/lang-prql/prql-lezer/
98+
- name: Build CodeMirror demo
99+
working-directory: web/prql-codemirror-demo/
100+
run: bun run build

.github/workflows/lint-megalinter.yaml

+4-8
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,12 @@ env: # Comment env block if you do not want to apply fixes
1515
APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all)
1616
APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request)
1717

18-
concurrency:
19-
group: ${{ github.ref }}-${{ github.workflow }}
20-
cancel-in-progress: true
21-
2218
jobs:
2319
build:
2420
name: lint-megalinter
2521
runs-on: ubuntu-latest
2622
steps:
27-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2824
with:
2925
fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances
3026

@@ -33,7 +29,7 @@ jobs:
3329
id: ml
3430
# You can override MegaLinter flavor used to have faster performances
3531
# More info at https://megalinter.io/flavors/
36-
uses: oxsecurity/megalinter@v7.3.0
32+
uses: oxsecurity/megalinter@v7.4.0
3733
env:
3834
# All available variables are described in documentation
3935
# https://megalinter.io/configuration/
@@ -44,7 +40,7 @@ jobs:
4440

4541
# Upload MegaLinter artifacts
4642
- name: Archive production artifacts
47-
if: ${{ success() }} || ${{ failure() }}
43+
if: always()
4844
uses: actions/upload-artifact@v3
4945
with:
5046
name: MegaLinter reports
@@ -92,7 +88,7 @@ jobs:
9288
env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' &&
9389
(github.event_name == 'push' ||
9490
github.event.pull_request.head.repo.full_name == github.repository)
95-
uses: stefanzweifel/git-auto-commit-action@v4
91+
uses: stefanzweifel/git-auto-commit-action@v5
9692
with:
9793
branch:
9894
${{ github.event.pull_request.head.ref || github.head_ref ||

0 commit comments

Comments
 (0)