Repository: heavyai/ibis-heavyai (language: python)

Issue:
[ENH] Move to pyomnisci
This PR move from pymapd to pyomnisci.

Resolve #23 

Depends on #38


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 496d34b..3afb87b 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -10,21 +10,30 @@ jobs:
   tests:
     name: Tests OmniSciDB
     runs-on: ubuntu-latest
+
     env:
       BACKENDS: "omniscidb"
+
     strategy:
       fail-fast: false
       matrix:
-        python-version: ["3.7"]
         pymapd-version: ["stable", "dev"]
+
+    defaults:
+      run:
+        shell: bash -l {0}
+
     steps:
     - name: checkout
       uses: actions/checkout@v1
 
-    - name: setup python
-      uses: actions/setup-python@v2
+    - name: setup conda
+      uses: conda-incubator/setup-miniconda@v2
       with:
-        python-version: ${{ matrix.python-version }}
+        activate-environment: ibis-omniscidb
+        channels: conda-forge
+        environment-file: environment-dev.yaml
+        mamba-version: "*"
 
     - name: start omniscidb service
       run: docker-compose --file ci/docker-compose.yaml up -d omniscidb
@@ -35,16 +44,12 @@ jobs:
     - name: install dependencies
       run: |
         if [[ "${{ matrix.pymapd-version }}" == "dev" ]]; then
-          grep -v "pymapd" requirements.txt > requirements_no_pymapd.txt
-          python -m pip install -r requirements_no_pymapd.txt
           pip install git+https://github.com/omnisci/pymapd.git
-        else
-          python -m pip install -r requirements.txt
         fi
-        python -m pip install -e .
+        python -m pip install --no-deps -e .
 
     - name: show environment
-      run: pip list
+      run: conda list
 
     - name: setup tests
       run: python ci/setup_tests.py
@@ -55,24 +60,31 @@ jobs:
   lint:
     name: Lint
     runs-on: ubuntu-latest
+
+    defaults:
+      run:
+        shell: bash -l {0}
+
     steps:
 
     - name: checkout
       uses: actions/checkout@v1
 
-    - name: setup python
-      uses: actions/setup-python@v2
+    - name: setup conda
+      uses: conda-incubator/setup-miniconda@v2
       with:
-        python-version: "3.7"
+        activate-environment: ibis-omniscidb
+        channels: conda-forge
+        environment-file: environment-dev.yaml
+        mamba-version: "*"
 
     - name: install dependencies
       run: |
-        python -m pip install -r requirements.txt
-        python -m pip install -e .
+        python -m pip install --no-deps -e .
         pre-commit install
 
     - name: show environment
-      run: pip list
+      run: conda list
 
     - name: pre-commit check
       run: pre-commit run --all-files
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index db3f146..e6c2cb7 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,23 +1,23 @@
 repos:
   - repo: https://github.com/PyCQA/isort
-    rev: master  # stable
+    rev: main  # stable
     hooks:
       - id: isort
 
   - repo: https://github.com/psf/black
-    rev: stable
+    rev: 20.8b1
     hooks:
       - id: black
 
   - repo: https://gitlab.com/pycqa/flake8
-    rev: 3.8.4
+    rev: 3.9.0
     hooks:
       - id: flake8
         types:
           - python
 
   - repo: https://github.com/pre-commit/mirrors-mypy
-    rev: 'v0.790'
+    rev: 'v0.812'
     hooks:
     - id: mypy
       files: ibis_omniscidb/
diff --git a/environment-dev.yaml b/environment-dev.yaml
index b5b3032..7fa9814 100644
--- a/environment-dev.yaml
+++ b/environment-dev.yaml
@@ -1,6 +1,7 @@
 name: ibis-omniscidb-dev
 channels:
 - conda-forge
+
 dependencies:
 
 # core
@@ -9,6 +10,9 @@ dependencies:
 - pyarrow>=0.15.0
 - numpy<1.20
 - rbc
+- python 3.8.*
+# TODO: sqlalchemy pinning should be removed when Ibis 2.0 is released
+- sqlalchemy<1.4
 
 # dev
 - black


Test patch:
diff --git a/ibis_omniscidb/tests/test_geo.py b/ibis_omniscidb/tests/test_geo.py
index 04eed04..3240a4e 100644
--- a/ibis_omniscidb/tests/test_geo.py
+++ b/ibis_omniscidb/tests/test_geo.py
@@ -1,5 +1,3 @@
 def test_centroid(geo_table):
-    assert (
-        'POINT (25.4545454545455 26.969696969697)'
-        == geo_table.geo_polygon.centroid().execute().values[0]
-    )
+    result = geo_table.geo_polygon.centroid().execute()
+    assert 'POINT (25.4545454545455 26.969696969697)' == result.values[0].wkt