forked from apache/datafusion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added Python project. * Update python/Cargo.toml Co-authored-by: Andy Grove <andygrove@users.noreply.github.com> * Update python/Cargo.toml Co-authored-by: Uwe L. Korn <xhochy@users.noreply.github.com> * Added license and black formatting. * License * Fixing build. * TesTestt * Bumped to latest DataFusion. * Bumped nightly. * Bumped pyarrow in tests. * Added some tests back. Co-authored-by: Andy Grove <andygrove@users.noreply.github.com> Co-authored-by: Uwe L. Korn <xhochy@users.noreply.github.com>
- Loading branch information
1 parent
e271e4d
commit 46bde0b
Showing
28 changed files
with
2,244 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
name: Build | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build-python-mac-win: | ||
name: Mac/Win | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
os: [macos-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2021-01-06 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install maturin | ||
- name: Build Python package | ||
run: cd python && maturin build --release --no-sdist --strip --interpreter python${{matrix.python_version}} | ||
|
||
- name: List wheels | ||
if: matrix.os == 'windows-latest' | ||
run: dir python/target\wheels\ | ||
|
||
- name: List wheels | ||
if: matrix.os != 'windows-latest' | ||
run: find ./python/target/wheels/ | ||
|
||
- name: Archive wheels | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: python/target/wheels/* | ||
|
||
build-manylinux: | ||
name: Manylinux | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build wheels | ||
run: docker run --rm -v $(pwd):/io konstin2/maturin build --release --manylinux | ||
- name: Archive wheels | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: python/target/wheels/* | ||
|
||
release: | ||
name: Publish in PyPI | ||
needs: [build-manylinux, build-python-mac-win] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
name: Python test | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Rust toolchain | ||
run: | | ||
rustup toolchain install nightly-2021-01-06 | ||
rustup default nightly-2021-01-06 | ||
rustup component add rustfmt | ||
- name: Cache Cargo | ||
uses: actions/cache@v2 | ||
with: | ||
path: /home/runner/.cargo | ||
key: cargo-maturin-cache- | ||
- name: Cache Rust dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: /home/runner/target | ||
key: target-maturin-cache- | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
- name: Install Python dependencies | ||
run: python -m pip install --upgrade pip setuptools wheel | ||
- name: Run tests | ||
run: | | ||
cd python/ | ||
export CARGO_HOME="/home/runner/.cargo" | ||
export CARGO_TARGET_DIR="/home/runner/target" | ||
python -m venv venv | ||
source venv/bin/activate | ||
pip install maturin==0.10.4 toml==0.10.1 pyarrow==4.0.0 | ||
maturin develop | ||
python -m unittest discover tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,6 @@ members = [ | |
"ballista/rust/core", | ||
"ballista/rust/executor", | ||
"ballista/rust/scheduler", | ||
] | ||
] | ||
|
||
exclude = ["python"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
[target.x86_64-apple-darwin] | ||
rustflags = [ | ||
"-C", "link-arg=-undefined", | ||
"-C", "link-arg=dynamic_lookup", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
target | ||
venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
/target | ||
Cargo.lock | ||
venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
[package] | ||
name = "datafusion" | ||
version = "0.2.1" | ||
homepage = "https://github.com/apache/arrow" | ||
repository = "https://github.com/apache/arrow" | ||
authors = ["Apache Arrow <dev@arrow.apache.org>"] | ||
description = "Build and run queries against data" | ||
readme = "README.md" | ||
license = "Apache-2.0" | ||
edition = "2018" | ||
|
||
[dependencies] | ||
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync"] } | ||
rand = "0.7" | ||
pyo3 = { version = "0.12.1", features = ["extension-module"] } | ||
datafusion = { git = "https://github.com/apache/arrow-datafusion.git", rev = "2423ff0d" } | ||
|
||
[lib] | ||
name = "datafusion" | ||
crate-type = ["cdylib"] | ||
|
||
[package.metadata.maturin] | ||
requires-dist = ["pyarrow>=1"] | ||
|
||
classifier = [ | ||
"Development Status :: 2 - Pre-Alpha", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Apache Software License", | ||
"License :: OSI Approved", | ||
"Operating System :: MacOS", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: POSIX :: Linux", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python", | ||
"Programming Language :: Rust", | ||
] |
Oops, something went wrong.