diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ff75ae..3ccfd4c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -83,6 +83,8 @@ jobs: with: name: coverage-python-${{ matrix.python-version }}-pydantic-${{ matrix.pydantic-version }}-os-${{ matrix.os }} path: reports/* + # https://github.com/actions/upload-artifact/issues/602 + include-hidden-files: true - name: Shutdown Backend Container if: always() @@ -125,10 +127,9 @@ jobs: - name: Download all coverage reports uses: actions/download-artifact@v4 with: - path: reports - - - name: Move coverage data to the root folder - run: find reports -type f -exec mv '{}' reports \; + path: reports/ + pattern: coverage-* + merge-multiple: true - name: Generate coverate reports run: ./combine_coverage.sh @@ -139,8 +140,7 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} file: ./reports/coverage.xml fail_ci_if_error: true - # TODO: remove after fixing https://github.com/codecov/codecov-cli/issues/367 - plugin: gcov + plugin: noop - name: All done run: echo 1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 335ac5d..0fb8498 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-ast - id: check-case-conflict @@ -49,7 +49,7 @@ repos: args: [-w] - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: v2.13.0 + rev: v2.14.0 hooks: - id: pretty-format-yaml args: [--autofix, --indent, '2', --offset, '2'] @@ -77,7 +77,7 @@ repos: - id: text-unicode-replacement-char - repo: https://github.com/asottile/pyupgrade - rev: v3.16.0 + rev: v3.19.0 hooks: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] @@ -88,7 +88,7 @@ repos: - id: add-trailing-comma - repo: https://github.com/pycqa/bandit - rev: 1.7.8 + rev: 1.7.10 hooks: - id: bandit args: @@ -98,19 +98,19 @@ repos: require_serial: true - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.4.2 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/asottile/blacken-docs - rev: 1.16.0 + rev: 1.19.1 hooks: - id: blacken-docs additional_dependencies: - black==24.4.2 - repo: https://github.com/asottile/blacken-docs - rev: 1.16.0 + rev: 1.19.1 hooks: - id: blacken-docs @@ -120,7 +120,7 @@ repos: - id: isort - repo: https://github.com/pycqa/bandit - rev: 1.7.8 + rev: 1.7.10 hooks: - id: bandit args: diff --git a/.spdx-license-header.txt b/.spdx-license-header.txt index 7efeb48..4aa54f7 100644 --- a/.spdx-license-header.txt +++ b/.spdx-license-header.txt @@ -1,2 +1,2 @@ -SPDX-FileCopyrightText: 2023-2024 MTS (Mobile Telesystems) +SPDX-FileCopyrightText: 2023-2024 MTS PJSC SPDX-License-Identifier: Apache-2.0 diff --git a/LICENSE.txt b/LICENSE.txt index 76b7d2b..aeee88e 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright 2023-2024 MTS (Mobile Telesystems). All rights reserved. +Copyright 2023-2024 MTS PJSC. All rights reserved. Apache License Version 2.0, January 2004 diff --git a/conftest.py b/conftest.py index c555429..0dc7e94 100644 --- a/conftest.py +++ b/conftest.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023-2024 MTS (Mobile Telesystems) +# SPDX-FileCopyrightText: 2023-2024 MTS PJSC # SPDX-License-Identifier: Apache-2.0 import os import secrets @@ -88,13 +88,13 @@ # no topic expression="offset", value={ - "0": 100, - "1": 123, + 0: 100, + 1: 123, }, ), { - "0": 110, - "1": 150, + 0: 110, + 1: 150, }, ), ( @@ -103,13 +103,13 @@ topic="topic_name", expression="offset", value={ - "0": 100, - "1": 123, + 0: 100, + 1: 123, }, ), { - "0": 110, - "1": 150, + 0: 110, + 1: 150, }, ), ], diff --git a/docs/changelog/1.0.1.rst b/docs/changelog/1.0.1.rst new file mode 100644 index 0000000..155497f --- /dev/null +++ b/docs/changelog/1.0.1.rst @@ -0,0 +1,4 @@ +1.0.1 (2024-11-12) +================== + +Allow using ``etl-entities==2.4.0``. diff --git a/docs/changelog/index.rst b/docs/changelog/index.rst index de6c01d..14db734 100644 --- a/docs/changelog/index.rst +++ b/docs/changelog/index.rst @@ -3,6 +3,7 @@ :caption: Changelog DRAFT + 1.0.1 1.0.0 0.1.6 0.1.5 diff --git a/docs/conf.py b/docs/conf.py index bec256a..d40977b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ # -- Project information ----------------------------------------------------- project = "Horizon HWM Store" -copyright = "2023-2024 MTS (Mobile Telesystems)" +copyright = "2023-2024 MTS PJSC" author = "DataOps.ETL" # The version info for the project you're documenting, acts as replacement for @@ -54,6 +54,7 @@ "sphinx_favicon", "sphinx_toolbox.github", "sphinxcontrib.towncrier", # provides `towncrier-draft-entries` directive + "sphinx_last_updated_by_git", ] numpydoc_show_class_members = True autodoc_pydantic_model_show_config = False @@ -84,9 +85,7 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] html_extra_path = ["robots.txt"] -favicons = [ - {"rel": "icon", "href": "icon.svg", "type": "image/svg+xml"}, -] + # The master toctree document. master_doc = "index" diff --git a/horizon_hwm_store/VERSION b/horizon_hwm_store/VERSION index 3eefcb9..7dea76e 100644 --- a/horizon_hwm_store/VERSION +++ b/horizon_hwm_store/VERSION @@ -1 +1 @@ -1.0.0 +1.0.1 diff --git a/horizon_hwm_store/__init__.py b/horizon_hwm_store/__init__.py index 36f7982..5a77db0 100644 --- a/horizon_hwm_store/__init__.py +++ b/horizon_hwm_store/__init__.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023-2024 MTS (Mobile Telesystems) +# SPDX-FileCopyrightText: 2023-2024 MTS PJSC # SPDX-License-Identifier: Apache-2.0 from horizon_hwm_store.horizon_hwm_store import HorizonHWMStore diff --git a/horizon_hwm_store/horizon_hwm_store.py b/horizon_hwm_store/horizon_hwm_store.py index 5c1abd9..56c6a9b 100644 --- a/horizon_hwm_store/horizon_hwm_store.py +++ b/horizon_hwm_store/horizon_hwm_store.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023-2024 MTS (Mobile Telesystems) +# SPDX-FileCopyrightText: 2023-2024 MTS PJSC # SPDX-License-Identifier: Apache-2.0 from __future__ import annotations @@ -79,7 +79,7 @@ class HorizonHWMStore(BaseHWMStore): connection=postgres, source="public.mydata", columns=["id", "data"], - hwm=DBReader.AutoDetectHWM(hwm="some_unique_hwm_name", expression="id"), + hwm=DBReader.AutoDetectHWM(name="some_unique_hwm_name", expression="id"), ) writer = DBWriter(connection=hive, target="newtable") diff --git a/horizon_hwm_store/version.py b/horizon_hwm_store/version.py index 23872e1..97a7740 100644 --- a/horizon_hwm_store/version.py +++ b/horizon_hwm_store/version.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023-2024 MTS (Mobile Telesystems) +# SPDX-FileCopyrightText: 2023-2024 MTS PJSC # SPDX-License-Identifier: Apache-2.0 """ __version__ parameter required to be able to output to the console diff --git a/requirements-docs.txt b/requirements-docs.txt index 4883d56..db903dd 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -4,6 +4,8 @@ numpydoc sphinx sphinx-copybutton sphinx-favicon +sphinx-last-updated-by-git sphinx-toolbox sphinxcontrib-towncrier -towncrier +# TODO: remove upper limit after https://github.com/sphinx-contrib/sphinxcontrib-towncrier/issues/92 +towncrier<24.7 diff --git a/requirements.txt b/requirements.txt index 3239cf1..69f3ec5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ data-horizon[client-sync]>=1.0.0,<1.1 -etl-entities>=2.1.0,<2.4.0 +etl-entities>=2.1.0,<2.5.0 diff --git a/setup.py b/setup.py index f77c840..8f46f9d 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023-2024 MTS (Mobile Telesystems) +# SPDX-FileCopyrightText: 2023-2024 MTS PJSC # SPDX-License-Identifier: Apache-2.0 from __future__ import annotations