From 8e2b1772d12f34aac6d45f9debc0181422dcb802 Mon Sep 17 00:00:00 2001 From: Rosie Wood Date: Thu, 26 Feb 2026 13:36:49 +0000 Subject: [PATCH 1/2] fix text spotting tests --- .github/workflows/mr_ci_text_spotting.yml | 28 +++++++++++++++-------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/mr_ci_text_spotting.yml b/.github/workflows/mr_ci_text_spotting.yml index 1927fabe..9bbffc55 100644 --- a/.github/workflows/mr_ci_text_spotting.yml +++ b/.github/workflows/mr_ci_text_spotting.yml @@ -16,7 +16,7 @@ jobs: all_tests: strategy: matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] fail-fast: false env: # point datasets to ~/.torch so it's cached by CI @@ -29,6 +29,16 @@ jobs: with: fetch-depth: 2 + - name: Free disk space (Ubuntu) + if: runner.os == 'Linux' + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/ghc + sudo rm -rf /opt/hostedtoolcache/CodeQL + sudo apt-get clean + df -h + - name: Set up Python 3.11 uses: actions/setup-python@v2 with: @@ -46,14 +56,14 @@ jobs: - name: Install dependencies run: | - python -m pip install wheel - python -m pip install numpy==1.26.4 torch==2.2.2 torchvision==0.17.2 -f https://download.pytorch.org/whl/torch_stable.html - python -m pip install ".[dev]" - python -m pip install pytest-cov - python -m pip install --no-build-isolation 'git+https://github.com/facebookresearch/detectron2.git' - python -m pip install --no-build-isolation 'git+https://github.com/maps-as-data/DeepSolo.git' - python -m pip install --no-build-isolation 'git+https://github.com/maps-as-data/DPText-DETR.git' - python -m pip install --no-build-isolation 'git+https://github.com/maps-as-data/MapTextPipeline.git' + python -m pip install --no-cache-dir wheel + python -m pip install --no-cache-dir numpy==1.26.4 torch==2.2.2 torchvision==0.17.2 -f https://download.pytorch.org/whl/torch_stable.html + python -m pip install --no-cache-dir ".[dev]" + python -m pip install --no-cache-dir pytest-cov + python -m pip install --no-cache-dir --no-build-isolation 'git+https://github.com/facebookresearch/detectron2.git' + python -m pip install --no-cache-dir --no-build-isolation 'git+https://github.com/maps-as-data/DeepSolo.git' + python -m pip install --no-cache-dir --no-build-isolation 'git+https://github.com/maps-as-data/DPText-DETR.git' + python -m pip install --no-cache-dir --no-build-isolation 'git+https://github.com/maps-as-data/MapTextPipeline.git' - name: Clone DPText-DETR run: | From 3371e885dec3d1de49b0aa43acdf664d835d8dfd Mon Sep 17 00:00:00 2001 From: Rosie Wood Date: Thu, 26 Feb 2026 14:56:56 +0000 Subject: [PATCH 2/2] use pyogrio engine for geojson --- tests/test_text_spotting/test_deepsolo_runner.py | 6 ++++-- tests/test_text_spotting/test_dptext_runner.py | 6 ++++-- tests/test_text_spotting/test_maptext_runner.py | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/test_text_spotting/test_deepsolo_runner.py b/tests/test_text_spotting/test_deepsolo_runner.py index 97248467..64048eb8 100644 --- a/tests/test_text_spotting/test_deepsolo_runner.py +++ b/tests/test_text_spotting/test_deepsolo_runner.py @@ -146,8 +146,10 @@ def test_deepsolo_init_tsv(init_dataframes, tmp_path): def test_deepsolo_init_geojson(init_dataframes, tmp_path, mock_response): parent_df, patch_df = init_dataframes - parent_df.to_file(f"{tmp_path}/parent_df.geojson", driver="GeoJSON") - patch_df.to_file(f"{tmp_path}/patch_df.geojson", driver="GeoJSON") + parent_df.to_file( + f"{tmp_path}/parent_df.geojson", driver="GeoJSON", engine="pyogrio" + ) + patch_df.to_file(f"{tmp_path}/patch_df.geojson", driver="GeoJSON", engine="pyogrio") runner = DeepSoloRunner( f"{tmp_path}/patch_df.geojson", parent_df=f"{tmp_path}/parent_df.geojson", diff --git a/tests/test_text_spotting/test_dptext_runner.py b/tests/test_text_spotting/test_dptext_runner.py index ed1a231d..ff1e4c2f 100644 --- a/tests/test_text_spotting/test_dptext_runner.py +++ b/tests/test_text_spotting/test_dptext_runner.py @@ -146,8 +146,10 @@ def test_dptext_init_tsv(init_dataframes, tmp_path): def test_dptext_init_geojson(init_dataframes, tmp_path, mock_response): parent_df, patch_df = init_dataframes - parent_df.to_file(f"{tmp_path}/parent_df.geojson", driver="GeoJSON") - patch_df.to_file(f"{tmp_path}/patch_df.geojson", driver="GeoJSON") + parent_df.to_file( + f"{tmp_path}/parent_df.geojson", driver="GeoJSON", engine="pyogrio" + ) + patch_df.to_file(f"{tmp_path}/patch_df.geojson", driver="GeoJSON", engine="pyogrio") runner = DPTextDETRRunner( f"{tmp_path}/patch_df.geojson", parent_df=f"{tmp_path}/parent_df.geojson", diff --git a/tests/test_text_spotting/test_maptext_runner.py b/tests/test_text_spotting/test_maptext_runner.py index 10b32424..897e6a3a 100644 --- a/tests/test_text_spotting/test_maptext_runner.py +++ b/tests/test_text_spotting/test_maptext_runner.py @@ -145,8 +145,10 @@ def test_maptext_init_tsv(init_dataframes, tmp_path): def test_maptext_init_geojson(init_dataframes, tmp_path, mock_response): parent_df, patch_df = init_dataframes - parent_df.to_file(f"{tmp_path}/parent_df.geojson", driver="GeoJSON") - patch_df.to_file(f"{tmp_path}/patch_df.geojson", driver="GeoJSON") + parent_df.to_file( + f"{tmp_path}/parent_df.geojson", driver="GeoJSON", engine="pyogrio" + ) + patch_df.to_file(f"{tmp_path}/patch_df.geojson", driver="GeoJSON", engine="pyogrio") runner = MapTextRunner( f"{tmp_path}/patch_df.geojson", parent_df=f"{tmp_path}/parent_df.geojson",