From ad4a3edbf7c02236dd908edc93238c02d6677ad6 Mon Sep 17 00:00:00 2001 From: SWHL Date: Thu, 12 Sep 2024 09:31:45 +0800 Subject: [PATCH] ci: fix unit testing error --- .github/workflows/lineless_table_rec.yml | 6 +++--- .github/workflows/wired_table_rec.yml | 13 +++---------- lineless_table_rec/main.py | 1 + 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/lineless_table_rec.yml b/.github/workflows/lineless_table_rec.yml index 84a1c39..fdd84e5 100644 --- a/.github/workflows/lineless_table_rec.yml +++ b/.github/workflows/lineless_table_rec.yml @@ -15,10 +15,10 @@ jobs: - name: Pull latest code uses: actions/checkout@v3 - - name: Set up Python 3.7 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: '3.7' + python-version: '3.10' architecture: 'x64' - name: Display Python version @@ -33,7 +33,7 @@ jobs: unzip lineless_table_rec_models.zip mv lineless_table_rec_models/*.onnx lineless_table_rec/models/ - pytest tests/test_lore.py + pytest tests/test_lineless_table_rec.py GenerateWHL_PushPyPi: needs: UnitTesting diff --git a/.github/workflows/wired_table_rec.yml b/.github/workflows/wired_table_rec.yml index 0414b39..68fbeef 100644 --- a/.github/workflows/wired_table_rec.yml +++ b/.github/workflows/wired_table_rec.yml @@ -15,10 +15,10 @@ jobs: - name: Pull latest code uses: actions/checkout@v3 - - name: Set up Python 3.7 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: '3.7' + python-version: '3.10' architecture: 'x64' - name: Display Python version @@ -33,7 +33,7 @@ jobs: unzip wired_table_rec_models.zip mv wired_table_rec_models/*.onnx wired_table_rec/models/ - pytest tests/test_wired.py + pytest tests/test_wired_table_rec.py GenerateWHL_PushPyPi: needs: UnitTesting @@ -60,13 +60,6 @@ jobs: python setup_wired.py bdist_wheel "${{ github.event.head_commit.message }}" - # - name: Publish distribution 📦 to Test PyPI - # uses: pypa/gh-action-pypi-publish@v1.5.0 - # with: - # password: ${{ secrets.TEST_PYPI_API_TOKEN }} - # repository_url: https://test.pypi.org/legacy/ - # packages_dir: dist/ - - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@v1.5.0 with: diff --git a/lineless_table_rec/main.py b/lineless_table_rec/main.py index 4d16df2..8741c82 100644 --- a/lineless_table_rec/main.py +++ b/lineless_table_rec/main.py @@ -199,6 +199,7 @@ def handle_overlap_row_col(self, res): # 创建一个二维数组来存储 sorted_logi_points 中的元素 grid = [[None] * max_col for _ in range(max_row)] + # 将 sorted_logi_points 中的元素填充到 grid 中 deleted_idx = set() for i, dict_res in enumerate(res):