Skip to content

Commit e08fcf4

Browse files
committed
Consolidate the Rust and Sqllogictest tests
1 parent 2405243 commit e08fcf4

File tree

7 files changed

+25
-21
lines changed

7 files changed

+25
-21
lines changed

.github/workflows/lints.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run Linters
1+
name: Run Rust Linters
22

33
on:
44
workflow_dispatch:
@@ -10,7 +10,7 @@ permissions:
1010
contents: read
1111

1212
jobs:
13-
lint:
13+
lints:
1414
runs-on: ubuntu-latest
1515

1616
steps:

.github/workflows/tests.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ on:
55
pull_request:
66
branches:
77
- main
8+
push:
9+
branches:
10+
- main
811

912
permissions:
1013
contents: read
1114

1215
jobs:
13-
test:
16+
tests:
1417
runs-on: ubuntu-latest
1518

1619
steps:
@@ -28,7 +31,12 @@ jobs:
2831
sudo apt-get install -y gcc curl pkg-config libssl-dev make
2932
cargo install cargo-tarpaulin
3033
31-
- name: Run Tests and Generate Coverage Report
34+
- name: Build Infera and Run Sqllogictest Tests
35+
run: |
36+
make release
37+
make test
38+
39+
- name: Run Rust Tests and Generate Coverage Report for Rust Code
3240
run: make rust-coverage # Generates a coverage report for Infera crate
3341

3442
- name: Upload Coverage Reports to Codecov

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<h2>Infera</h2>
88

99
[![Tests](https://img.shields.io/github/actions/workflow/status/CogitatorTech/infera/tests.yml?label=tests&style=flat&labelColor=282c34&logo=github)](https://github.com/CogitatorTech/infera/actions/workflows/tests.yml)
10-
[![Code Coverage](https://img.shields.io/codecov/c/github/CogitatorTech/infera?label=coverage&style=flat&labelColor=282c34&logo=codecov)](https://codecov.io/gh/CogitatorTech/infera)
1110
[![Code Quality](https://img.shields.io/codefactor/grade/github/CogitatorTech/infera?label=quality&style=flat&labelColor=282c34&logo=codefactor)](https://www.codefactor.io/repository/github/CogitatorTech/infera)
1211
[![Examples](https://img.shields.io/badge/examples-view-green?style=flat&labelColor=282c34&logo=github)](https://github.com/CogitatorTech/infera/tree/main/docs/examples)
1312
[![Docs](https://img.shields.io/badge/docs-view-blue?style=flat&labelColor=282c34&logo=read-the-docs)](https://github.com/CogitatorTech/infera/tree/main/docs)

docs/examples/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1-
# Infera Examples
1+
## Examples
22

33
This directory contains DuckDB SQL scripts that show usage patterns of the Infera extension.
44
Each file is self‑contained and can be executed in the DuckDB shell (or via `duckdb < file.sql`).
55

6-
## Prerequisites
6+
Table below include the list of examples and the functionalities they cover.
7+
8+
| File | Topic | Functionalities |
9+
|---------------------------------|--------------------------------------|-----------------------------------------------------------------------------------------------------------|
10+
| `e1_core_functionality.sql` | Core lifecycle | Version, load, inspect model info, single prediction, unload, autoload directory reuse |
11+
| `e2_advanced_features.sql` | Remote and BLOB inference | Remote model load (GitHub), large vision model, constructing a zero‑filled BLOB for inference |
12+
| `e3_integration_and_errors.sql` | Integration patterns and errors | Deterministic batch table, aggregation, null feature detection, missing model handling |
13+
| `e4_multi_output.sql` | Multi‑output models | Uses `multi_output.onnx`, shows `infera_predict_multi` vs (commented) single‑output mismatch |
14+
| `e5_autoload_and_json.sql` | Autoload and lightweight JSON checks | Error JSON from missing dir, loading multiple models via directory scan, simple substring presence checks |
15+
| `e6_blob_diagnostics.sql` | BLOB diagnostics | Shows correct BLOB sizing for mobilenet; commented invalid case to illustrate error path |
16+
17+
### Prerequisites
718

819
1. Build the extension:
920
```bash
@@ -18,17 +29,6 @@ Each file is self‑contained and can be executed in the DuckDB shell (or via `d
1829
.read docs/examples/e1_core_functionality.sql
1930
```
2031

21-
## Example Index
22-
23-
| File | Topic | Functionalities |
24-
|---------------------------------|--------------------------------------|-----------------------------------------------------------------------------------------------------------|
25-
| `e1_core_functionality.sql` | Core lifecycle | Version, load, inspect model info, single prediction, unload, autoload directory reuse |
26-
| `e2_advanced_features.sql` | Remote and BLOB inference | Remote model load (GitHub), large vision model, constructing a zero‑filled BLOB for inference |
27-
| `e3_integration_and_errors.sql` | Integration patterns and errors | Deterministic batch table, aggregation, null feature detection, missing model handling |
28-
| `e4_multi_output.sql` | Multi‑output models | Uses `multi_output.onnx`, shows `infera_predict_multi` vs (commented) single‑output mismatch |
29-
| `e5_autoload_and_json.sql` | Autoload and lightweight JSON checks | Error JSON from missing dir, loading multiple models via directory scan, simple substring presence checks |
30-
| `e6_blob_diagnostics.sql` | BLOB diagnostics | Shows correct BLOB sizing for mobilenet; commented invalid case to illustrate error path |
31-
3232
## Running All Examples
3333

3434
```bash

docs/examples/e4_multi_output.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ select '## predict (single-output API) will raise mismatch error if executed';
1919
select '## cleanup';
2020
select infera_unload_model('multi_output') as unloaded_multi;
2121
.echo off
22-

docs/examples/e5_autoload_and_json.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ select '## cleanup';
1919
select infera_unload_model('linear') as unload_linear;
2020
select infera_unload_model('multi_output') as unload_multi_output;
2121
.echo off
22-

docs/examples/e6_blob_diagnostics.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@ select len(infera_predict_from_blob('mobilenet', zero_blob)) as output_len from
2121
select '## cleanup';
2222
select infera_unload_model('mobilenet') as mobilenet_unloaded;
2323
.echo off
24-

0 commit comments

Comments
 (0)