Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus committed Nov 22, 2024
2 parents ebe457d + 1683c5f commit c4d2caa
Show file tree
Hide file tree
Showing 31 changed files with 89 additions and 84 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/get-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ jobs:
- name: Get Core matrix
id: matrix-core
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/core/matrix.yml

Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
- name: Get Clickhouse matrix
id: matrix-clickhouse
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/clickhouse/matrix.yml

Expand Down Expand Up @@ -214,7 +214,7 @@ jobs:
- name: Get Greenplum matrix
id: matrix-greenplum
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/greenplum/matrix.yml

Expand Down Expand Up @@ -244,7 +244,7 @@ jobs:
- name: Get Hive matrix
id: matrix-hive
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/hive/matrix.yml

Expand Down Expand Up @@ -274,7 +274,7 @@ jobs:
- name: Get Kafka matrix
id: matrix-kafka
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/kafka/matrix.yml

Expand Down Expand Up @@ -304,7 +304,7 @@ jobs:
- name: Get LocalFS matrix
id: matrix-local-fs
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/local-fs/matrix.yml

Expand Down Expand Up @@ -334,7 +334,7 @@ jobs:
- name: Get MongoDB matrix
id: matrix-mongodb
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/mongodb/matrix.yml

Expand Down Expand Up @@ -364,7 +364,7 @@ jobs:
- name: Get MSSQL matrix
id: matrix-mssql
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/mssql/matrix.yml

Expand Down Expand Up @@ -394,7 +394,7 @@ jobs:
- name: Get MySQL matrix
id: matrix-mysql
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/mysql/matrix.yml

Expand Down Expand Up @@ -424,7 +424,7 @@ jobs:
- name: Get Oracle matrix
id: matrix-oracle
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/oracle/matrix.yml

Expand Down Expand Up @@ -454,7 +454,7 @@ jobs:
- name: Get Postgres matrix
id: matrix-postgres
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/postgres/matrix.yml

Expand Down Expand Up @@ -484,7 +484,7 @@ jobs:
- name: Get Teradata matrix
id: matrix-teradata
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/teradata/matrix.yml

Expand Down Expand Up @@ -514,7 +514,7 @@ jobs:
- name: Get FTP matrix
id: matrix-ftp
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/ftp/matrix.yml

Expand Down Expand Up @@ -544,7 +544,7 @@ jobs:
- name: Get FTPS matrix
id: matrix-ftps
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/ftps/matrix.yml

Expand Down Expand Up @@ -574,7 +574,7 @@ jobs:
- name: Get HDFS matrix
id: matrix-hdfs
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/hdfs/matrix.yml

Expand Down Expand Up @@ -604,7 +604,7 @@ jobs:
- name: Get S3 matrix
id: matrix-s3
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/s3/matrix.yml

Expand Down Expand Up @@ -634,7 +634,7 @@ jobs:
- name: Get SFTP matrix
id: matrix-sftp
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/sftp/matrix.yml

Expand Down Expand Up @@ -664,7 +664,7 @@ jobs:
- name: Get Samba matrix
id: matrix-samba
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/samba/matrix.yml

Expand Down Expand Up @@ -694,6 +694,6 @@ jobs:
- name: Get WebDAV matrix
id: matrix-webdav
uses: mikefarah/[email protected].3
uses: mikefarah/[email protected].5
with:
cmd: yq -o=json '.matrix' .github/workflows/data/webdav/matrix.yml
7 changes: 7 additions & 0 deletions .github/workflows/test-mssql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 18 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.svg
:alt: pre-commit.ci - status
:target: https://results.pre-commit.ci/latest/github/MobileTeleSystems/onetl/develop

|Logo|
Expand Down
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ coverage:
status:
project:
default:
target: 94%
target: 91%
threshold: 1%
7 changes: 7 additions & 0 deletions docs/changelog/0.12.3.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
0.12.3 (2024-11-22)
===================

Bug Fixes
---------

- Allow passing table names in format ``schema."table.with.dots"`` to ``DBReader(name=...)`` and ``DBWriter(name=...)``.
1 change: 1 addition & 0 deletions docs/changelog/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
:caption: Changelog

DRAFT
0.12.3
0.12.2
0.12.1
0.12.0
Expand Down
1 change: 0 additions & 1 deletion docs/changelog/next_release/+.dependency.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog/next_release/+.doc.1.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog/next_release/+.improvement.1.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog/next_release/316.bugfix.1.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog/next_release/316.bugfix.2.rst

This file was deleted.

2 changes: 1 addition & 1 deletion onetl/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.12.2
0.12.3
Original file line number Diff line number Diff line change
Expand Up @@ -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}'",
)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


Expand Down
Loading

0 comments on commit c4d2caa

Please sign in to comment.