Skip to content

Commit

Permalink
Merge pull request #287 from taosdata/feat/TD-33208-MAIN
Browse files Browse the repository at this point in the history
Feat: Superset Support  TDengine Cloud And Suppport Views
  • Loading branch information
zitsen authored Dec 24, 2024
2 parents 9e8cff3 + 4908e9e commit d87c235
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 224 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,34 @@ jobs:
(github.event_name == 'push' && steps.cache-server-push.outputs.cache-hit != 'true')
run: brew install argp-standalone pkgconfig geos

- name: Set up homebrew
if: |
github.event_name == 'pull_request'
|| github.event_name == 'push'
|| github.event_name == 'schedule'
run: |
brew update
brew install --overwrite argp-standalone pkg-config
brew info argp-standalone
- name: Set up Go
if: |
github.event_name == 'pull_request'
|| github.event_name == 'push'
|| github.event_name == 'schedule'
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Set up Rust
if: |
github.event_name == 'pull_request'
|| github.event_name == 'push'
|| github.event_name == 'schedule'
uses: actions-rs/[email protected]
with:
toolchain: stable

- name: install TDengine
if: >
(github.event_name == 'workflow_dispatch' && steps.cache-server-manually.outputs.cache-hit != 'true') ||
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/test-ubuntu-2004.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ jobs:

- name: Build TDengine 3.0
run: |
export CLOUD_DSN=${{ secrets.CLOUD_TOKEN }}
echo "dsn=$CLOUD_DSN"
cd TDengine_v3
mkdir build
cd build
Expand All @@ -113,6 +116,9 @@ jobs:
- name: Test 3.0
run: |
export LD_LIBRARY_PATH=$PWD/TDengine_v3/build/build/lib
echo "---------- test end for test_cloud.py -------------"
#source $VENV
export TDENGINE_URL=localhost:6041
curl -L -H "Authorization: Basic cm9vdDp0YW9zZGF0YQ==" -d "show databases" localhost:6041/rest/sql
Expand All @@ -121,11 +127,12 @@ jobs:
- name: Test examples 3.0
run: |
cd examples || ls -l
pip3 install .. > /dev/null || echo "failed to install taospy from source code"
run: |
pip3 install ./ > /dev/null || echo "failed to install taospy from source code"
pip3 install taos-ws-py > /dev/null || echo "failed to install taos-ws-py"
pip3 install pandas "numpy<2.0.0" sqlalchemy > /dev/null || echo "failed to install pandas"
python3 taos-ws-py/tests/test_cloud.py ${{ secrets.CLOUD_TOKEN }}
cd examples || ls -l
taosBenchmark -d power -t 10 -n 10 -y
for i in `find . -name "*.py" \
|grep -Ev "cloud|trades|v2|websocket_with_req_id|tmq_consumer|rest_cursor|rest_client.py|import-json|connect_rest_examples|schemaless_insert"`; \
Expand Down
204 changes: 7 additions & 197 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Bug Fixes:

- 2.x add taos-ws-py compose
- DATABASE_URL KeyError
- add pip3 install ./
- add report Codecov.io with token
- add report Codecov.io with token1
- case test_tmp death wait message
- change dotenv name
- ci test passed
- coverage with pytest run
- dotenv remove install
- forbid test_tmp.py case
- if v3 return for taosw
- insert test_sqlalchemy.py ok
- insert with conn do
- insertData is inner testfun
- move import taosws to fun
- need insert data before checkBasic for sqlalcmy
- need install taos-ws-py
- no poetry install need module
- only run pytest tet
- reduce insert data
- remove other test function
- remove pytest coverage
- rest test already in test_sqlalchemy.py
- restore all case
- restore pytest coverage
- restore test_tmq.py case
- setup superset driverTDengine.py to package
- test with rest and taosc
- ubuntu20.4 remove poetry run
- use text
- version from 2.7.16 to 2.7.17
- fix: case test_tmp death wait message
- **(taos-ws-py)**: fix crypto provider error

### Enhancements:
Expand All @@ -61,180 +30,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- optimize taospy documents on PyPi official website

## v2.7.17 - 2024-12-14
## v2.7.16 - 2024-09-19

### Features:

- support taos taosws taosrest protocol for superset

### Bug Fixes:

- 2.x add taos-ws-py compose
- DATABASE_URL KeyError
- add pip3 install ./
- add report Codecov.io with token
- add report Codecov.io with token1
- case test_tmp death wait message
- change dotenv name
- ci test passed
- coverage with pytest run
- dotenv remove install
- forbid test_tmp.py case
- if v3 return for taosw
- insert test_sqlalchemy.py ok
- insert with conn do
- insertData is inner testfun
- move import taosws to fun
- need insert data before checkBasic for sqlalcmy
- need install taos-ws-py
- no poetry install need module
- only run pytest tet
- reduce insert data
- remove other test function
- remove pytest coverage
- rest test already in test_sqlalchemy.py
- restore all case
- restore pytest coverage
- restore test_tmq.py case
- setup superset driverTDengine.py to package
- test with rest and taosc
- ubuntu20.4 remove poetry run
- use text
- version from 2.7.16 to 2.7.17
- **(taos-ws-py)**: fix crypto provider error

### Enhancements:

- double match to sqltypes.float reference sqlite rule

### Tests:

- do nothing for tmp and sqlalchemy

### Documents:

- optimize taospy documents on PyPi official website
- Add subscription configuration (session. timeout. ms, Max. roll. interval. ms).

## v2.7.17 - 2024-12-14
## v2.7.15 - 2024-04-12

### Features:

- support taos taosws taosrest protocol for superset

### Bug Fixes:

- 2.x add taos-ws-py compose
- DATABASE_URL KeyError
- add pip3 install ./
- add report Codecov.io with token
- add report Codecov.io with token1
- case test_tmp death wait message
- change dotenv name
- ci test passed
- coverage with pytest run
- dotenv remove install
- forbid test_tmp.py case
- if v3 return for taosw
- insert test_sqlalchemy.py ok
- insert with conn do
- insertData is inner testfun
- move import taosws to fun
- need insert data before checkBasic for sqlalcmy
- need install taos-ws-py
- no poetry install need module
- only run pytest tet
- reduce insert data
- remove other test function
- remove pytest coverage
- rest test already in test_sqlalchemy.py
- restore all case
- restore pytest coverage
- restore test_tmq.py case
- setup superset driverTDengine.py to package
- test with rest and taosc
- ubuntu20.4 remove poetry run
- use text
- version from 2.7.16 to 2.7.17
- **(taos-ws-py)**: fix crypto provider error

### Enhancements:

- double match to sqltypes.float reference sqlite rule

### Tests:

- do nothing for tmp and sqlalchemy

### Documents:

- optimize taospy documents on PyPi official website

## v2.7.17 - 2024-12-14

## v2.7.17 - 2024-12-14

### Features:
- Added support for VARBINRY and GEOMETRY types.

- support taos taosws taosrest protocol for superset
## v2.7.14 - 2024-04-12

### Bug Fixes:

- 2.x add taos-ws-py compose
- DATABASE_URL KeyError
- add pip3 install ./
- add report Codecov.io with token
- add report Codecov.io with token1
- case test_tmp death wait message
- change dotenv name
- ci test passed
- coverage with pytest run
- dotenv remove install
- forbid test_tmp.py case
- if v3 return for taosw
- insert test_sqlalchemy.py ok
- insert with conn do
- insertData is inner testfun
- move import taosws to fun
- need insert data before checkBasic for sqlalcmy
- need install taos-ws-py
- no poetry install need module
- only run pytest tet
- reduce insert data
- remove other test function
- remove pytest coverage
- rest test already in test_sqlalchemy.py
- restore all case
- restore pytest coverage
- restore test_tmq.py case
- setup superset driverTDengine.py to package
- test with rest and taosc
- ubuntu20.4 remove poetry run
- use text
- version from 2.7.16 to 2.7.17
- **(taos-ws-py)**: fix crypto provider error

### Enhancements:

- double match to sqltypes.float reference sqlite rule

### Tests:

- do nothing for tmp and sqlalchemy

### Documents:

- optimize taospy documents on PyPi official website

## v2.7.17 - 2024-12-13

### New Feature
- Support Apache-SuperSet BI Tools

## v2.7.16 - 2024-09-19

## v2.7.15 - 2024-04-12

## v2.7.14 - 2024-04-12
- Fix Known Issues.

## v2.7.13 - 2024-01-26

Expand Down Expand Up @@ -317,8 +129,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- update cmd
- update readme

## v2.7.7 - 2023-03-29

## v2.7.7 - 2023-03-28

### Bug Fixes:
Expand Down
14 changes: 0 additions & 14 deletions taos-ws-py/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Conventional Changelog](https://www.conventionalcommits.org/en/v1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v0.2.2 - 2023-01-13

## v0.3.4 - 2024-11-19

## v0.3.4 - 2024-11-19

## v0.3.4 - 2024-11-19

## v0.3.4 - 2024-11-19

## v0.3.4 - 2024-11-19

## v0.3.4 - 2024-11-19

## v0.3.4 - 2024-11-19

## v0.3.3 - 2024-09-19
Expand Down
19 changes: 14 additions & 5 deletions taos-ws-py/tests/test_cloud.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
import os
import sys
import taosws

def test_ws_connect():
def taos_ws_connect(token):
print("-" * 40)
print("test_ws_connect")
conn = taosws.connect("%s?token=%s" % ('wss://gw.cloud.taosdata.com', '68d41c020d2e9e3dcac18140460d1bcfd82d642d'))
r = conn.query_with_req_id("show dnodes", 1)
print("r: ", r.fields)
conn = taosws.connect("%s?token=%s" % ('wss://gw.cloud.taosdata.com', token))
res = conn.query_with_req_id("show databases", 1)
dbs = [row[0] for row in res]
print(dbs)
# check sys db exist
assert "information_schema" in dbs
assert "performance_schema" in dbs
print("test_ws_connect done")
print("-" * 40)

if __name__ == "__main__":
test_ws_connect()
if len(sys.argv) < 2 :
print("need token argument passed.\n")
else:
taos_ws_connect(sys.argv[1])
Loading

0 comments on commit d87c235

Please sign in to comment.