From 4d38dc13eedec7b2a879e1f9875c4b4d75998ba6 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: Tue, 12 Nov 2024 15:00:27 +0000 Subject: [PATCH 1/7] [DOP-21408] Bump version --- onetl/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onetl/VERSION b/onetl/VERSION index 26acbf08..aa22d3ce 100644 --- a/onetl/VERSION +++ b/onetl/VERSION @@ -1 +1 @@ -0.12.2 +0.12.3 From 4076153d1a210bc7c76cd19f0266a47692fb492b 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, 14 Nov 2024 08:28:14 +0000 Subject: [PATCH 2/7] Add PyPI downloads badge --- README.rst | 25 ++++++++++++++++++------- setup.py | 2 +- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index 79561c1d..e873e565 100644 --- a/README.rst +++ b/README.rst @@ -3,24 +3,35 @@ onETL ===== -|Repo Status| |PyPI| |PyPI License| |PyPI Python Version| -|Documentation| |Build Status| |Coverage| |pre-commit.ci| +|Repo Status| |PyPI Latest Release| |PyPI License| |PyPI Python Version| |PyPI Downloads| +|Documentation| |CI Status| |Test Coverage| |pre-commit.ci Status| .. |Repo Status| image:: https://www.repostatus.org/badges/latest/active.svg + :alt: Repo status - Active :target: https://github.com/MobileTeleSystems/onetl -.. |PyPI| image:: https://img.shields.io/pypi/v/onetl +.. |PyPI Latest Release| image:: https://img.shields.io/pypi/v/onetl + :alt: PyPI - Latest Release :target: https://pypi.org/project/onetl/ .. |PyPI License| image:: https://img.shields.io/pypi/l/onetl.svg + :alt: PyPI - License :target: https://github.com/MobileTeleSystems/onetl/blob/develop/LICENSE.txt .. |PyPI Python Version| image:: https://img.shields.io/pypi/pyversions/onetl.svg - :target: https://badge.fury.io/py/onetl + :alt: PyPI - Python Version + :target: https://pypi.org/project/onetl/ +.. |PyPI Downloads| image:: https://img.shields.io/pypi/dm/onetl + :alt: PyPI - Downloads + :target: https://pypi.org/project/onetl/ .. |Documentation| image:: https://readthedocs.org/projects/onetl/badge/?version=stable + :alt: Documentation - ReadTheDocs :target: https://onetl.readthedocs.io/ -.. |Build Status| image:: https://github.com/MobileTeleSystems/onetl/workflows/Tests/badge.svg +.. |CI Status| image:: https://github.com/MobileTeleSystems/onetl/workflows/Tests/badge.svg + :alt: Github Actions - latest CI build status :target: https://github.com/MobileTeleSystems/onetl/actions -.. |Coverage| image:: https://codecov.io/gh/MobileTeleSystems/onetl/branch/develop/graph/badge.svg?token=RIO8URKNZJ +.. |Test Coverage| image:: https://codecov.io/gh/MobileTeleSystems/onetl/branch/develop/graph/badge.svg?token=RIO8URKNZJ + :alt: Test coverage - percent :target: https://codecov.io/gh/MobileTeleSystems/onetl -.. |pre-commit.ci| image:: https://results.pre-commit.ci/badge/github/MobileTeleSystems/onetl/develop.svg +.. |pre-commit.ci Status| image:: https://results.pre-commit.ci/badge/github/MobileTeleSystems/onetl/develop. + :alt: pre-commit.ci - status :target: https://results.pre-commit.ci/latest/github/MobileTeleSystems/onetl/develop |Logo| diff --git a/setup.py b/setup.py index 2c1126f0..efadc252 100644 --- a/setup.py +++ b/setup.py @@ -64,7 +64,7 @@ def parse_requirements(file: Path) -> list[str]: license_files=("LICENSE.txt",), url="https://github.com/MobileTeleSystems/onetl", classifiers=[ - "Development Status :: 3 - Alpha", + "Development Status :: 4 - Beta", "Framework :: Pydantic", "Framework :: Pydantic :: 1", "Framework :: Pydantic :: 2", From 82b231466c927e376bebcb836c59e3f8fecc6e74 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, 14 Nov 2024 08:29:48 +0000 Subject: [PATCH 3/7] Fix pre-commit.ci badge --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index e873e565..ac5f550a 100644 --- a/README.rst +++ b/README.rst @@ -30,7 +30,7 @@ onETL .. |Test Coverage| image:: https://codecov.io/gh/MobileTeleSystems/onetl/branch/develop/graph/badge.svg?token=RIO8URKNZJ :alt: Test coverage - percent :target: https://codecov.io/gh/MobileTeleSystems/onetl -.. |pre-commit.ci Status| image:: https://results.pre-commit.ci/badge/github/MobileTeleSystems/onetl/develop. +.. |pre-commit.ci Status| image:: https://results.pre-commit.ci/badge/github/MobileTeleSystems/onetl/develop.svg :alt: pre-commit.ci - status :target: https://results.pre-commit.ci/latest/github/MobileTeleSystems/onetl/develop From ec2ac08de88a7b2c38c78f7c2762cb073236ce04 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 06:12:24 +0000 Subject: [PATCH 4/7] Bump the github-actions group with 2 updates Bumps the github-actions group with 2 updates: [mikefarah/yq](https://github.com/mikefarah/yq) and [codecov/codecov-action](https://github.com/codecov/codecov-action). Updates `mikefarah/yq` from 4.44.3 to 4.44.5 - [Release notes](https://github.com/mikefarah/yq/releases) - [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt) - [Commits](https://github.com/mikefarah/yq/compare/v4.44.3...v4.44.5) Updates `codecov/codecov-action` from 4 to 5 - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4...v5) --- updated-dependencies: - dependency-name: mikefarah/yq dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/get-matrix.yml | 38 ++++++++++++++++---------------- .github/workflows/tests.yml | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/get-matrix.yml b/.github/workflows/get-matrix.yml index c169bc2d..196deb68 100644 --- a/.github/workflows/get-matrix.yml +++ b/.github/workflows/get-matrix.yml @@ -154,7 +154,7 @@ jobs: - name: Get Core matrix id: matrix-core - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/core/matrix.yml @@ -184,7 +184,7 @@ jobs: - name: Get Clickhouse matrix id: matrix-clickhouse - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/clickhouse/matrix.yml @@ -214,7 +214,7 @@ jobs: - name: Get Greenplum matrix id: matrix-greenplum - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/greenplum/matrix.yml @@ -244,7 +244,7 @@ jobs: - name: Get Hive matrix id: matrix-hive - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/hive/matrix.yml @@ -274,7 +274,7 @@ jobs: - name: Get Kafka matrix id: matrix-kafka - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/kafka/matrix.yml @@ -304,7 +304,7 @@ jobs: - name: Get LocalFS matrix id: matrix-local-fs - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/local-fs/matrix.yml @@ -334,7 +334,7 @@ jobs: - name: Get MongoDB matrix id: matrix-mongodb - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/mongodb/matrix.yml @@ -364,7 +364,7 @@ jobs: - name: Get MSSQL matrix id: matrix-mssql - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/mssql/matrix.yml @@ -394,7 +394,7 @@ jobs: - name: Get MySQL matrix id: matrix-mysql - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/mysql/matrix.yml @@ -424,7 +424,7 @@ jobs: - name: Get Oracle matrix id: matrix-oracle - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/oracle/matrix.yml @@ -454,7 +454,7 @@ jobs: - name: Get Postgres matrix id: matrix-postgres - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/postgres/matrix.yml @@ -484,7 +484,7 @@ jobs: - name: Get Teradata matrix id: matrix-teradata - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/teradata/matrix.yml @@ -514,7 +514,7 @@ jobs: - name: Get FTP matrix id: matrix-ftp - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/ftp/matrix.yml @@ -544,7 +544,7 @@ jobs: - name: Get FTPS matrix id: matrix-ftps - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/ftps/matrix.yml @@ -574,7 +574,7 @@ jobs: - name: Get HDFS matrix id: matrix-hdfs - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/hdfs/matrix.yml @@ -604,7 +604,7 @@ jobs: - name: Get S3 matrix id: matrix-s3 - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/s3/matrix.yml @@ -634,7 +634,7 @@ jobs: - name: Get SFTP matrix id: matrix-sftp - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/sftp/matrix.yml @@ -664,7 +664,7 @@ jobs: - name: Get Samba matrix id: matrix-samba - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/samba/matrix.yml @@ -694,6 +694,6 @@ jobs: - name: Get WebDAV matrix id: matrix-webdav - uses: mikefarah/yq@v4.44.3 + uses: mikefarah/yq@v4.44.5 with: cmd: yq -o=json '.matrix' .github/workflows/data/webdav/matrix.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fcd6352a..279b9661 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -392,7 +392,7 @@ jobs: run: ./combine_coverage.sh - name: Check coverage - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./reports/coverage.xml From 4b1cde73045dcec5aa4fa98b256c4935ca7a93a8 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, 21 Nov 2024 12:44:20 +0000 Subject: [PATCH 5/7] [DOP-21634] Fix redundant changelog entries --- docs/changelog/next_release/+.dependency.rst | 1 - docs/changelog/next_release/+.doc.1.rst | 1 - docs/changelog/next_release/+.improvement.1.rst | 1 - docs/changelog/next_release/316.bugfix.1.rst | 1 - docs/changelog/next_release/316.bugfix.2.rst | 1 - 5 files changed, 5 deletions(-) delete mode 100644 docs/changelog/next_release/+.dependency.rst delete mode 100644 docs/changelog/next_release/+.doc.1.rst delete mode 100644 docs/changelog/next_release/+.improvement.1.rst delete mode 100644 docs/changelog/next_release/316.bugfix.1.rst delete mode 100644 docs/changelog/next_release/316.bugfix.2.rst diff --git a/docs/changelog/next_release/+.dependency.rst b/docs/changelog/next_release/+.dependency.rst deleted file mode 100644 index 33ffb4ee..00000000 --- a/docs/changelog/next_release/+.dependency.rst +++ /dev/null @@ -1 +0,0 @@ -Allow using `etl-entities==2.4.0 `_. diff --git a/docs/changelog/next_release/+.doc.1.rst b/docs/changelog/next_release/+.doc.1.rst deleted file mode 100644 index 5e1a4f3e..00000000 --- a/docs/changelog/next_release/+.doc.1.rst +++ /dev/null @@ -1 +0,0 @@ -Fix links to MSSQL date & time type documentation. diff --git a/docs/changelog/next_release/+.improvement.1.rst b/docs/changelog/next_release/+.improvement.1.rst deleted file mode 100644 index e80ec742..00000000 --- a/docs/changelog/next_release/+.improvement.1.rst +++ /dev/null @@ -1 +0,0 @@ -Change Spark ``jobDescription`` for DBReader & FileDFReader from ``DBReader.run() -> Connection`` to ``Connection -> DBReader.run()``. diff --git a/docs/changelog/next_release/316.bugfix.1.rst b/docs/changelog/next_release/316.bugfix.1.rst deleted file mode 100644 index 88bad047..00000000 --- a/docs/changelog/next_release/316.bugfix.1.rst +++ /dev/null @@ -1 +0,0 @@ -Fix ``log_hwm`` result for ``KeyValueIntHWM`` (used by Kafka). diff --git a/docs/changelog/next_release/316.bugfix.2.rst b/docs/changelog/next_release/316.bugfix.2.rst deleted file mode 100644 index 485a7345..00000000 --- a/docs/changelog/next_release/316.bugfix.2.rst +++ /dev/null @@ -1 +0,0 @@ -Fix ``log_collection`` hiding values of ``Kafka.addresses`` in logs with ``INFO`` level. From 0ac6a3c901de4fc4966976c78320adcfc4e891af 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, 21 Nov 2024 12:45:39 +0000 Subject: [PATCH 6/7] [DOP-21634] Make DBReader and DBWriter table name requirements less strict --- .github/workflows/test-mssql.yml | 7 +++++++ docs/changelog/0.12.3.rst | 7 +++++++ docs/changelog/index.rst | 1 + .../dialect_mixins/support_name_with_schema_only.py | 2 +- .../test_db_reader_unit/test_clickhouse_reader_unit.py | 5 ++--- .../test_db_reader_unit/test_greenplum_reader_unit.py | 5 ++--- .../test_db/test_db_reader_unit/test_hive_reader_unit.py | 5 ++--- .../test_db/test_db_reader_unit/test_mssql_reader_unit.py | 5 ++--- .../test_db/test_db_reader_unit/test_mysql_reader_unit.py | 5 ++--- .../test_db/test_db_reader_unit/test_oracle_reader_unit.py | 5 ++--- .../test_db_reader_unit/test_postgres_reader_unit.py | 5 ++--- .../test_db_reader_unit/test_teradata_reader_unit.py | 5 ++--- .../test_db_writer_unit/test_clickhouse_writer_unit.py | 5 ++--- .../test_db_writer_unit/test_greenplum_writer_unit.py | 5 ++--- .../test_db/test_db_writer_unit/test_hive_writer_unit.py | 5 ++--- .../test_db/test_db_writer_unit/test_mssql_writer_unit.py | 5 ++--- .../test_db/test_db_writer_unit/test_mysql_writer_unit.py | 5 ++--- .../test_db/test_db_writer_unit/test_oracle_writer_unit.py | 5 ++--- .../test_db_writer_unit/test_postgres_writer_unit.py | 5 ++--- .../test_db_writer_unit/test_teradata_writer_unit.py | 5 ++--- 20 files changed, 48 insertions(+), 49 deletions(-) create mode 100644 docs/changelog/0.12.3.rst diff --git a/.github/workflows/test-mssql.yml b/.github/workflows/test-mssql.yml index cb7252f9..2980ece0 100644 --- a/.github/workflows/test-mssql.yml +++ b/.github/workflows/test-mssql.yml @@ -45,6 +45,13 @@ jobs: with: python-version: ${{ inputs.python-version }} + # https://github.com/pymssql/pymssql/issues/372#issuecomment-742386160 + - name: Add missing sqlfont.h file + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends freetds-dev libkrb5-dev gcc + - name: Cache Ivy uses: actions/cache@v4 if: inputs.with-cache diff --git a/docs/changelog/0.12.3.rst b/docs/changelog/0.12.3.rst new file mode 100644 index 00000000..77827028 --- /dev/null +++ b/docs/changelog/0.12.3.rst @@ -0,0 +1,7 @@ +0.12.3 (2024-11-21) +=================== + +Bug Fixes +--------- + +- Allow passing table names in format ``schema."table.with.dots"`` to ``DBReader(name=...)`` and ``DBWriter(name=...)``. diff --git a/docs/changelog/index.rst b/docs/changelog/index.rst index 8e0370bb..bb23a987 100644 --- a/docs/changelog/index.rst +++ b/docs/changelog/index.rst @@ -3,6 +3,7 @@ :caption: Changelog DRAFT + 0.12.3 0.12.2 0.12.1 0.12.0 diff --git a/onetl/connection/db_connection/dialect_mixins/support_name_with_schema_only.py b/onetl/connection/db_connection/dialect_mixins/support_name_with_schema_only.py index 0e66b980..db369eb1 100644 --- a/onetl/connection/db_connection/dialect_mixins/support_name_with_schema_only.py +++ b/onetl/connection/db_connection/dialect_mixins/support_name_with_schema_only.py @@ -5,7 +5,7 @@ class SupportNameWithSchemaOnly: def validate_name(self, value: str) -> str: - if value.count(".") != 1: + if "." not in value: raise ValueError( f"Name should be passed in `schema.name` format, got '{value}'", ) diff --git a/tests/tests_unit/test_db/test_db_reader_unit/test_clickhouse_reader_unit.py b/tests/tests_unit/test_db/test_db_reader_unit/test_clickhouse_reader_unit.py index 598e9d1b..5df85fed 100644 --- a/tests/tests_unit/test_db/test_db_reader_unit/test_clickhouse_reader_unit.py +++ b/tests/tests_unit/test_db/test_db_reader_unit/test_clickhouse_reader_unit.py @@ -35,14 +35,13 @@ def test_clickhouse_reader_snapshot_error_pass_df_schema(spark_mock): ) -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_clickhouse_reader_wrong_table_name(spark_mock, table): +def test_clickhouse_reader_wrong_table_name(spark_mock): clickhouse = Clickhouse(host="some_host", user="user", database="database", password="passwd", spark=spark_mock) with pytest.raises(ValueError, match="Name should be passed in `schema.name` format"): DBReader( connection=clickhouse, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) diff --git a/tests/tests_unit/test_db/test_db_reader_unit/test_greenplum_reader_unit.py b/tests/tests_unit/test_db/test_db_reader_unit/test_greenplum_reader_unit.py index 4f4820d4..7ad9a1a6 100644 --- a/tests/tests_unit/test_db/test_db_reader_unit/test_greenplum_reader_unit.py +++ b/tests/tests_unit/test_db/test_db_reader_unit/test_greenplum_reader_unit.py @@ -36,14 +36,13 @@ def test_greenplum_reader_snapshot_error_pass_df_schema(spark_mock): ) -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_greenplum_reader_wrong_table_name(spark_mock, table): +def test_greenplum_reader_wrong_table_name(spark_mock): greenplum = Greenplum(host="some_host", user="user", database="database", password="passwd", spark=spark_mock) with pytest.raises(ValueError, match="Name should be passed in `schema.name` format"): DBReader( connection=greenplum, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) diff --git a/tests/tests_unit/test_db/test_db_reader_unit/test_hive_reader_unit.py b/tests/tests_unit/test_db/test_db_reader_unit/test_hive_reader_unit.py index acb467e3..400fe2ac 100644 --- a/tests/tests_unit/test_db/test_db_reader_unit/test_hive_reader_unit.py +++ b/tests/tests_unit/test_db/test_db_reader_unit/test_hive_reader_unit.py @@ -36,14 +36,13 @@ def test_hive_reader_snapshot_error_pass_df_schema(spark_mock): ) -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_hive_reader_wrong_table_name(spark_mock, table): +def test_hive_reader_wrong_table_name(spark_mock): hive = Hive(cluster="rnd-dwh", spark=spark_mock) with pytest.raises(ValueError): DBReader( connection=hive, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) diff --git a/tests/tests_unit/test_db/test_db_reader_unit/test_mssql_reader_unit.py b/tests/tests_unit/test_db/test_db_reader_unit/test_mssql_reader_unit.py index ea9953e6..291fff17 100644 --- a/tests/tests_unit/test_db/test_db_reader_unit/test_mssql_reader_unit.py +++ b/tests/tests_unit/test_db/test_db_reader_unit/test_mssql_reader_unit.py @@ -36,14 +36,13 @@ def test_mssql_reader_snapshot_error_pass_df_schema(spark_mock): ) -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_mssql_reader_wrong_table_name(spark_mock, table): +def test_mssql_reader_wrong_table_name(spark_mock): mssql = MSSQL(host="some_host", user="user", database="database", password="passwd", spark=spark_mock) with pytest.raises(ValueError, match="Name should be passed in `schema.name` format"): DBReader( connection=mssql, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) diff --git a/tests/tests_unit/test_db/test_db_reader_unit/test_mysql_reader_unit.py b/tests/tests_unit/test_db/test_db_reader_unit/test_mysql_reader_unit.py index 8976393e..41aeb8d7 100644 --- a/tests/tests_unit/test_db/test_db_reader_unit/test_mysql_reader_unit.py +++ b/tests/tests_unit/test_db/test_db_reader_unit/test_mysql_reader_unit.py @@ -36,14 +36,13 @@ def test_mysql_reader_snapshot_error_pass_df_schema(spark_mock): ) -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_mysql_reader_wrong_table_name(spark_mock, table): +def test_mysql_reader_wrong_table_name(spark_mock): mysql = MySQL(host="some_host", user="user", database="database", password="passwd", spark=spark_mock) with pytest.raises(ValueError, match="Name should be passed in `schema.name` format"): DBReader( connection=mysql, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) diff --git a/tests/tests_unit/test_db/test_db_reader_unit/test_oracle_reader_unit.py b/tests/tests_unit/test_db/test_db_reader_unit/test_oracle_reader_unit.py index 444bc596..60f40f6e 100644 --- a/tests/tests_unit/test_db/test_db_reader_unit/test_oracle_reader_unit.py +++ b/tests/tests_unit/test_db/test_db_reader_unit/test_oracle_reader_unit.py @@ -36,13 +36,12 @@ def test_oracle_reader_error_df_schema(spark_mock): ) -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_oracle_reader_wrong_table_name(spark_mock, table): +def test_oracle_reader_wrong_table_name(spark_mock): oracle = Oracle(host="some_host", user="user", sid="sid", password="passwd", spark=spark_mock) with pytest.raises(ValueError, match="Name should be passed in `schema.name` format"): DBReader( connection=oracle, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) diff --git a/tests/tests_unit/test_db/test_db_reader_unit/test_postgres_reader_unit.py b/tests/tests_unit/test_db/test_db_reader_unit/test_postgres_reader_unit.py index 03c64681..e973675f 100644 --- a/tests/tests_unit/test_db/test_db_reader_unit/test_postgres_reader_unit.py +++ b/tests/tests_unit/test_db/test_db_reader_unit/test_postgres_reader_unit.py @@ -36,14 +36,13 @@ def test_postgres_reader_snapshot_error_pass_df_schema(spark_mock): ) -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_postgres_reader_wrong_table_name(spark_mock, table): +def test_postgres_reader_wrong_table_name(spark_mock): postgres = Postgres(host="some_host", user="user", database="database", password="passwd", spark=spark_mock) with pytest.raises(ValueError, match="Name should be passed in `schema.name` format"): DBReader( connection=postgres, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) diff --git a/tests/tests_unit/test_db/test_db_reader_unit/test_teradata_reader_unit.py b/tests/tests_unit/test_db/test_db_reader_unit/test_teradata_reader_unit.py index c61abca7..f68ded1a 100644 --- a/tests/tests_unit/test_db/test_db_reader_unit/test_teradata_reader_unit.py +++ b/tests/tests_unit/test_db/test_db_reader_unit/test_teradata_reader_unit.py @@ -36,14 +36,13 @@ def test_teradata_reader_snapshot_error_pass_df_schema(spark_mock): ) -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_teradata_reader_wrong_table_name(spark_mock, table): +def test_teradata_reader_wrong_table_name(spark_mock): teradata = Teradata(host="some_host", user="user", database="database", password="passwd", spark=spark_mock) with pytest.raises(ValueError, match="Name should be passed in `schema.name` format"): DBReader( connection=teradata, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) diff --git a/tests/tests_unit/test_db/test_db_writer_unit/test_clickhouse_writer_unit.py b/tests/tests_unit/test_db/test_db_writer_unit/test_clickhouse_writer_unit.py index a631c95b..801138e3 100644 --- a/tests/tests_unit/test_db/test_db_writer_unit/test_clickhouse_writer_unit.py +++ b/tests/tests_unit/test_db/test_db_writer_unit/test_clickhouse_writer_unit.py @@ -6,12 +6,11 @@ pytestmark = pytest.mark.clickhouse -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_clickhouse_writer_wrong_table_name(spark_mock, table): +def test_clickhouse_writer_wrong_table_name(spark_mock): clickhouse = Clickhouse(host="some_host", user="user", database="database", password="passwd", spark=spark_mock) with pytest.raises(ValueError, match="Name should be passed in `schema.name` format"): DBWriter( connection=clickhouse, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) diff --git a/tests/tests_unit/test_db/test_db_writer_unit/test_greenplum_writer_unit.py b/tests/tests_unit/test_db/test_db_writer_unit/test_greenplum_writer_unit.py index 784d4358..0d79b2fc 100644 --- a/tests/tests_unit/test_db/test_db_writer_unit/test_greenplum_writer_unit.py +++ b/tests/tests_unit/test_db/test_db_writer_unit/test_greenplum_writer_unit.py @@ -6,12 +6,11 @@ pytestmark = pytest.mark.greenplum -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_greenplum_writer_wrong_table_name(spark_mock, table): +def test_greenplum_writer_wrong_table_name(spark_mock): greenplum = Greenplum(host="some_host", user="user", database="database", password="passwd", spark=spark_mock) with pytest.raises(ValueError, match="Name should be passed in `schema.name` format"): DBWriter( connection=greenplum, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) diff --git a/tests/tests_unit/test_db/test_db_writer_unit/test_hive_writer_unit.py b/tests/tests_unit/test_db/test_db_writer_unit/test_hive_writer_unit.py index c6c6ddc7..d96cd521 100644 --- a/tests/tests_unit/test_db/test_db_writer_unit/test_hive_writer_unit.py +++ b/tests/tests_unit/test_db/test_db_writer_unit/test_hive_writer_unit.py @@ -6,12 +6,11 @@ pytestmark = pytest.mark.hive -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_hive_writer_wrong_table_name(spark_mock, table): +def test_hive_writer_wrong_table_name(spark_mock): hive = Hive(cluster="rnd-dwh", spark=spark_mock) with pytest.raises(ValueError, match="Name should be passed in `schema.name` format"): DBWriter( connection=hive, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) diff --git a/tests/tests_unit/test_db/test_db_writer_unit/test_mssql_writer_unit.py b/tests/tests_unit/test_db/test_db_writer_unit/test_mssql_writer_unit.py index 0690e6a4..3bb30b65 100644 --- a/tests/tests_unit/test_db/test_db_writer_unit/test_mssql_writer_unit.py +++ b/tests/tests_unit/test_db/test_db_writer_unit/test_mssql_writer_unit.py @@ -6,12 +6,11 @@ pytestmark = pytest.mark.mssql -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_mssql_writer_wrong_table_name(spark_mock, table): +def test_mssql_writer_wrong_table_name(spark_mock): mssql = MSSQL(host="some_host", user="user", database="database", password="passwd", spark=spark_mock) with pytest.raises(ValueError, match="Name should be passed in `schema.name` format"): DBWriter( connection=mssql, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) diff --git a/tests/tests_unit/test_db/test_db_writer_unit/test_mysql_writer_unit.py b/tests/tests_unit/test_db/test_db_writer_unit/test_mysql_writer_unit.py index fc00e96c..c8b84c6a 100644 --- a/tests/tests_unit/test_db/test_db_writer_unit/test_mysql_writer_unit.py +++ b/tests/tests_unit/test_db/test_db_writer_unit/test_mysql_writer_unit.py @@ -6,12 +6,11 @@ pytestmark = pytest.mark.mysql -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_mysql_writer_wrong_table_name(spark_mock, table): +def test_mysql_writer_wrong_table_name(spark_mock): mysql = MySQL(host="some_host", user="user", database="database", password="passwd", spark=spark_mock) with pytest.raises(ValueError, match="Name should be passed in `schema.name` format"): DBWriter( connection=mysql, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) diff --git a/tests/tests_unit/test_db/test_db_writer_unit/test_oracle_writer_unit.py b/tests/tests_unit/test_db/test_db_writer_unit/test_oracle_writer_unit.py index ae53e451..6ab40bcb 100644 --- a/tests/tests_unit/test_db/test_db_writer_unit/test_oracle_writer_unit.py +++ b/tests/tests_unit/test_db/test_db_writer_unit/test_oracle_writer_unit.py @@ -6,12 +6,11 @@ pytestmark = pytest.mark.oracle -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_oracle_writer_wrong_table_name(spark_mock, table): +def test_oracle_writer_wrong_table_name(spark_mock): oracle = Oracle(host="some_host", user="user", sid="sid", password="passwd", spark=spark_mock) with pytest.raises(ValueError, match="Name should be passed in `schema.name` format"): DBWriter( connection=oracle, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) diff --git a/tests/tests_unit/test_db/test_db_writer_unit/test_postgres_writer_unit.py b/tests/tests_unit/test_db/test_db_writer_unit/test_postgres_writer_unit.py index a2794466..cecb6864 100644 --- a/tests/tests_unit/test_db/test_db_writer_unit/test_postgres_writer_unit.py +++ b/tests/tests_unit/test_db/test_db_writer_unit/test_postgres_writer_unit.py @@ -6,12 +6,11 @@ pytestmark = pytest.mark.postgres -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_postgres_writer_wrong_table_name(spark_mock, table): +def test_postgres_writer_wrong_table_name(spark_mock): postgres = Postgres(host="some_host", user="user", database="database", password="passwd", spark=spark_mock) with pytest.raises(ValueError, match="Name should be passed in `schema.name` format"): DBWriter( connection=postgres, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) diff --git a/tests/tests_unit/test_db/test_db_writer_unit/test_teradata_writer_unit.py b/tests/tests_unit/test_db/test_db_writer_unit/test_teradata_writer_unit.py index 76bc4835..57bf81ea 100644 --- a/tests/tests_unit/test_db/test_db_writer_unit/test_teradata_writer_unit.py +++ b/tests/tests_unit/test_db/test_db_writer_unit/test_teradata_writer_unit.py @@ -6,12 +6,11 @@ pytestmark = pytest.mark.teradata -@pytest.mark.parametrize("table", ["table", "table.table.table"]) -def test_teradata_writer_wrong_table_name(spark_mock, table): +def test_teradata_writer_wrong_table_name(spark_mock): teradata = Teradata(host="some_host", user="user", database="database", password="passwd", spark=spark_mock) with pytest.raises(ValueError, match="Name should be passed in `schema.name` format"): DBWriter( connection=teradata, - table=table, # Required format: table="schema.table" + table="table", # Required format: table="schema.table" ) From 1683c5fecb747f1b5feb45fd669c538e9f75e835 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: Fri, 22 Nov 2024 11:05:14 +0000 Subject: [PATCH 7/7] [DOP-21634] Update CHANGELOG --- codecov.yml | 2 +- docs/changelog/0.12.3.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codecov.yml b/codecov.yml index 7291c7aa..54c78e62 100644 --- a/codecov.yml +++ b/codecov.yml @@ -2,5 +2,5 @@ coverage: status: project: default: - target: 94% + target: 91% threshold: 1% diff --git a/docs/changelog/0.12.3.rst b/docs/changelog/0.12.3.rst index 77827028..f931d2ee 100644 --- a/docs/changelog/0.12.3.rst +++ b/docs/changelog/0.12.3.rst @@ -1,4 +1,4 @@ -0.12.3 (2024-11-21) +0.12.3 (2024-11-22) =================== Bug Fixes