Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Release Installers
name: Release Cargo and Installer Packages

on:
push:
tags:
- 'v*' # Trigger on version tags (e.g., v0.1.0)
workflow_dispatch: # Allow manual triggering
- "v*" # Trigger on version tags (e.g., v0.1.0)
workflow_dispatch: # Allow manual triggering

env:
CARGO_TERM_COLOR: always
Expand All @@ -21,7 +21,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: "20"

- name: Install tree-sitter-cli
run: npm install -g tree-sitter-cli
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: "20"

- name: Install tree-sitter-cli
run: npm install -g tree-sitter-cli
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: "20"

- name: Install tree-sitter-cli
run: npm install -g tree-sitter-cli
Expand Down Expand Up @@ -167,9 +167,61 @@ jobs:
path: src/target/release/packager/*.deb
retention-days: 30

build-cargo:
name: Publish to crates.io
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install tree-sitter-cli
run: npm install -g tree-sitter-cli

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: cargo-publish

- name: Get crates.io publish token
uses: rust-lang/crates-io-auth-action@v1
id: auth

- name: Publish tree-sitter-ggsql
run: cargo publish --package tree-sitter-ggsql
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

- name: Wait for crates.io index update
run: sleep 30

- name: Publish ggsql
run: cargo publish --package ggsql
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

- name: Wait for crates.io index update
run: sleep 30

- name: Publish ggsql-jupyter
run: cargo publish --package ggsql-jupyter
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

create-release:
name: Create GitHub Release
needs: [build-windows, build-macos, build-linux]
needs: [build-windows, build-macos, build-linux, build-cargo]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ docs/_build/
*.db
*.sqlite
*.sqlite3
!data/*.parquet
!src/data/*.parquet

# Configuration files
.env
Expand Down
12 changes: 8 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@ version = "0.1.0"
edition = "2021"
authors = ["ggsql Team"]
license = "MIT"
repository = "https://github.com/georgestagg/ggsql"
homepage = "https://github.com/georgestagg/ggsql"
description = "SQL extension for declarative data visualization"
repository = "https://github.com/posit-dev/ggsql"
homepage = "https://ggsql.org"
description = "A declarative visualization language that extends SQL with powerful data visualization capabilities."

[workspace.dependencies]
# workspace packages
tree-sitter-ggsql = { path = "tree-sitter-ggsql", version = "0.1.0" }
ggsql = { path = "src", version = "0.1.0" }

# Parsing
tree-sitter = "0.26"
csscolorparser = "0.8.1"
tree-sitter = "0.26"

# Data processing
polars = { version = "0.52", default-features = false }
Expand Down
4 changes: 3 additions & 1 deletion ggsql-jupyter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "Jupyter kernel for ggsql"

[[bin]]
Expand All @@ -16,7 +18,7 @@ path = "src/lib.rs"

[dependencies]
# Core ggsql library
ggsql = { path = "../src", features = ["duckdb", "vegalite"] }
ggsql = { workspace = true, features = ["duckdb", "vegalite"] }

# Need polars for DataFrame type
polars = { workspace = true }
Expand Down
27 changes: 18 additions & 9 deletions ggsql-jupyter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,26 @@ ggsql-jupyter --install

The `--install` flag registers the kernel with Jupyter. It automatically detects and respects your current environment (virtualenv, conda, uv, etc.).

### Option 2: Download Pre-built Binary
### Option 2: Install from crates.io

Requires a [Rust toolchain](https://rustup.rs/):

```bash
cargo install ggsql-jupyter
ggsql-jupyter --install
```

### Option 3: Download Pre-built Binary

Pre-built binaries are available from [GitHub Releases](https://github.com/georgestagg/ggsql/releases):

| Platform | Binary |
| -------------------- | ---------------------------------- |
| Linux (x86_64) | `ggsql-jupyter-linux-x64` |
| Linux (ARM64) | `ggsql-jupyter-linux-arm64` |
| macOS (Intel) | `ggsql-jupyter-macos-x64` |
| macOS (Apple Silicon) | `ggsql-jupyter-macos-arm64` |
| Windows (x64) | `ggsql-jupyter-windows-x64.exe` |
| Platform | Binary |
| --------------------- | ------------------------------- |
| Linux (x86_64) | `ggsql-jupyter-linux-x64` |
| Linux (ARM64) | `ggsql-jupyter-linux-arm64` |
| macOS (Intel) | `ggsql-jupyter-macos-x64` |
| macOS (Apple Silicon) | `ggsql-jupyter-macos-arm64` |
| Windows (x64) | `ggsql-jupyter-windows-x64.exe` |

After downloading, make it executable and install:

Expand All @@ -65,7 +74,7 @@ On Windows (PowerShell):
.\ggsql-jupyter-windows-x64.exe --install
```

### Option 3: Build from Source
### Option 4: Build from Source

Requires a [Rust toolchain](https://rustup.rs/). From the workspace root:

Expand Down
5 changes: 4 additions & 1 deletion ggsql-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
name = "ggsql-python"
version = "0.1.0"
edition = "2021"
license = "MIT"
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "Python bindings for ggsql"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion ggsql-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description.workspace = true
description = "WebAssembly bindings for ggsql."

[lib]
crate-type = ["cdylib"]
Expand Down
2 changes: 1 addition & 1 deletion src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ required-features = ["rest-api"]
[dependencies]
# Parsing
tree-sitter.workspace = true
tree-sitter-ggsql = { path = "../tree-sitter-ggsql" }
tree-sitter-ggsql = { workspace = true }
csscolorparser.workspace = true

# Color interpolation
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/reader/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ use crate::{naming, GgsqlError};
#[cfg(feature = "builtin-data")]
static PENGUINS: &[u8] = include_bytes!(concat!(
env!("CARGO_MANIFEST_DIR"),
"/../data/penguins.parquet"
"/data/penguins.parquet"
));

#[cfg(feature = "builtin-data")]
static AIRQUALITY: &[u8] = include_bytes!(concat!(
env!("CARGO_MANIFEST_DIR"),
"/../data/airquality.parquet"
"/data/airquality.parquet"
));

/// Get the embedded parquet bytes for a known builtin dataset.
Expand Down
11 changes: 11 additions & 0 deletions tree-sitter-ggsql/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading