Skip to content

Commit a9d81a4

Browse files
authored
refactor: reorganize dirs (#3683)
1 parent 5c57696 commit a9d81a4

File tree

343 files changed

+454
-433
lines changed

Some content is hidden

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

343 files changed

+454
-433
lines changed
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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.",
7-
"pattern": "^(?!https://github\\.com/(PRQL|prql)|https://prql-lang\\.org|https://raw\\.githubusercontent\\.com/(PRQL|prql)|[./]+|file://).*$"
7+
"pattern": "^(?!https://prql-lang\\.org|https://raw\\.githubusercontent\\.com/(PRQL|prql)|[./]+|file://).*$"
88
}
99
]
1010
}

.config/vscode-recommended/settings.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"**/Thumbs.db": true,
1313
"web/book/book": true,
1414
"web/build": true,
15-
".direnv": true
15+
".direnv": true,
16+
".pytest_cache": true,
17+
".mypy_cache": true
1618
}
1719
}

.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:

.github/actions/build-prql-python/action.yaml

+7-5
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,28 @@ runs:
1515
if: inputs.target == 'source'
1616
with:
1717
command: sdist
18-
args: -o dist -m bindings/prql-python/Cargo.toml
18+
args: -o target/python -m prqlc/bindings/python/Cargo.toml
1919
- uses: messense/maturin-action@v1
2020
if: runner.os == 'Linux' && inputs.target != 'source'
2121
with:
2222
target: ${{ inputs.target }}
2323
manylinux: auto
2424
command: build
25-
args: --release -o dist -m bindings/prql-python/Cargo.toml
25+
args: --release -o target/python -m prqlc/bindings/python/Cargo.toml
2626
- uses: messense/maturin-action@v1
2727
if: runner.os == 'Windows' && inputs.target != 'source'
2828
with:
2929
command: build
30-
args: --release -o dist -m bindings/prql-python/Cargo.toml
30+
args: --release -o target/python -m prqlc/bindings/python/Cargo.toml
3131
- uses: messense/maturin-action@v1
3232
if: runner.os == 'macOS' && inputs.target != 'source'
3333
with:
3434
command: build
35-
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
3638
- name: Upload wheels
3739
uses: actions/upload-artifact@v3
3840
with:
3941
name: wheels
40-
path: dist
42+
path: target/python

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -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/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/release.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
- name: 📂 Checkout code
8787
uses: actions/checkout@v4
8888
- name: 👷 Build prql-compiler
89-
run: cargo build --release
89+
run: cargo build --release -p prqlc
9090
- name: Copy files into .deb package
9191
run: |
9292
mkdir -p .debpkg/usr/bin
@@ -143,7 +143,7 @@ jobs:
143143
- name: 📂 Checkout code
144144
uses: actions/checkout@v4
145145
- name: Move Snap to project root directory
146-
run: cp -r packages/snap/ .
146+
run: cp -r prqlc/packages/snap/ .
147147
- name: 📦 Build Snap
148148
id: build
149149
uses: snapcore/action-build@v1
@@ -211,7 +211,7 @@ jobs:
211211
- run:
212212
npm publish ${{ (github.event_name != 'release') && '--dry-run' || ''
213213
}}
214-
working-directory: bindings/prql-js/
214+
working-directory: prqlc/bindings/js/
215215
env:
216216
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
217217

@@ -223,12 +223,12 @@ jobs:
223223
- uses: baptiste0928/cargo-install@v2
224224
with:
225225
crate: cargo-release
226-
# Currently, we can only check prql-ast which is not dependent other local crates with --dry-run.
226+
# Currently, we can only check prqlc-ast which is not dependent other local crates with --dry-run.
227227
# https://github.com/crate-ci/cargo-release/issues/691
228228
# --no-verify is required to prevent build.
229229
- run:
230230
cargo release publish --no-confirm ${{ github.event_name == 'release'
231-
&& '--execute' || '--no-verify --package prql-ast'}}
231+
&& '--execute' || '--no-verify --package prqlc-ast'}}
232232
env:
233233
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
234234

.github/workflows/test-clib.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: test-clib
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
7+
jobs:
8+
test-clib:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: 📂 Checkout code
12+
uses: actions/checkout@v4
13+
- run: ./.github/workflows/scripts/set_version.sh
14+
- name: 💰 Cache
15+
uses: Swatinem/rust-cache@v2
16+
with:
17+
prefix-key: ${{ env.version }}
18+
save-if: ${{ github.ref == 'refs/heads/main' }}
19+
shared-key: lib
20+
- name: Build
21+
uses: richb-hanover/[email protected]
22+
with:
23+
command: build
24+
# Currently requires a release build; would be useful to allow a debug build.
25+
args: --release --package prqlc-clib
26+
- name: Run example minimal-c
27+
working-directory: prqlc/bindings/clib/examples/minimal-c
28+
run: make run
29+
- name: Run example minimal-cpp
30+
working-directory: prqlc/bindings/clib/examples/minimal-cpp
31+
run: make run
32+
33+
- name: 🔧 Setup Zig
34+
uses: goto-bus-stop/setup-zig@v2
35+
with:
36+
cache: false
37+
- name: Run example minimal-zig
38+
working-directory: prqlc/bindings/clib/examples/minimal-zig
39+
run: make run test

.github/workflows/test-dotnet.yaml

+7-8
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,16 @@ jobs:
1010
steps:
1111
- name: 📂 Checkout code
1212
uses: actions/checkout@v4
13-
- name: 🏗 Build prql-lib
14-
run: cargo build
15-
working-directory: bindings/prql-lib
13+
- name: 🏗 Build prqlc-clib
14+
run: cargo build --package prqlc-clib
1615
- name: 🔧 Setup dotnet
1716
uses: actions/setup-dotnet@v3
1817
with:
1918
dotnet-version: 7
2019
- name: 🧪 Build and test
21-
working-directory: bindings
20+
working-directory: prqlc/bindings
2221
run: |
23-
dotnet build prql-dotnet
24-
cp ../target/debug/libprql_lib.* prql-dotnet/PrqlCompiler/bin/Debug/net*/
25-
cp ../target/debug/libprql_lib.* prql-dotnet/PrqlCompiler.Tests/bin/Debug/net*/
26-
dotnet test prql-dotnet
22+
dotnet build dotnet
23+
cp ../../target/debug/libprqlc.* dotnet/PrqlCompiler/bin/Debug/net*/
24+
cp ../../target/debug/libprqlc.* dotnet/PrqlCompiler.Tests/bin/Debug/net*/
25+
dotnet test dotnet

.github/workflows/test-elixir.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
defaults:
1616
run:
17-
working-directory: bindings/prql-elixir
17+
working-directory: prqlc/bindings/elixir
1818

1919
env:
2020
MIX_ENV: test
@@ -53,7 +53,7 @@ jobs:
5353
env:
5454
cache-name: cache-elixir-deps
5555
with:
56-
path: prql-elixir/deps
56+
path: elixir/deps
5757
key:
5858
${{ runner.os }}-mix-${{ env.cache-name }}-${{
5959
hashFiles('**/mix.lock') }}
@@ -69,7 +69,7 @@ jobs:
6969
env:
7070
cache-name: cache-compiled-build
7171
with:
72-
path: prql-elixir/_build
72+
path: elixir/_build
7373
key:
7474
${{ runner.os }}-mix-${{ env.cache-name }}-${{
7575
hashFiles('**/mix.lock') }}

.github/workflows/test-java.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ jobs:
2929
save-if: ${{ github.ref == 'refs/heads/main' }}
3030
shared-key: lib
3131
- name: Maven test
32-
working-directory: bindings/prql-java/java/
32+
working-directory: prqlc/bindings/java/java/
3333
run: ./mvnw test

.github/workflows/test-js.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ jobs:
5353
save-if: false
5454

5555
- run: npm cit
56-
working-directory: bindings/prql-js
56+
working-directory: prqlc/bindings/js

.github/workflows/test-lib.yaml

-60
This file was deleted.

.github/workflows/test-python.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/download-artifact@v3
2929
with:
3030
name: wheels
31-
path: dist
31+
path: target/python
3232
- uses: actions/setup-python@v4
3333
with:
3434
python-version: "3.7"
@@ -47,4 +47,4 @@ jobs:
4747
hashFiles('prql-python/requirements.txt') }}
4848
- name: Run tests and typing
4949
shell: bash
50-
run: nox -s tests typing -f bindings/prql-python/noxfile.py
50+
run: nox -s tests typing -f prqlc/bindings/python/noxfile.py

.github/workflows/test-rust.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
steps.cache.outputs.cache-hit == 'false' }}
7979
- name: Run docker compose
8080
run: docker compose up -d
81-
working-directory: ./crates/prql-compiler/tests/integration
81+
working-directory: ./prqlc/prql-compiler/tests/integration
8282
if: ${{ contains(inputs.features, 'test-dbs-external') }}
8383
- name: Wait for database
8484
uses: ifaxity/[email protected]

0 commit comments

Comments
 (0)