From c1966ebf5c30025794d05ac176980b2c54447588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= <16805946+edgarrmondragon@users.noreply.github.com> Date: Sun, 22 Dec 2024 18:10:43 -0600 Subject: [PATCH] packaging: Bump `singer-sdk` to 0.35 (#320) --- .github/workflows/test_tap.yml | 3 ++ poetry.lock | 55 +++++++++++----------------------- pyproject.toml | 2 +- tap_github/tests/test_tap.py | 20 ++++++------- 4 files changed, 31 insertions(+), 49 deletions(-) diff --git a/.github/workflows/test_tap.yml b/.github/workflows/test_tap.yml index fc2d4b9f..9145f00d 100644 --- a/.github/workflows/test_tap.yml +++ b/.github/workflows/test_tap.yml @@ -21,6 +21,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + FORCE_COLOR: 1 + jobs: tests: diff --git a/poetry.lock b/poetry.lock index 54fd3df5..3db659b7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -585,22 +585,22 @@ all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2 [[package]] name = "importlib-metadata" -version = "6.11.0" +version = "7.2.1" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-6.11.0-py3-none-any.whl", hash = "sha256:f0afba6205ad8f8947c7d338b5342d5db2afbfd82f9cbef7879a9539cc12eb9b"}, - {file = "importlib_metadata-6.11.0.tar.gz", hash = "sha256:1231cf92d825c9e03cfc4da076a16de6422c863558229ea0b22b675657463443"}, + {file = "importlib_metadata-7.2.1-py3-none-any.whl", hash = "sha256:ffef94b0b66046dd8ea2d619b701fe978d9264d38f3998bc4c27ec3b146a87c8"}, + {file = "importlib_metadata-7.2.1.tar.gz", hash = "sha256:509ecb2ab77071db5137c655e24ceb3eee66e7bbc6574165d0d114d9fc4bbe68"}, ] [package.dependencies] zipp = ">=0.5" [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] -testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] +test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] [[package]] name = "importlib-resources" @@ -710,16 +710,6 @@ files = [ importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""} referencing = ">=0.31.0" -[[package]] -name = "memoization" -version = "0.4.0" -description = "A powerful caching library for Python, with TTL support and multiple algorithm options. (https://github.com/lonelyenvoy/python-memoization)" -optional = false -python-versions = ">=3, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4" -files = [ - {file = "memoization-0.4.0.tar.gz", hash = "sha256:fde5e7cd060ef45b135e0310cfec17b2029dc472ccb5bbbbb42a503d4538a135"}, -] - [[package]] name = "nested-lookup" version = "0.2.25" @@ -976,17 +966,6 @@ files = [ [package.extras] cli = ["click (>=5.0)"] -[[package]] -name = "pytz" -version = "2024.2" -description = "World timezone definitions, modern and historical" -optional = false -python-versions = "*" -files = [ - {file = "pytz-2024.2-py2.py3-none-any.whl", hash = "sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725"}, - {file = "pytz-2024.2.tar.gz", hash = "sha256:2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a"}, -] - [[package]] name = "pyyaml" version = "6.0.2" @@ -1379,13 +1358,13 @@ files = [ [[package]] name = "singer-sdk" -version = "0.34.1" +version = "0.35.2" description = "A framework for building Singer taps" optional = false -python-versions = ">=3.7.1" +python-versions = ">=3.8" files = [ - {file = "singer_sdk-0.34.1-py3-none-any.whl", hash = "sha256:2b9afa40722c2d7288992d86d16298128e38387941306267d908b9cd954227a3"}, - {file = "singer_sdk-0.34.1.tar.gz", hash = "sha256:5da11da3de07cc31cc8c1f3f19a40b8f8be4a0df9b5535fb90880c263e58aee5"}, + {file = "singer_sdk-0.35.2-py3-none-any.whl", hash = "sha256:771c7e0b9a4da0e193f5bd4a5b79bf33f6783f189c6fc13aaa38c18663e90afd"}, + {file = "singer_sdk-0.35.2.tar.gz", hash = "sha256:e8763759660baa4636f2956532227f924a303ce1ff2f40ca92acc910e516f793"}, ] [package.dependencies] @@ -1394,20 +1373,19 @@ backports-datetime-fromisoformat = {version = ">=2.0.1", markers = "python_versi click = ">=8.0,<9.0" cryptography = ">=3.4.6" fs = ">=2.4.16" -importlib-metadata = {version = "<7.0.0", markers = "python_version < \"3.12\""} +importlib-metadata = {version = "<8.0.0", markers = "python_version < \"3.12\""} importlib-resources = {version = ">=5.12.0", markers = "python_version < \"3.9\""} inflection = ">=0.5.1" joblib = ">=1.0.1" jsonpath-ng = ">=1.5.3" -jsonschema = {version = ">=4.16.0", markers = "python_version >= \"3.8\""} -memoization = {version = ">=0.3.2,<0.5.0", markers = "python_version < \"4\""} +jsonschema = ">=4.16.0" packaging = ">=23.1" -pendulum = {version = ">=2.1.0,<4", markers = "python_version >= \"3.8\""} +pendulum = ">=2.1.0,<4" PyJWT = ">=2.4,<3.0" python-dateutil = ">=2.8.2" python-dotenv = ">=0.20" -pytz = ">=2022.2.1" PyYAML = ">=6.0" +referencing = ">=0.30.0" requests = ">=2.25.1" simpleeval = ">=0.9.13" simplejson = ">=3.17.6" @@ -1416,8 +1394,9 @@ typing-extensions = ">=4.5.0" urllib3 = ">=1.26,<2" [package.extras] -docs = ["furo (>=2022.12.7)", "myst-parser (>=1)", "sphinx (>=4.5)", "sphinx-autobuild (>=2021.3.14)", "sphinx-copybutton (>=0.3.1)", "sphinx-inline-tabs (>=2023.4.21)", "sphinx-notfound-page (>=1.0.0)", "sphinx-reredirects (>=0.1.1)"] -parquet = ["numpy (<1.22)", "numpy (>=1.22)", "numpy (>=1.22,<1.25)", "pyarrow (>=11,<13)", "pyarrow (>=13)"] +docs = ["furo (>=2022.12.7)", "myst-parser (>=1)", "pytest (>=7.2.1)", "sphinx (>=4.5)", "sphinx-autobuild (>=2021.3.14)", "sphinx-copybutton (>=0.3.1)", "sphinx-inline-tabs (>=2023.4.21)", "sphinx-notfound-page (>=1.0.0)", "sphinx-reredirects (>=0.1.1)"] +faker = ["faker (>=22.5,<24.0)"] +parquet = ["numpy (>=1.22)", "numpy (>=1.22,<1.25)", "pyarrow (>=13)"] s3 = ["fs-s3fs (>=1.1.1)"] testing = ["pytest (>=7.2.1)", "pytest-durations (>=1.2.0)"] @@ -1695,4 +1674,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.8" -content-hash = "c26863d83ee2ff52ca4b6839014c3be28f2a7dfcc30e95776f0e8038c044d32d" +content-hash = "9a52336c5f554c34172174f6c6ca77da528ed06ff5029b2869992cf3a8497c0e" diff --git a/pyproject.toml b/pyproject.toml index 05f32f7d..533a70ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ python-dateutil = "~=2.9" requests = "~=2.32.3" # For local SDK dev: # singer-sdk = {path = "../singer-sdk", develop = true} -singer-sdk = { version = "~=0.34.0", python = "<4" } +singer-sdk = "~=0.35.0" [tool.poetry.dev-dependencies] pytest = ">=7.3.1" diff --git a/tap_github/tests/test_tap.py b/tap_github/tests/test_tap.py index 2c5d465f..cbd26c23 100644 --- a/tap_github/tests/test_tap.py +++ b/tap_github/tests/test_tap.py @@ -118,7 +118,7 @@ def test_get_a_repository_in_repo_list_mode( ) # Verify we got the right number of records # one per repo in the list only if we sync the "repositories" stream, 0 if not - assert captured_out.count('{"type": "RECORD", "stream": "repositories"') == len( + assert captured_out.count('{"type":"RECORD","stream":"repositories"') == len( repo_list_2_ids * (not skip_parent_streams) ) # check that the tap corrects invalid case in config input @@ -138,9 +138,9 @@ def test_last_state_message_is_valid(capsys, repo_list_config): # noqa: F811 capsys, repo_list_config, "repositories", single_stream=None ) # capture the messages we're interested in - state_messages = re.findall(r'{"type": "STATE", "value":.*}', captured_out) + state_messages = re.findall(r'{"type":"STATE","value":.*}', captured_out) issue_comments_records = re.findall( - r'{"type": "RECORD", "stream": "issue_comments",.*}', captured_out + r'{"type":"RECORD","stream":"issue_comments",.*}', captured_out ) assert state_messages is not None last_state_msg = state_messages[-1] @@ -184,15 +184,15 @@ def test_get_a_user_in_user_usernames_mode( ) # Verify we got the right number of records: # one per user in the list if we sync the root stream, 0 otherwise - assert captured_out.count('{"type": "RECORD", "stream": "users"') == len( + assert captured_out.count('{"type":"RECORD","stream":"users"') == len( username_list_config["user_usernames"] * (not skip_parent_streams) ) # these 2 are inequalities as number will keep changing :) - assert captured_out.count('{"type": "RECORD", "stream": "starred"') > 150 - assert captured_out.count('{"type": "RECORD", "stream": "user_contributed_to"') > 25 - assert '{"username": "aaronsteers"' in captured_out - assert '{"username": "aaRONsTeeRS"' not in captured_out - assert '{"username": "EricBoucher"' not in captured_out + assert captured_out.count('{"type":"RECORD","stream":"starred"') > 150 + assert captured_out.count('{"type":"RECORD","stream":"user_contributed_to"') > 25 + assert '{"username":"aaronsteers"' in captured_out + assert '{"username":"aaRONsTeeRS"' not in captured_out + assert '{"username":"EricBoucher"' not in captured_out @pytest.mark.repo_list(["torvalds/linux"]) @@ -204,7 +204,7 @@ def test_large_list_of_contributors(capsys, repo_list_config): # noqa: F811 captured_out = run_tap_with_config( capsys, repo_list_config, skip_stream=None, single_stream="contributors" ) - assert captured_out.count('{"type": "RECORD", "stream": "contributors"') == 0 + assert captured_out.count('{"type":"RECORD","stream":"contributors"') == 0 def test_web_tag_parse_counter():