From 402e805b69d6e851863011a4ba925667b796714c Mon Sep 17 00:00:00 2001 From: Brendan Smith Date: Fri, 26 Apr 2024 17:51:31 -0500 Subject: [PATCH 1/3] test: replace "limit" param with "size" in tests --- tests/unit/clients/test_enhance_client.py | 4 ++-- tests/unit/clients/test_search_client.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/clients/test_enhance_client.py b/tests/unit/clients/test_enhance_client.py index 1db34c4..0097850 100644 --- a/tests/unit/clients/test_enhance_client.py +++ b/tests/unit/clients/test_enhance_client.py @@ -17,7 +17,7 @@ async def test_mocked_enhance(self, mocker, client): # ARRANGE # Define the search query parameters - params = {"query": "your_search_query", "limit": 10} + params = {"query": "your_search_query", "size": 10} # Mock the _post_or_put method mocker.patch.object( @@ -43,7 +43,7 @@ async def test_mocked_create_bulkjob(self, mocker, client): # ARRANGE # Define the search query parameters - params = {"query": "your_bulk_enhance_query", "limit": 10} + params = {"query": "your_bulk_enhance_query", "size": 10} # Mock the _post_or_put method mocker.patch.object( diff --git a/tests/unit/clients/test_search_client.py b/tests/unit/clients/test_search_client.py index aa055ae..9624a95 100644 --- a/tests/unit/clients/test_search_client.py +++ b/tests/unit/clients/test_search_client.py @@ -19,7 +19,7 @@ async def test_mocked_search(self, mocker, client): # ARRANGE # Define the search query parameters - params = {"query": "your_search_query", "limit": 10} + params = {"query": "your_search_query", "size": 10} # Mock the _post_or_put method mocker.patch.object( From 771640b918375fa24ce065293b4ccc8758f351dc Mon Sep 17 00:00:00 2001 From: Brendan Smith Date: Fri, 26 Apr 2024 17:53:18 -0500 Subject: [PATCH 2/3] build: bump version to 0.2.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0e401b1..2a9e4ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "diffbot-kg" -version = "0.2.1" +version = "0.2.2" description = "Python client for the Diffbot Knowledge Graph API." authors = ["Brendan C. Smith"] license = "MIT" From d081022202b19d524e82e75a97520304a4b340ad Mon Sep 17 00:00:00 2001 From: Brendan Smith Date: Fri, 26 Apr 2024 18:56:19 -0500 Subject: [PATCH 3/3] chore: add launch and task configurations --- .vscode/launch.json | 23 +++++++++++++++++++++++ .vscode/tasks.json | 17 +++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..171936b --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,23 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Current File", + "type": "debugpy", + "request": "launch", + "program": "${file}", + "console": "integratedTerminal" + }, + { + "name": "Python: Run Functional Tests (From Scratch)", + "type": "debugpy", + "request": "launch", + "program": "pytest", + "console": "integratedTerminal", + "env": { + "PYTEST_CASSETTES_DIR": "${workspaceFolder}/tests/cassettes" + }, + "preLaunchTask": "delete_cassettes" + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..98394f0 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,17 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "delete_cassettes", + "type": "shell", + "command": "rm", + "args": ["-rf", "${workspaceFolder}/tests/**/cassettes/*.yaml"], + "problemMatcher": { + "base": "$tsc-watch", + "applyTo": "allDocuments" + } + } + ] +}