From 288e4ec52a3773f5fd3d864b6aa8f7d9f4aded9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=20Anast=C3=A1cio?= Date: Sat, 27 Jul 2024 17:21:43 -0300 Subject: [PATCH] Treat warning as error in CI/Dev This will help us avoid propagating warnings to our users, as occurred in #971. --- pyproject.toml | 17 +++++++++-------- tests/catalog/test_sql.py | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index efa77cfdab..1fd1b5c275 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ classifiers = [ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11" + "Programming Language :: Python :: 3.11", ] packages = [ { include = "pyiceberg" }, @@ -37,7 +37,10 @@ packages = [ { from = "vendor", include = "hive_metastore" }, { include = "tests", format = "sdist" }, { include = "Makefile", format = "sdist" }, - { include = "NOTICE", format = ["sdist", "wheel"] } + { include = "NOTICE", format = [ + "sdist", + "wheel", + ] }, ] include = [ { path = "dev", format = "sdist" }, @@ -62,8 +65,8 @@ pyarrow = { version = ">=9.0.0,<18.0.0", optional = true } pandas = { version = ">=1.0.0,<3.0.0", optional = true } duckdb = { version = ">=0.5.0,<2.0.0", optional = true } ray = [ - { version = "==2.10.0", python = "<3.9", optional = true}, - { version = ">=2.10.0,<3.0.0", python = ">=3.9", optional = true} + { version = "==2.10.0", python = "<3.9", optional = true }, + { version = ">=2.10.0,<3.0.0", python = ">=3.9", optional = true }, ] python-snappy = { version = ">=0.6.0,<1.0.0", optional = true } thrift = { version = ">=0.13.0,<1.0.0", optional = true } @@ -599,13 +602,11 @@ markers = [ "s3: marks a test as requiring access to s3 compliant storage (use with --aws-access-key-id, --aws-secret-access-key, and --endpoint args)", "adlfs: marks a test as requiring access to adlfs compliant storage (use with --adlfs.account-name, --adlfs.account-key, and --adlfs.endpoint args)", "integration: marks integration tests against Apache Spark", - "gcs: marks a test as requiring access to gcs compliant storage (use with --gs.token, --gs.project, and --gs.endpoint)" + "gcs: marks a test as requiring access to gcs compliant storage (use with --gs.token, --gs.project, and --gs.endpoint)", ] # Turns a warning into an error -#filterwarnings = [ -# "error" -#] +filterwarnings = ["error"] [tool.black] line-length = 130 diff --git a/tests/catalog/test_sql.py b/tests/catalog/test_sql.py index 8046ac7a75..a81440aafc 100644 --- a/tests/catalog/test_sql.py +++ b/tests/catalog/test_sql.py @@ -355,7 +355,7 @@ def test_write_pyarrow_schema(catalog: SqlCatalog, table_identifier: Identifier) namespace = Catalog.namespace_from(table_identifier_nocatalog) catalog.create_namespace(namespace) table = catalog.create_table(table_identifier, pyarrow_table.schema) - table.overwrite(pyarrow_table) + table.append(pyarrow_table) @pytest.mark.parametrize(