diff --git a/datacompy/__init__.py b/datacompy/__init__.py index 7415483..8ca604a 100644 --- a/datacompy/__init__.py +++ b/datacompy/__init__.py @@ -18,7 +18,7 @@ Then extended to carry that functionality over to Spark Dataframes. """ -__version__ = "0.14.1" +__version__ = "0.14.2" import platform from warnings import warn diff --git a/datacompy/snowflake.py b/datacompy/snowflake.py index 19f6397..4441e5a 100644 --- a/datacompy/snowflake.py +++ b/datacompy/snowflake.py @@ -200,7 +200,7 @@ def _validate_dataframe(self, df_name: str, index: str) -> None: The "index" of the dataframe - df1 or df2. """ df = getattr(self, index) - if not isinstance(df, "sp.DataFrame"): + if not isinstance(df, sp.DataFrame): raise TypeError(f"{df_name} must be a valid sp.Dataframe") # force all columns to be non-case-sensitive diff --git a/docs/source/developer_instructions.rst b/docs/source/developer_instructions.rst index 9f6becb..29c8cdc 100644 --- a/docs/source/developer_instructions.rst +++ b/docs/source/developer_instructions.rst @@ -43,6 +43,24 @@ Run ``python -m pytest`` to run all unittests defined in the subfolder `pytest-runner `_. +Snowflake testing +----------------- +Testing the Snowflake compare requires the use of a Snowflake cluster, as Snowflake does not support local running. +This means that Snowflake tests do not get run in CICD, and changes to the Snowflake Compare must be validated by +the process of running these tests locally. + +Note that you must have the following environment variables set in order to instantiate a Snowflake Connection (for testing purposes): + +- "SF_ACCOUNT": with your SF account +- "SF_UID": with your SF username +- "SF_PWD": with your SF password +- "SF_WAREHOUSE": with your desired SF warehouse +- "SF_DATABASE": with a valid database with which you have access +- "SF_SCHEMA": with a valid schema belonging to the provided database + +Once these are set, you are free to run the suite of Snowflake tests. + + Management of Requirements -------------------------- @@ -130,4 +148,4 @@ Finally upload to PyPi:: twine upload --repository-url https://test.pypi.org/legacy/ dist/* # real pypi - twine upload dist/* \ No newline at end of file + twine upload dist/*