Skip to content

Commit a98ec88

Browse files
committed
Merged upstream/main into issue111-orientation-v2
2 parents 85be705 + 14f0c1e commit a98ec88

111 files changed

Lines changed: 9414 additions & 1087 deletions

File tree

Some content is hidden

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

.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[env]
2+
LIBSQLITE3_FLAGS = "-DSQLITE_ENABLE_MATH_FUNCTIONS"
3+
14
[target.wasm32-unknown-unknown]
25
rustflags = [
36
"-C", "link-args=-z stack-size=16777216",

.github/CODE_OF_CONDUCT.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at codeofconduct@posit.co.
63+
All complaints will be reviewed and investigated promptly and fairly.
64+
65+
All community leaders are obligated to respect the privacy and security of the
66+
reporter of any incident.
67+
68+
## Enforcement Guidelines
69+
70+
Community leaders will follow these Community Impact Guidelines in determining
71+
the consequences for any action they deem in violation of this Code of Conduct:
72+
73+
### 1. Correction
74+
75+
**Community Impact**: Use of inappropriate language or other behavior deemed
76+
unprofessional or unwelcome in the community.
77+
78+
**Consequence**: A private, written warning from community leaders, providing
79+
clarity around the nature of the violation and an explanation of why the
80+
behavior was inappropriate. A public apology may be requested.
81+
82+
### 2. Warning
83+
84+
**Community Impact**: A violation through a single incident or series of
85+
actions.
86+
87+
**Consequence**: A warning with consequences for continued behavior. No
88+
interaction with the people involved, including unsolicited interaction with
89+
those enforcing the Code of Conduct, for a specified period of time. This
90+
includes avoiding interactions in community spaces as well as external channels
91+
like social media. Violating these terms may lead to a temporary or permanent
92+
ban.
93+
94+
### 3. Temporary Ban
95+
96+
**Community Impact**: A serious violation of community standards, including
97+
sustained inappropriate behavior.
98+
99+
**Consequence**: A temporary ban from any sort of interaction or public
100+
communication with the community for a specified period of time. No public or
101+
private interaction with the people involved, including unsolicited interaction
102+
with those enforcing the Code of Conduct, is allowed during this period.
103+
Violating these terms may lead to a permanent ban.
104+
105+
### 4. Permanent Ban
106+
107+
**Community Impact**: Demonstrating a pattern of violation of community
108+
standards, including sustained inappropriate behavior, harassment of an
109+
individual, or aggression toward or disparagement of classes of individuals.
110+
111+
**Consequence**: A permanent ban from any sort of public interaction within the
112+
community.
113+
114+
## Attribution
115+
116+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117+
version 2.1, available at
118+
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
119+
120+
Community Impact Guidelines were inspired by
121+
[Mozilla's code of conduct enforcement ladder][https://github.com/mozilla/inclusion].
122+
123+
For answers to common questions about this code of conduct, see the FAQ at
124+
<https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.
125+
126+
[homepage]: https://www.contributor-covenant.org

.github/workflows/publish.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11+
build-wasm:
12+
uses: ./.github/workflows/wasm.yaml
13+
1114
publish-website:
15+
needs: build-wasm
1216
runs-on: ubuntu-latest
1317
permissions:
1418
contents: write
@@ -22,10 +26,16 @@ jobs:
2226
sudo docker image prune --all --force
2327
sudo docker builder prune -a
2428
29+
- name: Download WASM demo artifact
30+
uses: actions/download-artifact@v4
31+
with:
32+
name: wasm-demo
33+
path: doc/wasm
34+
2535
- name: Setup Node.js
2636
uses: actions/setup-node@v4
2737
with:
28-
node-version: '20'
38+
node-version: "20"
2939

3040
- name: Install tree-sitter-cli
3141
run: npm install -g tree-sitter-cli
@@ -41,6 +51,8 @@ jobs:
4151

4252
- name: Setup quarto
4353
uses: quarto-dev/quarto-actions/setup@v2
54+
with:
55+
version: pre-release
4456

4557
- name: Setup Jupyter
4658
run: python3 -m pip install jupyter jupyterlab
Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
name: Jupyter Kernel Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
generate:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: "20"
21+
22+
- name: Install tree-sitter-cli
23+
run: npm install -g tree-sitter-cli
24+
25+
- name: Generate parser
26+
working-directory: tree-sitter-ggsql
27+
run: tree-sitter generate
28+
29+
- uses: actions/upload-artifact@v4
30+
with:
31+
name: tree-sitter-generated
32+
path: tree-sitter-ggsql/src/
33+
34+
linux:
35+
needs: generate
36+
runs-on: ubuntu-latest
37+
strategy:
38+
matrix:
39+
target: [x86_64, aarch64]
40+
env:
41+
GGSQL_SKIP_GENERATE: "1"
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- uses: actions/download-artifact@v4
46+
with:
47+
name: tree-sitter-generated
48+
path: tree-sitter-ggsql/src/
49+
50+
- name: Build wheels
51+
uses: PyO3/maturin-action@v1
52+
with:
53+
target: ${{ matrix.target }}
54+
args: --release --out dist
55+
working-directory: ggsql-jupyter
56+
manylinux: 2_28
57+
docker-options: -e GGSQL_SKIP_GENERATE=1
58+
59+
- uses: actions/upload-artifact@v4
60+
with:
61+
name: jupyter-wheels-linux-${{ matrix.target }}
62+
path: ggsql-jupyter/dist
63+
64+
macos:
65+
needs: generate
66+
runs-on: ${{ matrix.runner }}
67+
strategy:
68+
matrix:
69+
include:
70+
- target: x86_64
71+
runner: macos-latest
72+
- target: aarch64
73+
runner: macos-latest
74+
env:
75+
GGSQL_SKIP_GENERATE: "1"
76+
steps:
77+
- uses: actions/checkout@v4
78+
79+
- uses: actions/download-artifact@v4
80+
with:
81+
name: tree-sitter-generated
82+
path: tree-sitter-ggsql/src/
83+
84+
- name: Build wheels
85+
uses: PyO3/maturin-action@v1
86+
with:
87+
target: ${{ matrix.target }}
88+
args: --release --out dist
89+
working-directory: ggsql-jupyter
90+
91+
- uses: actions/upload-artifact@v4
92+
with:
93+
name: jupyter-wheels-macos-${{ matrix.target }}
94+
path: ggsql-jupyter/dist
95+
96+
windows:
97+
needs: generate
98+
runs-on: windows-latest
99+
env:
100+
GGSQL_SKIP_GENERATE: "1"
101+
steps:
102+
- uses: actions/checkout@v4
103+
104+
- uses: actions/download-artifact@v4
105+
with:
106+
name: tree-sitter-generated
107+
path: tree-sitter-ggsql/src/
108+
109+
- name: Build wheels
110+
uses: PyO3/maturin-action@v1
111+
with:
112+
target: x64
113+
args: --release --out dist
114+
working-directory: ggsql-jupyter
115+
116+
- uses: actions/upload-artifact@v4
117+
with:
118+
name: jupyter-wheels-windows-x64
119+
path: ggsql-jupyter/dist
120+
121+
sdist:
122+
needs: generate
123+
runs-on: ubuntu-latest
124+
env:
125+
GGSQL_SKIP_GENERATE: "1"
126+
steps:
127+
- uses: actions/checkout@v4
128+
129+
- uses: actions/download-artifact@v4
130+
with:
131+
name: tree-sitter-generated
132+
path: tree-sitter-ggsql/src/
133+
134+
- name: Build sdist
135+
uses: PyO3/maturin-action@v1
136+
with:
137+
command: sdist
138+
args: --out dist
139+
working-directory: ggsql-jupyter
140+
141+
- uses: actions/upload-artifact@v4
142+
with:
143+
name: jupyter-wheels-sdist
144+
path: ggsql-jupyter/dist
145+
146+
publish:
147+
needs: [linux, macos, windows, sdist]
148+
runs-on: ubuntu-latest
149+
if: startsWith(github.ref, 'refs/tags/')
150+
environment: pypi-jupyter
151+
permissions:
152+
id-token: write
153+
steps:
154+
- uses: actions/download-artifact@v4
155+
with:
156+
pattern: jupyter-wheels-*
157+
merge-multiple: true
158+
path: dist
159+
160+
- name: List wheels
161+
run: ls -lh dist/
162+
163+
- name: Publish to PyPI
164+
uses: pypa/gh-action-pypi-publish@release/v1
165+
166+
github-release:
167+
needs: [linux, macos, windows]
168+
runs-on: ubuntu-latest
169+
if: startsWith(github.ref, 'refs/tags/')
170+
permissions:
171+
contents: write
172+
steps:
173+
- uses: actions/download-artifact@v4
174+
with:
175+
pattern: jupyter-wheels-*
176+
path: artifacts
177+
178+
- name: Extract binaries from wheels
179+
run: |
180+
mkdir -p binaries
181+
182+
# Linux x86_64
183+
unzip -j artifacts/jupyter-wheels-linux-x86_64/*manylinux*x86_64*.whl \
184+
"*.data/scripts/ggsql-jupyter" -d /tmp/extract
185+
mv /tmp/extract/ggsql-jupyter binaries/ggsql-jupyter-linux-x64
186+
rm -rf /tmp/extract
187+
188+
# Linux aarch64
189+
unzip -j artifacts/jupyter-wheels-linux-aarch64/*manylinux*aarch64*.whl \
190+
"*.data/scripts/ggsql-jupyter" -d /tmp/extract
191+
mv /tmp/extract/ggsql-jupyter binaries/ggsql-jupyter-linux-arm64
192+
rm -rf /tmp/extract
193+
194+
# macOS x86_64
195+
unzip -j artifacts/jupyter-wheels-macos-x86_64/*macosx*x86_64*.whl \
196+
"*.data/scripts/ggsql-jupyter" -d /tmp/extract
197+
mv /tmp/extract/ggsql-jupyter binaries/ggsql-jupyter-macos-x64
198+
rm -rf /tmp/extract
199+
200+
# macOS aarch64
201+
unzip -j artifacts/jupyter-wheels-macos-aarch64/*macosx*arm64*.whl \
202+
"*.data/scripts/ggsql-jupyter" -d /tmp/extract
203+
mv /tmp/extract/ggsql-jupyter binaries/ggsql-jupyter-macos-arm64
204+
rm -rf /tmp/extract
205+
206+
# Windows x64
207+
unzip -j artifacts/jupyter-wheels-windows-x64/*win_amd64*.whl \
208+
"*.data/scripts/ggsql-jupyter.exe" -d /tmp/extract
209+
mv /tmp/extract/ggsql-jupyter.exe binaries/ggsql-jupyter-windows-x64.exe
210+
rm -rf /tmp/extract
211+
212+
chmod +x binaries/ggsql-jupyter-*
213+
ls -lh binaries/
214+
215+
- name: Upload to GitHub Release
216+
uses: softprops/action-gh-release@v2
217+
with:
218+
files: binaries/*

0 commit comments

Comments
 (0)