Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
5ee6557
Add `DynamicRAG` factory and connected private classes for use in `.g…
tsmith023 Oct 31, 2024
5331b1a
Merge branch 'main' of https://github.com/weaviate/weaviate-python-cl…
tsmith023 Oct 31, 2024
330843a
Rename `DynamicRAG` to `GenerativeProvider`
tsmith023 Oct 31, 2024
551afd0
Fix parsing of returns with new API, remove asserts in tests dependin…
tsmith023 Nov 1, 2024
0ed39dc
Merge branch 'main' of https://github.com/weaviate/weaviate-python-cl…
tsmith023 Nov 1, 2024
f821f69
Merge branch 'main' of https://github.com/weaviate/weaviate-python-cl…
tsmith023 Feb 17, 2025
a348781
Respond to some review comments
tsmith023 Feb 17, 2025
0b1914e
Merge branch 'main' of https://github.com/weaviate/weaviate-python-cl…
tsmith023 Feb 18, 2025
c7a6868
Merge branch 'main' of https://github.com/weaviate/weaviate-python-cl…
tsmith023 Feb 18, 2025
6af525f
Merge branch 'main' of https://github.com/weaviate/weaviate-python-cl…
tsmith023 Feb 18, 2025
2e70500
Merge branch 'main' of https://github.com/weaviate/weaviate-python-cl…
tsmith023 Feb 18, 2025
99854e1
Add support for images during generation and nvidia
tsmith023 Feb 18, 2025
75fc405
Export generative provider dynamic type alias from outputs/
tsmith023 Feb 19, 2025
37465c5
Extract grouped generate result from new field when available
tsmith023 Feb 26, 2025
eeafe5d
Update API surface to use new split between images/image_properties
tsmith023 Mar 3, 2025
ec2acf7
Cohere embedding model list was being used in place of gen models
databyjp Mar 4, 2025
66cf8ec
Docstring changes
databyjp Mar 4, 2025
e502790
Docstring updates
databyjp Mar 4, 2025
02438e3
Typo
databyjp Mar 4, 2025
8fc6756
Make changes in response to review, add preview 1.30 tag to CI
tsmith023 Mar 4, 2025
ea5febb
Fix unit tests
tsmith023 Mar 4, 2025
5fef60d
Add method for generative dummy module
tsmith023 Mar 4, 2025
0f6febd
Update CI images to latest
tsmith023 Mar 5, 2025
36cb4fb
Introduce `metadata` and `debug` returns, deprecated `.generated` in …
tsmith023 Mar 5, 2025
32cb62f
Fix unit tests
tsmith023 Mar 5, 2025
64eb229
Introduce `GenerativePrompt` moving `images` into it from specific pr…
tsmith023 Mar 5, 2025
5f2a924
Rename user-facing API to align with proposal
tsmith023 Mar 5, 2025
93e6e60
Change type of `images` to allow `BLOB_INPUT` in new factories
tsmith023 Mar 6, 2025
6826572
Throw correct error for unsupported dynRAG usage
tsmith023 Mar 6, 2025
c23e88e
Merge branch 'main' of https://github.com/weaviate/weaviate-python-cl…
tsmith023 Mar 6, 2025
2effc3a
Fix unit tests, raise exception if images used with non-compatible mo…
tsmith023 Mar 6, 2025
ffb0b09
Add regression test of string inputs to single/grouped prompts
tsmith023 Mar 6, 2025
3d0e35f
Merge branch 'main' of https://github.com/weaviate/weaviate-python-cl…
tsmith023 Mar 6, 2025
3d63972
Remove version check for dynRAG, server will throw instead if disabled
tsmith023 Mar 6, 2025
59e98b8
Fix passing images to grouped field in grpc
tsmith023 Mar 6, 2025
04913a7
Fix ser/deser of debug/metadata reqs/resps
tsmith023 Mar 7, 2025
45cef07
Fix unit tests
tsmith023 Mar 7, 2025
979a4bb
Merge pull request #1578 from weaviate/jph/dynamic-rag-feedback
tsmith023 Mar 11, 2025
48a1c3c
Rename `ProviderDynamic` to `ConfigRuntime`
tsmith023 Mar 11, 2025
bc0977d
Fix unit tests
tsmith023 Mar 11, 2025
761716e
Update CI to use latest preview image of 1.30
tsmith023 Mar 11, 2025
436b750
Merge pull request #1377 from weaviate/feature/dynamic-rag-support
tsmith023 Mar 11, 2025
05f8ab2
Initial support for dynamic users
dirkkul Mar 7, 2025
b7399ba
Fix syncify
dirkkul Mar 7, 2025
4c94366
Fix other deprecated .user methods
dirkkul Mar 10, 2025
29872b7
Add support for get users for role with namespace and all actions
dirkkul Mar 10, 2025
179644f
Fix path to ignore in authz tests
dirkkul Mar 12, 2025
31a19d2
Set up CI with dynamic users
dirkkul Mar 14, 2025
69fe14e
Fix test skipping
dirkkul Mar 14, 2025
876b64a
Fix backward compatibility of get_assigned_roles
dirkkul Mar 14, 2025
6cdedb5
Run integration test on latest weaviate version
dirkkul Mar 14, 2025
e8b1641
Fix backward compatibility in another function
dirkkul Mar 14, 2025
bca7d29
Fix interface and add more tests
dirkkul Mar 14, 2025
a410386
Fix ports in test
dirkkul Mar 14, 2025
562ed79
Fix more tests
dirkkul Mar 14, 2025
6357232
Fix version checks in tests
dirkkul Mar 14, 2025
5e58d7f
Fixup types
dirkkul Mar 14, 2025
3c0f053
Fix ports in test
dirkkul Mar 14, 2025
a5542ff
rework tests
dirkkul Mar 14, 2025
fcf9909
And more tests
dirkkul Mar 14, 2025
073a283
Add `tenant` option to `Permissions.data` and `Permissions.tenants`
tsmith023 Mar 17, 2025
455f4c8
Fix inheritance for sync.pyi
dirkkul Mar 18, 2025
1aa9f96
Merge pull request #1581 from weaviate/dynamic_user
dirkkul Mar 18, 2025
9abcbce
Have single calls for deprecated functions
dirkkul Mar 19, 2025
3c72bec
Merge branch 'main' into dev/1.30
dirkkul Mar 19, 2025
ada30e8
Merge pull request #1597 from weaviate/dyn_user_single_calls
dirkkul Mar 20, 2025
8851c5b
Detect double user (de)activation
dirkkul Mar 20, 2025
6899860
Fix docker compose file
dirkkul Mar 20, 2025
89ba1df
Review dynamic user error messages
dirkkul Mar 20, 2025
0a1e76c
Merge pull request #1599 from weaviate/double_deactivate
dirkkul Mar 21, 2025
630e9ed
Adapt to changes in returns in getRoleForUser
dirkkul Mar 21, 2025
72d1857
adapt tests
dirkkul Mar 21, 2025
ef839f0
Simplify returns
dirkkul Mar 21, 2025
653d1fd
Better paramter name
dirkkul Mar 24, 2025
c92abdf
Merge pull request #1602 from weaviate/adapt_returns
dirkkul Mar 24, 2025
2c2b15d
Add missing deprecation warning
dirkkul Mar 25, 2025
4ef40bf
Adapt get users fpr role
dirkkul Mar 25, 2025
8daad0f
adapt outputs
dirkkul Mar 25, 2025
0e56eca
Fix circular import
dirkkul Mar 25, 2025
9f5dd26
Fix more imports
dirkkul Mar 25, 2025
7eeb612
Fixup tests
dirkkul Mar 26, 2025
76259a7
Renaming
dirkkul Mar 26, 2025
ff61703
Update interface and tests
dirkkul Mar 26, 2025
f4a7d0f
Merge pull request #1609 from weaviate/adapt_get_users
dirkkul Mar 26, 2025
2a0d435
Handle renaming of dynamic users =>db users
dirkkul Mar 26, 2025
6b76047
Merge pull request #1610 from weaviate/handle_renaming
dirkkul Mar 27, 2025
382e915
Permit usage like `images=base64_image`
tsmith023 Mar 27, 2025
cff29a7
Fix typo and extend test of `images=image` in GenConfRuntime
tsmith023 Mar 27, 2025
a0811f5
Fix multi-modal generative config runtime error msg
tsmith023 Mar 27, 2025
d560819
Merge branch 'main' into dev/1.30
dirkkul Mar 27, 2025
59d5e37
Fix deprecation warning
dirkkul Mar 27, 2025
75c0e72
Merge pull request #1613 from weaviate/fix_deprecation
dirkkul Mar 27, 2025
67468c8
Fix username in auth test
dirkkul Mar 31, 2025
e5687fd
change test
dirkkul Mar 31, 2025
e8c7159
Ignore `F824` flake8 linting error in conftest
tsmith023 Mar 31, 2025
146036b
Merge pull request #1616 from weaviate/chore/fix-f824-linting-error-i…
dirkkul Mar 31, 2025
7d8afec
Merge branch 'main' of https://github.com/weaviate/weaviate-python-cl…
tsmith023 Mar 31, 2025
5a41ed0
update adminlist
dirkkul Mar 31, 2025
4ebfc14
Merge branch 'main' into update_username_auth_test
dirkkul Mar 31, 2025
c53997e
Merge pull request #1615 from weaviate/update_username_auth_test
dirkkul Mar 31, 2025
dd70f7d
Create generative xAI module
erika-shorten Mar 11, 2025
72b01da
Remove two parameters from test_config
erika-shorten Mar 11, 2025
8716a69
Remove `topP` in test_config
erika-shorten Mar 11, 2025
62d628a
Update test_config.py
erika-shorten Mar 11, 2025
7d00675
Update test_config.py
erika-shorten Mar 11, 2025
5a9e6ea
Update parameter name
erika-shorten Mar 11, 2025
a82476c
Add dynamic RAG for xAI
dirkkul Mar 31, 2025
c10a1f7
Unify casing
dirkkul Mar 31, 2025
5f08a35
Merge pull request #1586 from weaviate/add-xai-generative
dirkkul Apr 1, 2025
9288438
Change `get_by_name` to use `TenantGetOne` REST endpoint
tsmith023 Apr 1, 2025
122b475
Handle `get_by_name` for <1.28.0 when the GET endpoint wasn't available
tsmith023 Apr 1, 2025
09c71e8
Merge pull request #1617 from weaviate/1.30/change-tenants-get-by-nam…
tsmith023 Apr 1, 2025
f69ad26
Merge pull request #1593 from weaviate/1.30/rbac-tenant-filtering
dirkkul Apr 3, 2025
8969a10
Fix kwargs vs args
dirkkul Apr 3, 2025
f5ed841
Add missing revoke key
dirkkul Apr 3, 2025
8e9ac98
Fix tests using new kwarg syntax
tsmith023 Apr 3, 2025
81d6b13
Merge pull request #1621 from weaviate/user_review
dirkkul Apr 3, 2025
ba5f613
Merge pull request #1585 from weaviate/dev/1.30
tsmith023 Apr 3, 2025
c722b90
Update changelog with major features of `v4.12.0`
tsmith023 Apr 3, 2025
366d4f8
Merge pull request #1622 from weaviate/changelog-4-12-0
tsmith023 Apr 3, 2025
e1723e3
Rename `openai_azure` in `GenerativeConfig` to `azure_openai`
tsmith023 Apr 8, 2025
5e4b879
Merge pull request #1623 from weaviate/fix/inconsistent-openai-azure-…
tsmith023 Apr 8, 2025
229b4af
Refactor to separate sync and async connections (#1594)
tsmith023 Apr 9, 2025
a1b1c79
Add missing default value
dirkkul Apr 10, 2025
1efe615
Merge pull request #1625 from weaviate/fix_gen_near_text
dirkkul Apr 10, 2025
08e6438
Add changelog for 4.13.1
dirkkul Apr 10, 2025
17271a0
Merge pull request #1626 from weaviate/changelog_v4.13.1
dirkkul Apr 10, 2025
9fd9701
Fix accidental adding of `/` to all `AnyHttpUrl` models in grpc gen.c…
tsmith023 Apr 10, 2025
5d199b9
Always specify which classes should be backed up and restored
dirkkul Apr 10, 2025
9947c4c
Change test to use ONE rather than ALL to help avoid EC races in CI
tsmith023 Apr 10, 2025
582fd85
Use `.strip()` instead
tsmith023 Apr 10, 2025
b804eee
Merge pull request #1630 from weaviate/fix/potential-races-in-cluster…
dirkkul Apr 10, 2025
94824a7
Merge pull request #1629 from weaviate/fix_backup_tests_concurency
dirkkul Apr 10, 2025
0bb3c32
Merge branch 'main' of https://github.com/weaviate/weaviate-python-cl…
tsmith023 Apr 10, 2025
515c955
Ensure autoschema is off for replicated testing stack
tsmith023 Apr 10, 2025
026364c
Merge pull request #1631 from weaviate/chore/disable-autoschema-in-cl…
dirkkul Apr 10, 2025
d5f09c0
Merge pull request #1628 from weaviate/fix/urls-in-generative-config-…
dirkkul Apr 10, 2025
acbeb1d
Add sleep to test to avoid eventual consistency errors (#1632)
tsmith023 Apr 10, 2025
b3dc298
Add 4.13.2 changelog
tsmith023 Apr 10, 2025
ee23524
Merge pull request #1633 from weaviate/changelog-4132
tsmith023 Apr 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ concurrency:

env:
WEAVIATE_124: 1.24.26
WEAVIATE_125: stable-v1.25-58e6503
WEAVIATE_126: 1.26.17-c1737a0
WEAVIATE_127: 1.27.15
WEAVIATE_128: 1.28.10
WEAVIATE_125: 1.25.34
WEAVIATE_126: 1.26.17
WEAVIATE_127: 1.27.14
WEAVIATE_128: 1.28.8
WEAVIATE_129: 1.29.1
WEAVIATE_130: 1.30.0-rc.0-c1830a7-amd64

jobs:
lint-and-format:
Expand Down Expand Up @@ -64,11 +65,9 @@ jobs:
python-version: ${{ matrix.version }}
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements-devel.txt
- name: Run mypy
run: mypy --config-file ./pyproject.toml --warn-unused-ignores --python-version ${{matrix.version}} ${{ matrix.folder }}
- uses: jakebailey/pyright-action@v2
with:
version: 1.1.347
version: 1.1.398

unit-tests:
name: Run Unit Tests
Expand Down Expand Up @@ -130,11 +129,11 @@ jobs:
fail-fast: false
matrix:
versions: [
{ py: "3.9", weaviate: $WEAVIATE_129},
{ py: "3.10", weaviate: $WEAVIATE_129},
{ py: "3.11", weaviate: $WEAVIATE_129},
{ py: "3.12", weaviate: $WEAVIATE_129},
{ py: "3.13", weaviate: $WEAVIATE_129}
{ py: "3.9", weaviate: $WEAVIATE_130},
{ py: "3.10", weaviate: $WEAVIATE_130},
{ py: "3.11", weaviate: $WEAVIATE_130},
{ py: "3.12", weaviate: $WEAVIATE_130},
{ py: "3.13", weaviate: $WEAVIATE_130}
]
optional_dependencies: [false]
steps:
Expand Down Expand Up @@ -168,7 +167,7 @@ jobs:
run: pytest -n auto --dist loadgroup -v --cov --cov-report=term-missing --cov=weaviate --cov-report xml:coverage-integration.xml integration
- name: Run integration tests without auth secrets (for forks)
if: ${{ github.event.pull_request.head.repo.fork }}
run: pytest -v --cov --cov-report=term-missing --cov=weaviate --cov-report xml:coverage-integration.xml integration
run: pytest -n auto --dist loadgroup -v --cov --cov-report=term-missing --cov=weaviate --cov-report xml:coverage-integration.xml integration
- name: Archive code coverage results
if: matrix.versions.py == '3.10' && (github.ref_name != 'main')
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -279,7 +278,8 @@ jobs:
$WEAVIATE_126,
$WEAVIATE_127,
$WEAVIATE_128,
$WEAVIATE_129
$WEAVIATE_129,
$WEAVIATE_130
]
steps:
- name: Checkout
Expand Down
15 changes: 1 addition & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,6 @@ repos:
]
files: '^weaviate/collections'

- repo: local
hooks:
- id: mypy
name: mypy
entry: ./run-mypy.sh
language: python
language_version: "3.12"
# use require_serial so that script
# is only called once per commit
require_serial: true
# Print the number of files as a sanity-check
verbose: true

- repo: local
hooks:
- id: pyright
Expand All @@ -57,4 +44,4 @@ repos:
language: node
pass_filenames: false
types: [python]
additional_dependencies: [pyright@1.1.364]
additional_dependencies: [pyright@1.1.398]
3 changes: 3 additions & 0 deletions ci/docker-compose-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ services:
CONTEXTIONARY_URL: contextionary:9999
DEFAULT_VECTORIZER_MODULE: text2vec-contextionary
ENABLE_MODULES: text2vec-contextionary
AUTOSCHEMA_ENABLED: 'false'

weaviate-node-2:
init: true
Expand Down Expand Up @@ -54,6 +55,7 @@ services:
CONTEXTIONARY_URL: contextionary:9999
DEFAULT_VECTORIZER_MODULE: text2vec-contextionary
ENABLE_MODULES: text2vec-contextionary
AUTOSCHEMA_ENABLED: 'false'

weaviate-node-3:
init: true
Expand Down Expand Up @@ -86,4 +88,5 @@ services:
CONTEXTIONARY_URL: contextionary:9999
DEFAULT_VECTORIZER_MODULE: text2vec-contextionary
ENABLE_MODULES: text2vec-contextionary
AUTOSCHEMA_ENABLED: 'false'
...
6 changes: 6 additions & 0 deletions ci/docker-compose-rbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,10 @@ services:
CLUSTER_DATA_BIND_PORT: "7101"
RAFT_BOOTSTRAP_EXPECT: "1"
AUTHORIZATION_ENABLE_RBAC: "true"
AUTHENTICATION_DB_USERS_ENABLED: "true"
AUTHENTICATION_OIDC_ENABLED: 'true'
AUTHENTICATION_OIDC_CLIENT_ID: 'wcs'
AUTHENTICATION_OIDC_ISSUER: 'https://auth.wcs.api.weaviate.io/auth/realms/SeMI'
AUTHENTICATION_OIDC_USERNAME_CLAIM: 'email'
AUTHENTICATION_OIDC_GROUPS_CLAIM: 'groups'
...
4 changes: 2 additions & 2 deletions ci/docker-compose-wcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ services:
AUTHENTICATION_OIDC_USERNAME_CLAIM: 'email'
AUTHENTICATION_OIDC_GROUPS_CLAIM: 'groups'
AUTHORIZATION_ADMINLIST_ENABLED: 'true'
AUTHORIZATION_ADMINLIST_USERS: 'ms_2d0e007e7136de11d5f29fce7a53dae219a51458@existiert.net'
AUTHORIZATION_ADMINLIST_USERS: 'oidc-test-user@weaviate.io'
AUTHENTICATION_OIDC_SCOPES: 'openid,email'
AUTHENTICATION_APIKEY_ENABLED: 'true'
AUTHENTICATION_APIKEY_ALLOWED_KEYS: 'my-secret-key'
AUTHENTICATION_APIKEY_USERS: 'ms_2d0e007e7136de11d5f29fce7a53dae219a51458@existiert.net'
AUTHENTICATION_APIKEY_USERS: 'oidc-test-user@weaviate.io'
DISABLE_TELEMETRY: 'true'
...
36 changes: 35 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
Changelog
=========

Version 4.13.2
--------------
This patch version includes:
- Fixes a parsing bug when providing URLs with ``GenerativeConfig`` for runtime generate queries

Version 4.13.1
--------------
This patch version includes:
- Fixes ``generative.near_text()`` to not require ``generative_provider``

Version 4.13.0
--------------
This minor version provides a complete top-down refactor of the underlying transport for the sync and async clients.
- Introduction of a dependency injection system whereby the sync/async connections are injected into each client independently thereby removing their cross-dependency.
- Removal of the ``event_loop.py`` file and all logic surrounding its usage by the sync client.
- Refactoring of the batching algorithm to use blocking threads with a sync connection, rather than the event loop sidecar thread.


Version 4.12.1
--------------
This patch version includes:
- Renames ``GenerativeConfig.openai_azure`` to ``GenerativeConfig.azure_openai`` to align with the convention of ``Configure.Generative.azure_openai``

Version 4.12.0
--------------
This minor version includes:
- Support for new 1.30 features:
- Dynamic user management of OIDC and native DB users
- Improved multi-dimensional/colBERT vectors
- Query-time configuration of generative modules
- Tenant-based filtering of data permissions in RBAC
- The new ``generative-xai`` module


Version 4.11.3
--------------
This patch version includes:
Expand Down Expand Up @@ -35,7 +69,7 @@ Version 4.11.0
This minor version includes:
- Support for new 1.29 features:
- RBAC is ready for production
- Multi-dimensional/COLBert vectors experimental, breaking changes are expected)
- Multi-dimensional/COLBert vectors experimental, breaking changes are expected
- Aggregations are using GRPC now
- Improved exception handling for errors returned by Weaviate
- Add support for NVIDIA modules:
Expand Down
4 changes: 2 additions & 2 deletions integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def _factory(
reranker_config: Optional[_RerankerProvider] = None,
) -> Collection[Any, Any]:
try:
nonlocal client_fixture, name_fixtures, call_counter
nonlocal client_fixture, name_fixtures, call_counter # noqa: F824
call_counter += 1
name_fixture = (
_sanitize_collection_name(request.node.fspath.basename + "_" + request.node.name)
Expand Down Expand Up @@ -268,7 +268,7 @@ async def _factory(
reranker_config: Optional[_RerankerProvider] = None,
) -> CollectionAsync[Any, Any]:
try:
nonlocal client_fixture, name_fixtures
nonlocal client_fixture, name_fixtures # noqa: F824
name_fixture = _sanitize_collection_name(request.node.name) + name
name_fixtures.append(name_fixture)
client_fixture = await async_client_factory(
Expand Down
33 changes: 18 additions & 15 deletions integration/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ def test_authentication_client_credentials(
@pytest.mark.parametrize(
"name,user,env_variable_name,port,scope,warning",
[
# ( # WCS keycloak times out too often
# "WCS",
# "ms_2d0e007e7136de11d5f29fce7a53dae219a51458@existiert.net",
# "WCS_DUMMY_CI_PW",
# WCS_PORT,
# None,
# False,
# ),
( # WCS keycloak times out too often
"WCS",
"oidc-test-user@weaviate.io",
"WCS_DUMMY_CI_PW",
WCS_PORT,
None,
False,
),
(
"okta",
"test@test.de",
Expand Down Expand Up @@ -137,6 +137,9 @@ def test_client_with_authentication_with_anon_weaviate() -> None:
with pytest.warns(UserWarning) as recwarn:
with weaviate.connect_to_local(auth_credentials=auth) as client:
client.collections.list_all()
if len(recwarn) > 1:
for rwarning in recwarn.list:
print(rwarning.message)
assert len(recwarn) == 1
assert str(recwarn.list[0].message).startswith("Auth001")

Expand Down Expand Up @@ -168,12 +171,12 @@ def _get_access_token(url: str, user: str, pw: str) -> Dict[str, str]:
@pytest.mark.parametrize(
"name,user,env_variable_name,port",
[
# ( # WCS keycloak times out too often
# "WCS",
# "ms_2d0e007e7136de11d5f29fce7a53dae219a51458@existiert.net",
# "WCS_DUMMY_CI_PW",
# WCS_PORT,
# ),
( # WCS keycloak times out too often
"WCS",
"oidc-test-user@weaviate.io",
"WCS_DUMMY_CI_PW",
WCS_PORT,
),
(
"okta",
"test@test.de",
Expand All @@ -200,7 +203,7 @@ def test_authentication_with_bearer_token(
refresh_token=token["refresh_token"],
)
with weaviate.connect_to_local(port=port, auth_credentials=auth) as client:
client.collections.list_all()
client.collections.exists("something")


def test_authentication_with_bearer_token_no_refresh() -> None:
Expand Down
23 changes: 15 additions & 8 deletions integration/test_backup_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@
"datePublished": datetime.datetime.now(datetime.timezone.utc).isoformat(),
},
]
CLASSES = ["Paragraph", "Article"]


@pytest.fixture(scope="module")
def client() -> Generator[weaviate.WeaviateClient, None, None]:
client = weaviate.connect_to_local()
client.collections.delete("Paragraph")
client.collections.delete("Article")
client.collections.delete(CLASSES)

col_para = client.collections.create(
name="Paragraph",
Expand Down Expand Up @@ -123,7 +123,9 @@ def test_create_and_restore_backup_with_waiting(client: weaviate.WeaviateClient)

# create backup
classes = ["Article", "Paragraph"]
resp = client.backup.create(backup_id=backup_id, backend=BACKEND, wait_for_completion=True)
resp = client.backup.create(
backup_id=backup_id, backend=BACKEND, wait_for_completion=True, include_collections=CLASSES
)
assert resp.status == BackupStatus.SUCCESS
for cls in classes:
assert cls in resp.collections
Expand All @@ -141,7 +143,9 @@ def test_create_and_restore_backup_with_waiting(client: weaviate.WeaviateClient)
client.collections.delete("Paragraph")

# restore backup
restore = client.backup.restore(backup_id=backup_id, backend=BACKEND, wait_for_completion=True)
restore = client.backup.restore(
backup_id=backup_id, backend=BACKEND, wait_for_completion=True, include_collections=CLASSES
)
assert restore.status == BackupStatus.SUCCESS
for cls in classes:
assert cls in resp.collections
Expand Down Expand Up @@ -349,14 +353,14 @@ def test_fail_creating_backup_for_both_include_and_exclude_classes(


@pytest.mark.parametrize("dynamic_backup_location", [False, True])
def test_backup_and_restore_with_collection(
def test_backup_and_restore_with_dynamic_location(
client: weaviate.WeaviateClient, dynamic_backup_location: bool, tmp_path: pathlib.Path
) -> None:
backup_id = _create_backup_id()

conf_create: Optional[wvc.backup.BackupConfigCreate] = None
conf_restore: Optional[wvc.backup.BackupConfigRestore] = None
backup_location: Optional[wvc.backup.BackupLocation] = None
backup_location: Optional[wvc.backup.BackupLocationType] = None
if dynamic_backup_location:
if client._connection._weaviate_version.is_lower_than(1, 27, 2):
pytest.skip("Cancel backups is only supported from 1.27.2")
Expand Down Expand Up @@ -505,15 +509,18 @@ def test_cancel_backup(
if client._connection._weaviate_version.is_lower_than(1, 24, 25):
pytest.skip("Cancel backups is only supported from 1.24.25")

backup_location: Optional[wvc.backup.BackupLocation] = None
backup_location: Optional[wvc.backup.BackupLocationType] = None
if dynamic_backup_location:
if client._connection._weaviate_version.is_lower_than(1, 27, 2):
pytest.skip("Cancel backups is only supported from 1.27.2")

backup_location = wvc.backup.BackupLocation.FileSystem(path=str(tmp_path))

resp = client.backup.create(
backup_id=backup_id, backend=BACKEND, backup_location=backup_location
backup_id=backup_id,
backend=BACKEND,
backup_location=backup_location,
include_collections=CLASSES,
)
assert resp.status == BackupStatus.STARTED

Expand Down
2 changes: 1 addition & 1 deletion integration/test_batch_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def client_factory(
def _factory(
name: str = "", ports: Tuple[int, int] = (8080, 50051), multi_tenant: bool = False
) -> Tuple[weaviate.WeaviateClient, str]:
nonlocal client_fixture, name_fixtures
nonlocal client_fixture, name_fixtures # noqa: F824
name_fixture = _sanitize_collection_name(request.node.name) + name
name_fixtures.append(name_fixture)
if client_fixture is None:
Expand Down
29 changes: 28 additions & 1 deletion integration/test_client_debug.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
from integration.conftest import ClientFactory, CollectionFactory
import pytest
from integration.conftest import (
AsyncClientFactory,
AsyncCollectionFactory,
ClientFactory,
CollectionFactory,
)

from weaviate.classes.config import DataType, Property
from weaviate.classes.debug import DebugRESTObject
Expand All @@ -22,6 +28,27 @@ def test_get_object_single_node(
assert debug_obj is None


@pytest.mark.asyncio
async def test_get_object_single_node_async(
async_client_factory: AsyncClientFactory, async_collection_factory: AsyncCollectionFactory
) -> None:
client = await async_client_factory()
collection = await async_collection_factory(
properties=[Property(name="name", data_type=DataType.TEXT)]
)

uuid = await collection.data.insert({"name": "John Doe"})

debug_obj = await client.debug.get_object_over_rest(collection.name, uuid)
assert debug_obj is not None
assert isinstance(debug_obj, DebugRESTObject)
assert str(debug_obj.uuid) == str(uuid)

non_existant_uuid = "00000000-0000-0000-0000-000000000000"
debug_obj = await client.debug.get_object_over_rest(collection.name, non_existant_uuid)
assert debug_obj is None


def test_get_object_multi_node(
client_factory: ClientFactory, collection_factory: CollectionFactory
) -> None:
Expand Down
Loading
Loading