This is an automated email from the ASF dual-hosted git repository. haonan pushed a commit to branch python-wper in repository https://gitbox.apache.org/repos/asf/tsfile.git
commit 7e899c58d46f2ba39a46c5f23bd845c55adee0c0 Author: HTHou <[email protected]> AuthorDate: Fri Jun 21 21:17:22 2024 +0800 try msvc --- .github/workflows/unit-test.yml | 3 ++- python/pom.xml | 9 +-------- python/setup.py | 3 +-- python/test.py | 12 ++---------- 4 files changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 454ef7cc..77ce64b2 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -8,6 +8,7 @@ on: branches: - develop - 'rel/*' + - python-wper pull_request: branches: - develop @@ -79,7 +80,7 @@ jobs: if: ${{ matrix.os == 'windows-latest'}} uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.12' # Run the actual maven build including all unit- and integration-tests. - name: Build and test with Maven (All others) diff --git a/python/pom.xml b/python/pom.xml index df0fdcc8..af8d0924 100644 --- a/python/pom.xml +++ b/python/pom.xml @@ -91,13 +91,6 @@ </arguments> </configuration> </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>1.6.0</version> - <executions> <execution> <id>compile-python-code</id> <phase>compile</phase> @@ -110,7 +103,7 @@ <argument>setup.py</argument> <argument>build_ext</argument> <argument>--inplace</argument> - <argument>${python.compiler.argument}</argument> +<!-- <argument>${python.compiler.argument}</argument>--> </arguments> </configuration> </execution> diff --git a/python/setup.py b/python/setup.py index e61b3151..2ffc6a5a 100644 --- a/python/setup.py +++ b/python/setup.py @@ -30,7 +30,7 @@ def copy_lib_files(system, source_dir, target_dir, file_ext, version=None): lib_file_name = f"libtsfile.{file_ext}.{version}" else: lib_file_name = f"libtsfile.{file_ext}" - + source = os.path.join(source_dir, lib_file_name) target = os.path.join(target_dir, lib_file_name) shutil.copyfile(source, target) @@ -82,7 +82,6 @@ if platform.system() == "Windows": libraries=["tsfile"], library_dirs=[libtsfile_dir], include_dirs=[include_dir, np.get_include()], - extra_compile_args=["-std=c++11"], language="c++" ) ] diff --git a/python/test.py b/python/test.py index c7040edf..53fa8d43 100644 --- a/python/test.py +++ b/python/test.py @@ -17,20 +17,12 @@ # import os -import platform import shutil -import glob import unittest as ut import numpy as np import pandas as pd -if platform.system() == "Windows": - extra_dll_dir = os.path.join(os.path.dirname(__file__), "tsfile") - os.add_dll_directory(extra_dll_dir) - print(extra_dll_dir) - print(glob.glob(extra_dll_dir + '/*')) - import tsfile as ts TABLE_NAME = "test_table" @@ -57,7 +49,7 @@ def test_write_tsfile(): df = pd.DataFrame({"Time": time, "level": level, "num": num}) with ut.TestCase().assertRaises(TypeError): ts.write_tsfile(DATA_PATH + "/wrong_time_type.tsfile", TABLE_NAME, df)\ - + # TXT is not support yet time = np.arange(1, 1001, dtype=np.int64) text = np.random.choice(["a", "b", "c"], 1000) @@ -86,7 +78,7 @@ def test_read_tsfile(): with ut.TestCase().assertRaises(ValueError): ts.read_tsfile(DATA_PATH + "/empty.tsfile", TABLE_NAME, ["level", "num"]) - + FILE_NAME= DATA_PATH + "/full_datatypes.tsfile" # test read data ## 1. read all data
