Skip to content

Initial set of commits #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 284 commits into from
May 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
284 commits
Select commit Hold shift + click to select a range
349cb6a
Type cleanups (#27)
jacques-n Sep 16, 2021
8a5ecc3
run protoc for PRs (#38)
rymurr Sep 17, 2021
ee6173f
Use markdown extension to embed protobuf IDL in docs (#36)
Sep 19, 2021
5ee76af
Minor protobuf fixes (#37)
jacques-n Sep 22, 2021
8b77f68
Add common ignore paths (#39)
jacques-n Sep 22, 2021
54afa69
Updates for simple output type expressions. (#40)
jacques-n Oct 2, 2021
4c503f8
Fix some links and typos (#48)
mbrobbel Oct 4, 2021
69b1ceb
Updates to ideally support majority of tpch queries (#46)
jacques-n Oct 5, 2021
6a4ba2d
Proposed updates to support required and optional enumerations. (#49)
jacques-n Oct 12, 2021
d6dd619
Add arguments to WindowFunction message (#52)
cpcloud Oct 18, 2021
1ad1084
Add Unbounded variant to window frame bounds (#53)
cpcloud Oct 18, 2021
88d4966
Add List literal message type (#55)
cpcloud Oct 18, 2021
e5ee891
Update community.md
jacques-n Oct 20, 2021
5b58a85
Update index.md
jacques-n Oct 20, 2021
738bcd8
Fix, format and check yaml in CI (#57)
cpcloud Oct 22, 2021
b7e17e0
Update csharp namespace (#66)
westonpace Oct 30, 2021
789dab2
Add missing JoinRel type (#68)
hannes Nov 3, 2021
b41cf75
Rename sort type as sort direction (#67)
westonpace Nov 7, 2021
6ffb156
Update functions to flatter format. (#70)
jacques-n Nov 10, 2021
b2701ab
Fix Docs link on the community page (#72)
mbrobbel Nov 13, 2021
7739632
Add SEMI and ANTI Join types (#75)
hannes Nov 20, 2021
80f03fe
Update slack link (#81)
jacques-n Nov 21, 2021
b1167bc
Add NamedRel (#82)
cpcloud Nov 21, 2021
f6d4ad5
Add Schema for YAML extensions (#79)
jacques-n Nov 21, 2021
4a731ea
Add precision and scale to decimal literal, clarify meaning of bytes …
cpcloud Nov 22, 2021
ff2bf12
Clarify/solidify extensions (#80)
jacques-n Nov 25, 2021
75eda82
Format protobufs with clang-format and check in CI (#83)
cpcloud Nov 25, 2021
224e384
Minor expression cleanups (#88)
jacques-n Nov 25, 2021
48f2ed7
Add type field to list and map literal expressions (#96)
cpcloud Nov 29, 2021
f878f3e
Deduplicate Switch/If expressions according to the intended use case …
cpcloud Nov 29, 2021
af71e7e
Introduce Capabilities message type (#87)
jacques-n Nov 29, 2021
43ebd03
Move NamedStruct out of the Type message (#95)
cpcloud Nov 29, 2021
81fb45d
Document date/time/timestamp literal units and move to int64/micros s…
cpcloud Nov 29, 2021
77b8f4f
Field Reference enhancements (#99)
jacques-n Nov 29, 2021
94fbff7
Support grouping expressions in aggregate as opposed to only field in…
jacques-n Dec 1, 2021
336ae9d
Move to buf and address buf lints; add ci checks with buf (#103)
cpcloud Dec 5, 2021
147a9c8
refactor: change field name for List value type (#104)
gforsyth Dec 6, 2021
b77fcd2
Propose alternative for empty map/list literals to reduce comment rel…
jacques-n Dec 6, 2021
6c74ae5
Add partition info to ReadRel (#102)
rui-mo Dec 6, 2021
9ec33ab
Name _reference fields consistently (#107)
bkietz Dec 7, 2021
fe44bd2
type_variation.functions doc -> consistent w/yaml (#108)
bkietz Dec 8, 2021
27140d2
Enforce editorconfig settings in CI (#112)
cpcloud Dec 9, 2021
1ea65e8
Update date type literal to be in days (#106)
bkietz Dec 14, 2021
26b36b3
Update invite link to one that doesn't expire (#117)
jacques-n Dec 22, 2021
7b5613b
Add missing words (#118)
thisisnic Dec 30, 2021
fe0d49b
Fix typo in github actions workflow (#130)
jvanstraten Jan 24, 2022
e82c121
Add CrossProduct Relation and Single-join type (#132)
pdet Feb 1, 2022
d352978
ci: proto-format-check CI job not working (#135)
jvanstraten Feb 5, 2022
292d6ce
refactor: combine relations and expressions into algebra.proto (#136)
cpcloud Feb 5, 2022
240cac1
feat: add subquery representation (#134)
cpcloud Feb 6, 2022
fa6ccae
Added a section explaining how slicing reads are handled (#109)
westonpace Feb 7, 2022
4da059c
Initial commit for validator
jvanstraten Feb 4, 2022
a420d5d
Apply suggestions from code review
jvanstraten Feb 4, 2022
be6b913
Remove section from pre-commit that doesn't work (yet)
jvanstraten Feb 4, 2022
0472db5
Update validator/build.rs
jvanstraten Feb 4, 2022
5c28b5d
Create some initial versions of some helper types for the validator
jvanstraten Feb 4, 2022
fe9bdeb
WIP; add a bunch more helper types and some basic data type stuff
jvanstraten Feb 7, 2022
42b71dc
WIP
jvanstraten Feb 10, 2022
2b110b1
Add some test for derived protobuf metadata
jvanstraten Feb 10, 2022
43c722f
WIP
jvanstraten Feb 14, 2022
95f3d93
WIP
jvanstraten Feb 15, 2022
a275c03
WIP
jvanstraten Feb 15, 2022
0e174da
WIP refactoring context
jvanstraten Feb 15, 2022
e7d0f81
WIP
jvanstraten Feb 15, 2022
0b1ef13
The first tree traversal is a fact
jvanstraten Feb 15, 2022
ed7d527
WIP, doesn't compile
jvanstraten Feb 16, 2022
66c3212
WIP: working again
jvanstraten Feb 16, 2022
11a3638
WIP: finish all anchor definition logic
jvanstraten Feb 16, 2022
3316f3c
Reorganize validation code
jvanstraten Feb 18, 2022
0d5ec68
Initial version for HTML output
jvanstraten Feb 18, 2022
20daf2c
Add protobuf-based output format
jvanstraten Feb 21, 2022
0fff810
Some cleanup
jvanstraten Feb 21, 2022
507432a
Add C interface
jvanstraten Feb 21, 2022
dcc01c4
Updates to HTML output, and cleanup in general
jvanstraten Feb 22, 2022
c02e6f7
Add python bindings, and more cleanup
jvanstraten Feb 22, 2022
55deb75
Add CMake support for C bindings and add test
jvanstraten Feb 22, 2022
1f5d1a3
clang-format protobuf and validator C test file
jvanstraten Feb 22, 2022
c7e68b0
Fix protobuf lint violations
jvanstraten Feb 22, 2022
7d93d6d
Preparing to add YAML resolution and parsing logic
jvanstraten Feb 23, 2022
1401458
Add YAML loading capabilities
jvanstraten Feb 23, 2022
dd3b0b2
Downgrade (and pin) Corrosion version
jvanstraten Feb 23, 2022
29bcd0d
Remove static linking option for validator C bindings
jvanstraten Feb 23, 2022
feeb097
Remove files that shouldn't have been checked in
jvanstraten Feb 23, 2022
be65c46
WIP improving Python API
jvanstraten Feb 23, 2022
0a8956e
Restructure, WIP on CI again
jvanstraten Feb 23, 2022
272f165
Test CI again
jvanstraten Feb 24, 2022
dc40001
Remove reliance on Python protobuf-gen
jvanstraten Feb 24, 2022
cdc4851
Canonicalize more paths to try to get Windows CI to work
jvanstraten Feb 24, 2022
f0126b2
Test CI
jvanstraten Feb 24, 2022
e5c7e07
Remove dependency on libcurl
jvanstraten Feb 24, 2022
40f0493
Fix error message
jvanstraten Feb 24, 2022
9183109
Strip UNC prefixes in Windows paths passed to protoc
jvanstraten Feb 24, 2022
57c9e19
Use typing.Iterable for type hint
jvanstraten Feb 24, 2022
400f8bd
Extreme prejudice for pip commands on mac runner
jvanstraten Feb 24, 2022
e85486a
Missed one of the canonicalize() calls
jvanstraten Feb 24, 2022
3cdc087
Increase pip/python executable resolution prejudice
jvanstraten Feb 24, 2022
3cab81c
Re-enable C static linking now that libcurl is out of the way
jvanstraten Feb 24, 2022
aa69ec4
Restructure again
jvanstraten Feb 24, 2022
2b2d2ab
Make sure latest versions of python deps are available in CI
jvanstraten Feb 24, 2022
c0a4af2
Fix clippies for new Rust release
jvanstraten Feb 24, 2022
3001a05
Finish and document diagnostic handling
jvanstraten Feb 25, 2022
997dd2c
Implement YAML tree walking
jvanstraten Feb 25, 2022
6f4d0de
Improve validator configurability in Rust
jvanstraten Mar 7, 2022
f22db71
Expose configuration structures to C and Python
jvanstraten Mar 7, 2022
dba47be
Fix C test
jvanstraten Mar 8, 2022
35bdb3b
Refactor into a sane(r) module tree and document all modules
jvanstraten Mar 8, 2022
1a6da3b
Fix Python tests
jvanstraten Mar 9, 2022
92aab29
Support patterns for Config::whitelisted_any_urls
jvanstraten Mar 9, 2022
7e13b5b
Remove validator lambdas in traversal code
jvanstraten Mar 9, 2022
19a6e49
Deduplicate some code in parse::traversal
jvanstraten Mar 9, 2022
c1b692c
Deduplicate more code in parse::traversal
jvanstraten Mar 9, 2022
96e4c51
Document parse module
jvanstraten Mar 9, 2022
3ae8ac0
Add license header to .proto files (#140)
GeorgeAp Mar 5, 2022
9ec4e7f
Add license data
jvanstraten Mar 9, 2022
287db6f
WIP on Python distribution issues
jvanstraten Mar 9, 2022
c948af9
Add missing license header
jvanstraten Mar 9, 2022
2874352
Fix missing dependency in python workflows
jvanstraten Mar 9, 2022
0d9ce98
Fix path issue
jvanstraten Mar 9, 2022
4cff242
Apply suggestions from code review
jvanstraten Mar 9, 2022
48dbed6
Fix sdist workflow
jvanstraten Mar 9, 2022
b26dc54
Fix clippy
jvanstraten Mar 9, 2022
492b442
Revise terminology
jvanstraten Mar 9, 2022
0d1aeed
Fix sdist
jvanstraten Mar 9, 2022
5c20e48
Fix UB in C interface layer and more thoroughly document unsafe {} bl…
jvanstraten Mar 9, 2022
a334d99
Use matrices to reduce repetition in workflow files
jvanstraten Mar 10, 2022
40a5014
Re-export instead of typedef
jvanstraten Mar 10, 2022
67ccf3c
Use string interpolation syntax to make format! strings easier to read
jvanstraten Mar 10, 2022
5f38556
String interpolation and extra comments for output::data_type
jvanstraten Mar 10, 2022
3a368ec
Use CARGO_MANIFEST_DIR env var in build.rs and add rerun-if-changed c…
jvanstraten Mar 10, 2022
02602dc
Add dep versions for cargo package
jvanstraten Mar 10, 2022
046e972
Disable unneeded features of jsonschema crate
jvanstraten Mar 10, 2022
289075f
Revise Rust packaging
jvanstraten Mar 10, 2022
0294321
Add ParseResult abstraction to Rust
jvanstraten Mar 10, 2022
429068e
Add ParseResult abstraction to protobuf serialization of validation r…
jvanstraten Mar 10, 2022
e9ccf82
Minor API function refactoring
jvanstraten Mar 14, 2022
7570c4c
Add rust cache and cargo doc check to CI
jvanstraten Mar 14, 2022
b489ad9
Fix CI?
jvanstraten Mar 14, 2022
d447b7a
Fix Python tests
jvanstraten Mar 14, 2022
bfc39a0
Initial commit for validator CLI in Python
jvanstraten Mar 14, 2022
cfb989d
Add Python dependency to CI workflow
jvanstraten Mar 14, 2022
bc69956
Add validator config support to CLI
jvanstraten Mar 14, 2022
55cf43d
Replace pycurl with urllib, because pycurl doesn't ship self-containe…
jvanstraten Mar 14, 2022
3fea8a0
Add additional Python API tests
jvanstraten Mar 14, 2022
c3841d9
Add CLI test cases
jvanstraten Mar 14, 2022
f64dc05
Add missing license headers
jvanstraten Mar 14, 2022
5f79b9a
Fix tests not using installed library
jvanstraten Mar 14, 2022
f00ff41
Fix file:// URL in test on Windows
jvanstraten Mar 14, 2022
48edcd2
Bump JSOM version to pull in bugfix, enable roundtrip tests
jvanstraten Mar 15, 2022
99d076d
WIP on type & relation validation
jvanstraten Mar 15, 2022
1bcca28
Fix cargo doc warnings
jvanstraten Mar 15, 2022
325f3ad
Add schema tracking logic
jvanstraten Mar 16, 2022
253b25b
Factor lots of stuff out of traversal macros and into Context
jvanstraten Mar 16, 2022
c998f84
Wrap DataType in Arc everywhere, because they were getting cloned a lot
jvanstraten Mar 16, 2022
a084c0e
Refactor extension parse & resolution logic
jvanstraten Mar 17, 2022
9c1ee46
Extend documentation features for nodes
jvanstraten Mar 17, 2022
901c760
Add additional descriptive information
jvanstraten Mar 17, 2022
5c3afd0
Minor: only emit data type nodes when the data type is actually known
jvanstraten Mar 18, 2022
2471402
Add validation test runner
jvanstraten Mar 18, 2022
2683642
Use protoc from prost_build for test runner
jvanstraten Mar 18, 2022
08004e8
Force flushing stdout when printing in test runner
jvanstraten Mar 18, 2022
61d86b0
Add pyyaml to test runner dependencies
jvanstraten Mar 18, 2022
f5419f7
Clean up comments
jvanstraten Mar 21, 2022
22ffc28
WIP on expressions
jvanstraten Mar 21, 2022
06211ff
Implement the most important bits of expression validation
jvanstraten Mar 22, 2022
f0ffb42
Finish validation for read relation
jvanstraten Mar 22, 2022
76931fa
Fix URI regexes, fix proto name derivation insofar possible
jvanstraten Mar 23, 2022
bac83f8
Improve glob syntax regex, downgrade URI errors to warnings
jvanstraten Mar 23, 2022
83252eb
Implement sorts and basic window function validation
jvanstraten Mar 23, 2022
848e810
Implement validation for all relations except aggregations
jvanstraten Mar 23, 2022
b2508c0
Minor fixes to validation, embed FontAwesome according to license
jvanstraten Mar 23, 2022
00f0142
Fix formatting of comment blocks in HTML
jvanstraten Mar 23, 2022
7a8ffd4
Add shorter description for basic fetch relation
jvanstraten Mar 23, 2022
bb5b340
Minor fixes to validation and HTML output
jvanstraten Mar 24, 2022
50786d1
Match names in RelRoot with schema
jvanstraten Mar 24, 2022
8d5a329
Fix grammar in output
jvanstraten Mar 24, 2022
ece306a
Implement validation for subqueries
jvanstraten Mar 28, 2022
9e4e5dd
Use crate for URI parsing, clean up long string literals
jvanstraten Mar 28, 2022
12deeee
An updated Exchange rel. (#142)
jacques-n Mar 27, 2022
c9bd0ce
Fix typo in the decimal type derivation rules (#151)
westonpace Mar 27, 2022
3290a66
Fix typos, formatting; minor clarifications (#145)
saulpw Mar 27, 2022
2a39168
Added some comments to the .proto file explaining the different path …
westonpace Mar 27, 2022
3af692b
Upgrade mkdocs so that jinja2 bug doesn't cause a problem. (#153)
jacques-n Mar 28, 2022
238f024
Fix incorrect function output types and add other common functions. (…
jacques-n Mar 28, 2022
858f97f
Resolve FIXMEs related to URIs, as docs have been added upstream since
jvanstraten Mar 28, 2022
254e899
Fix divisions by zero in string_util
jvanstraten Mar 28, 2022
419e3ed
Disable field name matching error when incoming type is (partially) u…
jvanstraten Mar 28, 2022
4fbd1e2
Implement validation for aggregate relation
jvanstraten Mar 28, 2022
1a1870c
Emit data types recursively for HTML export format
jvanstraten Mar 28, 2022
ff0fce1
Improve documentation somewhat
jvanstraten Mar 28, 2022
9a2293e
Add APIs for retrieving the list of defined diagnostic codes
jvanstraten Mar 29, 2022
71ee5f8
Add type variation base class information, remove unresolved type des…
jvanstraten Mar 29, 2022
e593a99
Various improvements for plumbing related to parsing
jvanstraten Mar 29, 2022
a4ae0a8
Update test case (really need to make better ones already)
jvanstraten Mar 29, 2022
ea35b48
Make cargo package work
jvanstraten Mar 30, 2022
82fa0f7
Document and clean up dependencies
jvanstraten Mar 30, 2022
712799d
Document release procedure, some cleanup
jvanstraten Mar 30, 2022
de3d9f5
Update release procedure
jvanstraten Mar 30, 2022
23667dd
Improve/fix Python API test case
jvanstraten Mar 30, 2022
15a56ad
Update JSOM (decoder is broken, but encoder is much nicer now)
jvanstraten Mar 30, 2022
d86dd12
Fix sdist release logic
jvanstraten Mar 30, 2022
dc225ac
Allow different branches of if/else statements to differ in nullability
jvanstraten Mar 30, 2022
71903eb
Add some features to the test runner and add positive test cases for …
jvanstraten Mar 30, 2022
e993e7c
Build test runner with optimizations and disable HTML gen in workflow
jvanstraten Mar 30, 2022
45971fe
Break long YAML strings
jvanstraten Mar 30, 2022
2193b5c
Add yamllint to pre-commit hooks
jvanstraten Mar 30, 2022
4e0abb3
Improve performance for validation tests once more
jvanstraten Mar 30, 2022
8109bdf
Add validation tests for all literals and types, fix many bugs
jvanstraten Mar 31, 2022
7c05992
Add test cases for scalar references
jvanstraten Apr 4, 2022
fd38519
Implement "incremental compilation" for Python part of test runner
jvanstraten Apr 4, 2022
6c3d094
Implement half-decent CLI for test runner
jvanstraten Apr 4, 2022
a4e6a24
Clean up Rust code for test runner, implement parallel testing
jvanstraten Apr 4, 2022
a0c3bd8
Upgrade JSOM, re-enable tests
jvanstraten Apr 4, 2022
0e111c4
Add more complex plan to Python test cases
jvanstraten Apr 4, 2022
839a3aa
Add tests for masked and outer references
jvanstraten Apr 5, 2022
08d3674
Add tests for conditional expressions
jvanstraten Apr 5, 2022
45a2185
Add test cases for subqueries and reorganize directory structure
jvanstraten Apr 5, 2022
c969016
Fix duplicate grouping sets in TPC-H query tests
jvanstraten Apr 5, 2022
97081d3
Some more bugfixes to Isthmus-generated plans, implement TPC-H 2, 4 &…
jvanstraten Apr 5, 2022
8835d02
style: format protos using buf format (#157)
cpcloud Apr 5, 2022
d1b00f1
Make ifElse return nullable when any condition is a nullable bool
jvanstraten Apr 6, 2022
14bd50f
decimal vs dec in function signatures
jvanstraten Apr 6, 2022
a647998
Reorder extensionUris in TPC-H queries (no functional change)
jvanstraten Apr 6, 2022
cc3a838
Manually implement TPC-H8
jvanstraten Apr 6, 2022
c4d1d98
Manually implement TPC-H9
jvanstraten Apr 6, 2022
96d44d1
Add black and flake8 for Python code
jvanstraten Apr 6, 2022
f9104a7
Add some test cases for ReadRel, improve specificity of some diag codes
jvanstraten Apr 6, 2022
2f7d698
Add test cases for ReadRel, RelCommon, and PlanRel
jvanstraten Apr 7, 2022
dca9615
Add test cases for filter and sort relations
jvanstraten Apr 7, 2022
8713dd6
Add test cases for project and cross relations
jvanstraten Apr 7, 2022
bbc6b94
Add test cases for join relations
jvanstraten Apr 7, 2022
b9b2ea3
Fix test case names
jvanstraten Apr 7, 2022
82eeadb
Add test cases for set and fetch relations
jvanstraten Apr 7, 2022
9a0fd5e
Add test cases for aggregates and advanced extensions
jvanstraten Apr 7, 2022
743c4ed
Added a slight clarification that the direct schema of a read relatio…
westonpace Apr 5, 2022
faa8d0b
Update mkdocs-protobuf plugin (#154)
rymurr Apr 5, 2022
1d679f4
docs(spec): remove outdated references to parameter bounds (#163)
jvanstraten Apr 7, 2022
ab0aa8e
Remove references to organization IDs (#165)
jvanstraten Apr 12, 2022
e369cf5
Downgrade Clippy to 1.59 in CI, since 1.60 throws an ICE
jvanstraten Apr 13, 2022
fd616d4
Lock jsonschema to 0.15.0, see https://github.com/Stranger6667/jsonsc…
jvanstraten Apr 13, 2022
350a1cf
Remove superfluous error message for missing nullability information …
jvanstraten Apr 14, 2022
e2cedb4
Fix grammar in summary of sort relation
jvanstraten Apr 14, 2022
4694923
Restructure to use main Substrait repo as submodule
jvanstraten May 9, 2022
5494f64
Refactor workflows
jvanstraten May 9, 2022
1366a74
Fix proto formatting
jvanstraten May 9, 2022
34c79b1
Minor change to toplevel README file
jvanstraten May 9, 2022
78b4e38
chore: fix license file bad copy/paste
jvanstraten May 10, 2022
8ca8e17
Allow grouping sets with 0 expressions, and clarify what this means
jvanstraten May 11, 2022
0f3cc7c
Extend .licenserc.yaml
jvanstraten May 16, 2022
3e29e0b
Upgrade/rename JSOM to JDOT
jvanstraten May 16, 2022
667bb4a
Bump Substrait to v0.2.0
jvanstraten May 16, 2022
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
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
trim_trailing_whitespace = true

[site/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
indent_style = unset
trim_trailing_whitespace = unset

[*.{proto,yaml,yml}]
indent_size = 2
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
ignore = E203, E266, E501, W503, F403, F401
max-line-length = 88
select = B,C,E,F,W,T4,B9
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
proto/buf.lock linguist-generated=true
24 changes: 24 additions & 0 deletions .github/actions/dev-tool-python/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Install Python'
inputs:
python-version:
required: true
default: '3.9'
runs:
using: "composite"
steps:
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ inputs.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
working-directory: ${{env.working-directory}}
36 changes: 36 additions & 0 deletions .github/workflows/c.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: C

on:
pull_request:
push:
branches: [ main ]

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Configure
run: mkdir -p build && cd build && cmake ../c -DSUBSTRAIT_VALIDATOR_BUILD_TESTS=ON
- name: Build
run: cmake --build build
- name: Test
run: ctest --output-on-failure --test-dir build

style:
name: Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jidicula/[email protected]
with:
clang-format-version: '13'
check-path: c
23 changes: 23 additions & 0 deletions .github/workflows/misc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Misc

on:
pull_request:
push:
branches: [ main ]

jobs:
license:
name: Check license headers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check License Header
uses: enarx/spdx@master
with:
licenses: Apache-2.0 MIT

editorconfig:
name: Check editorconfig
runs-on: ubuntu-latest
steps:
- uses: editorconfig-checker/action-editorconfig-checker@v1
30 changes: 30 additions & 0 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Protobuf

on:
pull_request:
push:
branches: [ main ]

jobs:
style:
name: Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: bufbuild/[email protected]
- run: buf format --diff --exit-code

check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: arduino/setup-protoc@v1
- uses: bufbuild/[email protected]
- uses: bufbuild/buf-lint-action@v1
- name: Compile protobuf
run: buf generate
113 changes: 113 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: Python

on:
pull_request:
push:
branches: [ main ]

jobs:
build:
name: Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
type: [wheel]
include:
- os: ubuntu-latest
type: sdist
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install sdist-only dependencies
if: ${{ matrix.type == 'sdist' }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: sdist-only build prep
if: ${{ matrix.type == 'sdist' }}
working-directory: rs
run: cargo check
# ^ this ensures that its build.rs is run, which is all we need. Sadly
# there doesn't seem to be a way to do this that doesn't pull in all
# normal dependencies: https://github.com/rust-lang/cargo/issues/7178
- name: Install build dependencies
run: python3 -m pip install --upgrade pip maturin
- name: Prepare build environment
working-directory: py
run: python3 prepare_build.py populate
- name: Create sdist
if: ${{ matrix.type == 'sdist' }}
uses: messense/maturin-action@v1
with:
command: sdist
args: -o dist -m py/Cargo.toml
- name: Build manylinux wheels
if: ${{ matrix.type == 'wheel' && matrix.os == 'ubuntu-latest' }}
uses: messense/maturin-action@v1
with:
manylinux: auto
command: build
args: --release --no-sdist -o dist -m py/Cargo.toml
- name: Build Windows wheels
if: ${{ matrix.type == 'wheel' && matrix.os == 'windows-latest' }}
uses: messense/maturin-action@v1
with:
command: build
args: --release --no-sdist -o dist -m py/Cargo.toml
- name: Build MacOS wheels
if: ${{ matrix.type == 'wheel' && matrix.os == 'macos-latest' }}
uses: messense/maturin-action@v1
with:
command: build
args: --release --no-sdist -o dist --universal2 -m py/Cargo.toml
- name: Install runtime dependencies
run: python3 -m pip install --upgrade protobuf pytest click pyyaml jdot
- name: Install generated sdist
if: ${{ matrix.type == 'sdist' }}
run: python3 -m pip install dist/substrait_validator-*.tar.gz
- name: Install generated wheel
if: ${{ matrix.type == 'wheel' }}
run: python3 -m pip install --no-index --find-links=dist substrait-validator
- name: Test
working-directory: py/tests
run: python3 -m pytest
- name: Upload wheels
if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist

release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [ build ]
steps:
- uses: actions/download-artifact@v2
with:
name: wheels
- name: Publish to PyPI
uses: messense/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --skip-existing *

fmt-lint:
name: Style & lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: python3 -m pip install --upgrade pip black==22.3.0 flake8==4.0.1
- name: Black
run: python3 -m black --diff --check .
- name: Flake8
run: python3 -m flake8 .
103 changes: 103 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Rust

on:
pull_request:
push:
branches: [ main ]

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- name: Check
run: cargo check --all-features

test:
name: Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- name: Run unit tests
run: cargo test --all-features
- name: Install test runner dependencies
run: python3 -m pip install --upgrade pip protobuf pyyaml
- name: Run validation tests
# No need to run validation tests for all operating systems, and Linux
# runners are the fastest of the bunch.
if: ${{ matrix.os == 'ubuntu-latest' }}
working-directory: tests
run: python3 runner.py run --no-html

style:
name: Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- uses: Swatinem/rust-cache@v1
- name: Rustfmt
run: cargo fmt --all -- --check

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
# Clippy 1.60 crashes on the codebase, see
# https://github.com/rust-lang/rust-clippy/issues/8527
toolchain: "1.59.0"
override: true
components: clippy
- uses: Swatinem/rust-cache@v1
- name: Clippy
run: cargo clippy --all-features -- -D warnings

doc:
name: Doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- name: Doc
run: RUSTDOCFLAGS="-Dwarnings" cargo doc --workspace --all-features
15 changes: 15 additions & 0 deletions .github/workflows/yaml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: YAML

on:
pull_request:
push:
branches: [ main ]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run yamllint
run: yamllint .
14 changes: 6 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Generated by Cargo
# will have compiled files and executables
**/*.rs.bk
**/target
**/.gradle
**/.idea
**/build
gen
/target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "substrait"]
path = substrait
url = https://github.com/substrait-io/substrait.git
Loading