Skip to content

Commit

Permalink
fix(datasets): Investigate ManagedTableDataset test failures (#671)
Browse files Browse the repository at this point in the history
* revert ignore databricks test and coverage

* Update managed_table_dataset.py

* attempt a fix

* revert

Signed-off-by: Sajid Alam <[email protected]>

* Update managed_table_dataset.py

Signed-off-by: Sajid Alam <[email protected]>

* Update managed_table_dataset.py

Signed-off-by: Sajid Alam <[email protected]>

* Update managed_table_dataset.py

Signed-off-by: Sajid Alam <[email protected]>

* fix tests

Signed-off-by: Sajid Alam <[email protected]>

* revert

Signed-off-by: Sajid Alam <[email protected]>

* revert test

Signed-off-by: Sajid Alam <[email protected]>

* add compatability

Signed-off-by: Sajid Alam <[email protected]>

* Update test_managed_table_dataset.py

Signed-off-by: Sajid Alam <[email protected]>

* Update managed_table_dataset.py

Signed-off-by: Sajid Alam <[email protected]>

* Update test_managed_table_dataset.py

Signed-off-by: Sajid Alam <[email protected]>

* Update test_managed_table_dataset.py

Signed-off-by: Sajid Alam <[email protected]>

* debugging

Signed-off-by: Sajid Alam <[email protected]>

* update tests and save method

Signed-off-by: Sajid Alam <[email protected]>

* lint

Signed-off-by: Sajid Alam <[email protected]>

* fix mypy

Signed-off-by: Sajid Alam <[email protected]>

* test pyspark 3.4 and above

Signed-off-by: Sajid Alam <[email protected]>

* Update pyproject.toml

Signed-off-by: Sajid Alam <[email protected]>

* try DF.items in stead

Signed-off-by: Sajid Alam <[email protected]>

* Update managed_table_dataset.py

Signed-off-by: Sajid Alam <[email protected]>

* Update managed_table_dataset.py

Signed-off-by: Sajid Alam <[email protected]>

---------

Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
  • Loading branch information
SajidAlamQB authored Jun 6, 2024
1 parent ca46a05 commit 297a648
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test:

# Run test_tensorflow_model_dataset separately, because these tests are flaky when run as part of the full test-suite
dataset-tests: dataset-doctests
cd kedro-datasets && pytest tests --cov-config pyproject.toml --numprocesses 4 --dist loadfile --ignore tests/databricks --ignore tests/tensorflow
cd kedro-datasets && pytest tests --cov-config pyproject.toml --numprocesses 4 --dist loadfile --ignore tests/tensorflow
cd kedro-datasets && pytest tests/tensorflow/test_tensorflow_model_dataset.py --no-cov

extra_pytest_args-no-spark=--ignore kedro_datasets/databricks --ignore kedro_datasets/spark
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from kedro_datasets.spark.spark_dataset import _get_spark

logger = logging.getLogger(__name__)
pd.DataFrame.iteritems = pd.DataFrame.items


@dataclass(frozen=True)
Expand Down
2 changes: 1 addition & 1 deletion kedro-datasets/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ version = {attr = "kedro_datasets.__version__"}
fail_under = 100
show_missing = true
# temporarily ignore kedro_datasets/__init__.py in coverage report
omit = ["tests/*", "kedro_datasets/holoviews/*", "kedro_datasets/netcdf/*", "kedro_datasets/snowflake/*", "kedro_datasets/tensorflow/*", "kedro_datasets/__init__.py", "kedro_datasets/conftest.py", "kedro_datasets/databricks/*"]
omit = ["tests/*", "kedro_datasets/holoviews/*", "kedro_datasets/netcdf/*", "kedro_datasets/snowflake/*", "kedro_datasets/tensorflow/*", "kedro_datasets/__init__.py", "kedro_datasets/conftest.py"]
exclude_also = ["raise NotImplementedError", "if TYPE_CHECKING:"]

[tool.pytest.ini_options]
Expand Down

0 comments on commit 297a648

Please sign in to comment.