Skip to content

Commit 80cb91a

Browse files
committed
Python: refresh Qdrant constraints and compare declared constraints both ways in connector extras doc test
The Qdrant rows in CONNECTOR_EXTRAS.md still said qdrant-client ~= 1.9 while main declares ~= 1.10. The version check only compared printed specifiers against pyproject, so a row that dropped its specifier passed on package-name equality. Add the reverse direction. Assisted-by: Claude Code/Sonnet 5.5 Machine: MacBook-Anton Account: tonydzi Operator: Anton Signed-off-by: Anton Dziatkovskii <[email protected]>
1 parent d6baf6d commit 80cb91a

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

‎python/docs/CONNECTOR_EXTRAS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ two packages and exists as an explicit opt-in name rather than as an additional
6565
| Oracle 23ai | `semantic_kernel.connectors.oracle` | `oracledb` | `oracledb >= 3.4.1` |
6666
| Pinecone | `semantic_kernel.connectors.pinecone` | `pinecone` | `pinecone[asyncio, grpc] ~= 7.0`, `pinecone[asyncio, grpc] ~= 7.3` (selected by sys_platform marker) |
6767
| Postgres / pgvector | `semantic_kernel.connectors.postgres` | `postgres` | `psycopg[binary,pool] ~= 3.2` |
68-
| Qdrant | `semantic_kernel.connectors.qdrant` | `qdrant` | `qdrant-client ~= 1.9` |
68+
| Qdrant | `semantic_kernel.connectors.qdrant` | `qdrant` | `qdrant-client ~= 1.10` |
6969
| Redis | `semantic_kernel.connectors.redis` | `redis` | `redis[hiredis] >= 6,< 8`, `redisvl ~= 0.4`, `types-redis ~= 4.6.0.20240425` |
7070
| SQL Server | `semantic_kernel.connectors.sql_server` | `sql` | `pyodbc >= 5.2` |
7171
| Weaviate | `semantic_kernel.connectors.weaviate` | `weaviate` | `weaviate-client>=4.17.0,<5.0` |
@@ -87,7 +87,7 @@ They are listed here because some extras exist only for them.
8787
| MongoDB Atlas (deprecated) | `semantic_kernel.connectors.memory_stores.mongodb_atlas` | `mongo` | `pymongo >= 4.8.0, < 4.17` |
8888
| Pinecone (deprecated) | `semantic_kernel.connectors.memory_stores.pinecone` | `pinecone` | `pinecone[asyncio, grpc] ~= 7.0`, `pinecone[asyncio, grpc] ~= 7.3` |
8989
| Postgres (deprecated) | `semantic_kernel.connectors.memory_stores.postgres` | `postgres` | `psycopg[binary,pool] ~= 3.2` |
90-
| Qdrant (deprecated) | `semantic_kernel.connectors.memory_stores.qdrant` | `qdrant` | `qdrant-client ~= 1.9` |
90+
| Qdrant (deprecated) | `semantic_kernel.connectors.memory_stores.qdrant` | `qdrant` | `qdrant-client ~= 1.10` |
9191
| Redis (deprecated) | `semantic_kernel.connectors.memory_stores.redis` | `redis` | `redis[hiredis] >= 6,< 8` |
9292
| USearch (deprecated) | `semantic_kernel.connectors.memory_stores.usearch` | `usearch` | `usearch >= 2.16,< 2.25`, `pyarrow>=12.0,<26.0` |
9393
| Weaviate (deprecated) | `semantic_kernel.connectors.memory_stores.weaviate` | `weaviate` | `weaviate-client>=4.17.0,<5.0` |

‎python/tests/unit/test_connector_extras_doc.py‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
* an extra named in the doc that does not exist in pyproject.toml,
99
* a connector extra in pyproject.toml that no doc row mentions,
1010
* upstream package names for an extra that differ between the two files,
11-
* a version specifier in the doc that no longer matches pyproject.toml,
11+
* a version specifier in the doc that no longer matches pyproject.toml, or a documented
12+
package whose declared constraint the row leaves out,
1213
* an import path in the doc that does not exist on disk,
1314
* a row claiming a package that its own connector never imports.
1415
@@ -199,6 +200,18 @@ def test_version_constraints_match_pyproject():
199200
f"{DOC.name} line {row['line']} ({row['connector']}): '{requirement}' does not match the "
200201
f"constraint declared in pyproject.toml for {sorted(extras)}"
201202
)
203+
# Reverse direction: a documented package must print the full constraint pyproject.toml
204+
# declares for it, so dropping a specifier (bare `mistralai`) cannot pass on name equality.
205+
printed = {_normalize(requirement) for requirement in row["upstream"]}
206+
documented_names = {_canonical_name(requirement) for requirement in row["upstream"]}
207+
for extra in sorted(extras):
208+
for declared in optional[extra]:
209+
if _canonical_name(declared) not in documented_names:
210+
continue # another row documents this package
211+
assert _normalize(declared) in printed, (
212+
f"{DOC.name} line {row['line']} ({row['connector']}): pyproject.toml declares "
213+
f"'{declared}' for extra '{extra}' but the row does not print that constraint"
214+
)
202215

203216

204217
def test_documented_import_paths_exist():

0 commit comments

Comments
 (0)