Merge pull request #7 from lancedb/changhiskhan/gha

add GHA for python unit tests
This commit is contained in:
Chang She
2023-03-22 14:43:27 -07:00
committed by GitHub
5 changed files with 60 additions and 28 deletions

58
.github/workflows/python.yml vendored Normal file
View File

@@ -0,0 +1,58 @@
name: Python
on:
push:
branches:
- main
pull_request:
paths:
- python/**
- .github/workflows/python.yml
jobs:
linux:
timeout-minutes: 30
strategy:
matrix:
python-minor-version: [ "8", "9", "10", "11" ]
runs-on: "ubuntu-22.04"
defaults:
run:
shell: bash
working-directory: python
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.${{ matrix.python-minor-version }}
- name: Install lancedb
run: |
pip install -e .
pip install pytest
- name: Run tests
run: pytest -x -v --durations=30 tests
mac:
timeout-minutes: 30
runs-on: "macos-12"
defaults:
run:
shell: bash
working-directory: python
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install lancedb
run: |
pip install -e .
pip install pytest
- name: Run tests
run: pytest -x -v --durations=30 tests

View File

@@ -1,19 +0,0 @@
{
"name": "lancedb",
"version": "0.0.1",
"author": "lance devs <dev@eto.ai>",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/eto-ai/lancedb.git"
},
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/eto-ai/lancedb/issues"
},
"homepage": "https://github.com/eto-ai/lancedb#readme",
"description": ""
}

View File

@@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from pathlib import Path
from typing import Union
from typing import Union, List
import numpy as np
import pandas as pd
@@ -21,5 +21,5 @@ VEC = Union[list, np.ndarray, pa.Array, pa.ChunkedArray]
URI = Union[str, Path]
# TODO support generator
DATA = Union[list[dict], dict, pd.DataFrame]
DATA = Union[List[dict], dict, pd.DataFrame]
VECTOR_COLUMN_NAME = "vector"

View File

@@ -1,7 +0,0 @@
[package]
name = "lancedb"
version = "0.0.1"
authors = ["Lance Developers"]
autobins = false
description = "Lance DB"
license-file = "../LICENSE"

View File