Skip to content
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

Merge 3.0 to main 0206 for Python Connector #301

Merged
merged 29 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0fb1f30
Merge pull request #296 from taosdata/main
DuanKuanJun Jan 6, 2025
34fb7d0
enh: add tool.poetry.group.test and poetry limit 1.8.5 version
DuanKuanJun Jan 6, 2025
4158671
fix: ubuntu20.4 limit poetry 1.8.5
DuanKuanJun Jan 6, 2025
885230d
fix: format for dependences
DuanKuanJun Jan 6, 2025
0d47a56
enh: test ubuntu 20.04 install shapely with --with=test dependencies
DuanKuanJun Jan 6, 2025
f8c1bf7
fix: for all platform --with=test dependencies
DuanKuanJun Jan 6, 2025
9dc24d9
fix: remove other tests dependencies library
DuanKuanJun Jan 6, 2025
c33e099
fix: remove all platform poetry pip install on test env
DuanKuanJun Jan 6, 2025
356e6f9
fix: add --with=test for all platform
DuanKuanJun Jan 6, 2025
bbfce0d
update pandas and numpy to high version
DuanKuanJun Jan 6, 2025
116e360
modify pandas=1.5.0
DuanKuanJun Jan 6, 2025
210f01a
fix: limit numpy version <2.0.0
DuanKuanJun Jan 7, 2025
28e96ed
fix: restore pandas veriosn >1.0 version
DuanKuanJun Jan 7, 2025
e713c74
fix: pandas set latest version with *
DuanKuanJun Jan 7, 2025
bb0fa36
fix: pandas set latest version with * add numpy
DuanKuanJun Jan 7, 2025
f2115b8
fix: mac install python3.10
DuanKuanJun Jan 7, 2025
edb37e8
fix: mac install python3.10.12
DuanKuanJun Jan 7, 2025
a0b367d
restore on maoc13
DuanKuanJun Jan 7, 2025
50dc5d8
fix: restore mac.yml with main
DuanKuanJun Jan 7, 2025
45d5625
fix: python setup 3.10
DuanKuanJun Jan 7, 2025
f9b117a
fix: mac with poetry 1.8.5
DuanKuanJun Jan 7, 2025
b359c6e
fix: remove numpy compose
DuanKuanJun Jan 7, 2025
370263e
fix: ubuntu22.04 add poetry run pip install numpy<2.0.0 env
DuanKuanJun Jan 8, 2025
e528864
fix: add install area with numpy
DuanKuanJun Jan 8, 2025
c0440f6
fix: remove numpy install after poetry intall
DuanKuanJun Jan 8, 2025
03d6ea1
Merge pull request #297 from taosdata/enh/TD-33409-3.0-B
zitsen Jan 8, 2025
05d3c93
fix: checkout TDengine branch depends dynamic generate
DuanKuanJun Feb 6, 2025
741fbbc
fix: remove apt install openssl and other
DuanKuanJun Feb 6, 2025
937bd5b
fix: restore some necessary build tools
DuanKuanJun Feb 6, 2025
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
4 changes: 3 additions & 1 deletion .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ jobs:
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.5
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
Expand Down Expand Up @@ -281,7 +282,7 @@ jobs:

- name: Checkout Connector
uses: actions/checkout@v4

- name: Cache Poetry
id: cache-poetry
uses: actions/cache@v4
Expand All @@ -295,6 +296,7 @@ jobs:
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.5
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ jobs:
run: |
sudo apt install -y gnome-keyring
pip3 install --upgrade requests
poetry install --no-interaction --no-root
poetry install --no-interaction --with=test --no-root

#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install library
run: poetry install --no-interaction
run: poetry install --no-interaction --with=test

- name: Set up Go
uses: actions/setup-go@v2
Expand Down Expand Up @@ -103,7 +103,6 @@ jobs:
run: |
export LD_LIBRARY_PATH=$PWD/TDengine/build/build/lib
export TDENGINE_URL=localhost:6041
poetry run pip install psutil pandas "numpy<2.0.0" shapely
poetry run pytest tests
- name: Build Artifacts
run: |
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/test-td-case.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4


- name: Build tools
- name: Setup build tools
run: |
sudo apt-get update -y
sudo apt-get install -y build-essential cmake libgeos-dev

sudo apt update -y
sudo apt install -y build-essential cmake \
libgeos-dev libjansson-dev libsnappy-dev liblzma-dev libz-dev \
zlib1g-dev pkg-config libssl-dev gawk

- name: Set up python
run: |
Expand All @@ -42,6 +43,7 @@ jobs:
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.5
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
Expand All @@ -61,13 +63,13 @@ jobs:
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
run: poetry install --no-interaction --with=test --no-root

#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install library
run: poetry install --no-interaction
run: poetry install --no-interaction --with=test

#----------------------------------------------
# build your TDengine 3.0
Expand All @@ -81,7 +83,7 @@ jobs:
if_false: '3.0'

- name: Checkout tdengine
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: "taosdata/TDengine"
path: "TDengine_v3"
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/test-ubuntu-2004.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,19 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4


- name: Build tools
- name: Setup build tools
run: |
sudo apt-get update -y
sudo apt-get install -y build-essential cmake libgeos-dev git libssl-dev libgflags2.2 libgflags-dev libsnappy-dev libjansson-dev

sudo apt update -y
sudo apt install -y build-essential cmake \
libgeos-dev libjansson-dev libsnappy-dev liblzma-dev libz-dev \
zlib1g-dev pkg-config libssl-dev gawk

- name: Set up python
run: |
python --version


- name: Cache Poetry
id: cache-poetry
uses: actions/[email protected]
Expand All @@ -42,6 +41,7 @@ jobs:
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.5
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
Expand All @@ -61,13 +61,13 @@ jobs:
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
run: poetry install --no-interaction --with=test --no-root

#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install library
run: poetry install --no-interaction
run: poetry install --no-interaction --with=test

#----------------------------------------------
# build your TDengine 3.0
Expand All @@ -81,11 +81,11 @@ jobs:
if_false: '3.0'

- name: Checkout tdengine
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: "taosdata/TDengine"
path: "TDengine_v3"
ref: '3.0'
ref: ${{ steps.determine-branch.outputs.value }}

- name: Build TDengine 3.0
run: |
Expand Down Expand Up @@ -125,7 +125,6 @@ jobs:
#source $VENV
export TDENGINE_URL=localhost:6041
curl -L -H "Authorization: Basic cm9vdDp0YW9zZGF0YQ==" -d "show databases" localhost:6041/rest/sql
poetry run pip install psutil pandas pytest-cov "numpy<2.0.0" shapely
poetry run pytest --cov-report term --cov-report html --cov-report xml --cov=taos --cov=taosrest --cov-append tests


Expand Down
59 changes: 31 additions & 28 deletions .github/workflows/test-ubuntu-2204.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v3

- name: Build tools
run: |
Expand All @@ -26,28 +26,6 @@ jobs:
run: |
sudo apt-get install -y python3 python3-pip python-is-python3

- name: Build TDengine 2.x
run: |
git clone --depth 1 https://github.com/taosdata/TDengine.git -b 2.6 TDengine_v2
cd TDengine_v2
git submodule update --depth 1 --init --recursive
mkdir build
cd build
cmake ../ -DBUILD_HTTP=false -DBUILD_JDBC=false -DBUILD_DEPENDENCY_TESTS=false -DCMAKE_INSTALL_PREFIX:PATH=`realpath ../../local/`
make -j14
cd ../../

- name: Start TDengine 2.x
run: |
tree TDengine_v2/build/build/
sudo mkdir -p /etc/taos/ || true
export C_INCLUDE_PATH=$PWD/TDengine_v2/build/build/bin
export LD_LIBRARY_PATH=$PWD/TDengine_v2/build/build/lib
mkdir -p /tmp/taos/v2/data /tmp/taos/log/v2
printf "dataDir /tmp/taos/v2/data\nlogDir /tmp/taos/v2/log\ndebugFlag 135\n" |sudo tee /etc/taos/taos.cfg
./TDengine_v2/build/build/bin/taosadapter &
./TDengine_v2/build/build/bin/taosd &

- name: Cache Poetry
id: cache-poetry
uses: actions/[email protected]
Expand All @@ -60,6 +38,7 @@ jobs:
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.5
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
Expand All @@ -78,20 +57,45 @@ jobs:
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
run: |
poetry install --no-interaction --no-root
poetry run pip install "numpy<2.0.0"

#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install library
run: poetry install --no-interaction
run: |
poetry install --no-interaction --with=test
poetry run pip install "numpy<2.0.0"

- name: Build TDengine 2.x
run: |
git clone --depth 1 https://github.com/taosdata/TDengine.git -b 2.6 TDengine_v2
cd TDengine_v2
git submodule update --depth 1 --init --recursive
mkdir build
cd build
cmake ../ -DBUILD_HTTP=false -DBUILD_JDBC=false -DBUILD_DEPENDENCY_TESTS=false -DCMAKE_INSTALL_PREFIX:PATH=`realpath ../../local/`
make -j14
cd ../../

- name: Start TDengine 2.x
run: |
tree TDengine_v2/build/build/
sudo mkdir -p /etc/taos/ || true
export C_INCLUDE_PATH=$PWD/TDengine_v2/build/build/bin
export LD_LIBRARY_PATH=$PWD/TDengine_v2/build/build/lib
mkdir -p /tmp/taos/v2/data /tmp/taos/log/v2
printf "dataDir /tmp/taos/v2/data\nlogDir /tmp/taos/v2/log\ndebugFlag 135\n" |sudo tee /etc/taos/taos.cfg
./TDengine_v2/build/build/bin/taosadapter &
./TDengine_v2/build/build/bin/taosd &

- name: Test 2.x
run: |
export LD_LIBRARY_PATH=$PWD/TDengine_v2/build/build/lib
#source $VENV
export TDENGINE_URL=localhost:6041
poetry run pip install psutil "numpy<2.0.0" pandas pytest-cov shapely
poetry run pytest tests --cov-report term --cov-report html --cov-report xml --cov=taos --cov=taosrest tests

- name: 'Upload taosd logs'
Expand Down Expand Up @@ -122,7 +126,7 @@ jobs:
with:
repository: "taosdata/TDengine"
path: "TDengine_v3"
ref: '3.0'
ref: ${{ steps.determine-branch.outputs.value }}

- name: Build TDengine 3.0
run: |
Expand Down Expand Up @@ -157,7 +161,6 @@ jobs:
#source $VENV
export TDENGINE_URL=localhost:6041
curl -L -H "Authorization: Basic cm9vdDp0YW9zZGF0YQ==" -d "show databases" localhost:6041/rest/sql
poetry run pip install psutil "numpy<2.0.0" pandas pytest-cov shapely
poetry run pytest --cov-report term --cov-report html --cov-report xml --cov=taos --cov=taosrest --cov-append tests


Expand Down
26 changes: 24 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ python = ">=3.6.2,<3.12"
pytz = "*"
iso8601 = "1.0.2"
requests = ">=2.27.1"
pytest-cov = "^4.0.0"


[tool.poetry.dependencies.taos-ws-py]
version = ">=0.3.0"
Expand All @@ -33,17 +33,39 @@ optional = true
[tool.poetry.extras]
ws = ["taos-ws-py"]

[tool.poetry.dev-dependencies]
[tool.poetry.group.dev]

[tool.poetry.group.dev.dependencies]
typing = "*"
pytest = [
{ version = "^4.6", python = ">=2.7,<3.0" },
{ version = "^6.2", python = ">=3.7,<4.0" },
]
pytest-cov = "^4.0.0"
mypy = { version = "^0.910", python = "^3.6" }
black = [{ version = ">=21.0", python = ">=3.6.2,<4.0" }]
sqlalchemy = { version = "^1.4", python = ">=3.6,<4.0" }
pandas = { version = ">=1.0", python = ">=3.8,<4.0" }
python-dotenv = { version = "0.20.0" }
toml = { version = ">=0.8.0", python = ">=3.7,<4.0" }
shapely = { version = ">=2.0.0", python = ">=3.7,<4.0" }

[tool.poetry.group.test]

[tool.poetry.group.test.dependencies]
typing = "*"
pytest = [
{ version = "^4.6", python = ">=2.7,<3.0" },
{ version = "^6.2", python = ">=3.7,<4.0" },
]
pytest-cov = "^4.0.0"
mypy = { version = "^0.910", python = "^3.6" }
black = [{ version = ">=21.0", python = ">=3.6.2,<4.0" }]
sqlalchemy = { version = "^1.4", python = ">=3.6,<4.0" }
pandas = { version = ">=1.0", python = ">=3.8,<4.0" }
python-dotenv = { version = "0.20.0" }
toml = { version = ">=0.8.0", python = ">=3.7,<4.0" }
shapely = { version = ">=2.0.0", python = ">=3.7,<4.0" }

[build-system]
requires = ["poetry-core>=1.0.5"]
Expand Down
Loading