From 1cc7fec7435a01d47d1223c908712a55f91ae61d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 5 Dec 2024 11:48:24 +0000 Subject: [PATCH] Run Excel tests on Spark 3.5.3 --- .github/workflows/data/local-fs/matrix.yml | 3 +-- requirements/tests/spark-3.5.1.txt | 5 ----- tests/fixtures/spark.py | 13 +++++++++++-- 3 files changed, 12 insertions(+), 9 deletions(-) delete mode 100644 requirements/tests/spark-3.5.1.txt diff --git a/.github/workflows/data/local-fs/matrix.yml b/.github/workflows/data/local-fs/matrix.yml index 365d1d3c9..c34ba3a50 100644 --- a/.github/workflows/data/local-fs/matrix.yml +++ b/.github/workflows/data/local-fs/matrix.yml @@ -20,8 +20,7 @@ min_excel: &min_excel os: ubuntu-latest max: &max - # Excel pagkage currently supports Spark 3.5.1 max - spark-version: 3.5.1 + spark-version: 3.5.3 pydantic-version: 2 python-version: '3.12' java-version: 20 diff --git a/requirements/tests/spark-3.5.1.txt b/requirements/tests/spark-3.5.1.txt deleted file mode 100644 index d1e812f7a..000000000 --- a/requirements/tests/spark-3.5.1.txt +++ /dev/null @@ -1,5 +0,0 @@ -numpy>=1.16 -pandas>=1.0 -pyarrow>=1.0 -pyspark==3.5.1 -sqlalchemy diff --git a/tests/fixtures/spark.py b/tests/fixtures/spark.py index 7a9b812a4..760b0e4f9 100644 --- a/tests/fixtures/spark.py +++ b/tests/fixtures/spark.py @@ -104,8 +104,17 @@ def maven_packages(request): packages.extend(MongoDB.get_packages(spark_version=str(pyspark_version))) if "excel" in markers: - # There is no Excel files support for Spark less than 3.2 - packages.extend(Excel.get_packages(spark_version=str(pyspark_version))) + # There is no Excel files support for Spark less than 3.2. + # There are package versions only for specific Spark versions, + # see https://github.com/nightscape/spark-excel/issues/902 + if pyspark_version.minor == 2: + packages.extend(Excel.get_packages(spark_version="3.2.4")) + elif pyspark_version.minor == 3: + packages.extend(Excel.get_packages(spark_version="3.3.4")) + elif pyspark_version.minor == 4: + packages.extend(Excel.get_packages(spark_version="3.4.3")) + elif pyspark_version.minor == 5: + packages.extend(Excel.get_packages(spark_version="3.5.1")) return packages