Skip to content

Commit

Permalink
change makefile to include snowflake doctest
Browse files Browse the repository at this point in the history
Signed-off-by: tdhooghe <[email protected]>
  • Loading branch information
tdhooghe committed Oct 22, 2024
1 parent 57ccd10 commit f09c96e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,26 @@ dataset-tests: dataset-doctests

extra_pytest_args-no-spark=--ignore kedro_datasets/databricks --ignore kedro_datasets/spark
extra_pytest_args=

dataset-doctest%:
if [ "${*}" != 's-no-spark' ] && [ "${*}" != 's' ]; then \
echo "make: *** No rule to make target \`${@}\`. Stop."; \
exit 2; \
fi; \
\
\
# Check the Python version
PYTHON_VERSION=$$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'); \
IGNORE_SNOWPARK=""; \
if [ "$$PYTHON_VERSION" = "3.12" ]; then \
IGNORE_SNOWPARK="--ignore kedro_datasets/snowflake/snowpark_dataset.py"; \
fi; \
\
# The ignored datasets below require complicated setup with cloud/database clients which is overkill for the doctest examples.
cd kedro-datasets && pytest kedro_datasets --doctest-modules --doctest-continue-on-failure --no-cov \
--ignore kedro_datasets/pandas/gbq_dataset.py \
--ignore kedro_datasets/partitions/partitioned_dataset.py \
--ignore kedro_datasets/redis/redis_dataset.py \
--ignore kedro_datasets/spark/spark_hive_dataset.py \
--ignore kedro_datasets/spark/spark_jdbc_dataset.py \
$$IGNORE_SNOWPARK \
$(extra_pytest_arg${*})

0 comments on commit f09c96e

Please sign in to comment.