-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Python: Naming updates #12233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
eavanvalkenburg
merged 6 commits into
microsoft:feature-python-vector-stores-preb
from
eavanvalkenburg:naming_updates
May 23, 2025
Merged
Python: Naming updates #12233
eavanvalkenburg
merged 6 commits into
microsoft:feature-python-vector-stores-preb
from
eavanvalkenburg:naming_updates
May 23, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python Unit Test Overview
|
c019bee
to
fcc2d3e
Compare
6ff8235
to
ba76e86
Compare
ba76e86
to
010c8b5
Compare
moonbox3
approved these changes
May 23, 2025
35e69fc
into
microsoft:feature-python-vector-stores-preb
19 checks passed
eavanvalkenburg
added a commit
that referenced
this pull request
May 26, 2025
<!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This pull request introduces several updates across multiple files to standardize naming conventions, improve consistency in method calls, and modernize data model definitions. The primary changes include renaming key classes and methods, replacing deprecated fields with updated ones, and ensuring uniformity in collection management operations. * Replaced `VectorStoreRecordDataField`, `VectorStoreRecordKeyField`, and `VectorStoreRecordVectorField` with `VectorStoreDataField`, `VectorStoreKeyField`, and `VectorStoreVectorField` respectively across all relevant files. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17R16-R19) [[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL10-L18) [[3]](diffhunk://#diff-af84e00363a79d8bd2f3b72976ecc95c0744fcdf89930ac9b058bfd27b27b83eL18-R18) [[4]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L30-R36) [[5]](diffhunk://#diff-4c45e261749985abb60b9bd147b2bd2cb91fdfda869190da1f56c89032667eefL11-R14) * Updated data models in `semantic_caching.py`, `store_chat_history_in_cosmosdb.py`, and other files to use the new field types for consistency. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L35-R37) [[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL42-R44) [[3]](diffhunk://#diff-af84e00363a79d8bd2f3b72976ecc95c0744fcdf89930ac9b058bfd27b27b83eL63-R80) * Renamed `create_collection_if_not_exists` to `ensure_collection_exists` and `delete_collection` to `ensure_collection_deleted` for clarity and consistency. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L68-R68) [[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL194-R194) [[3]](diffhunk://#diff-3ad17b6faefe0a6ac2fff5b863169e5aac7ab99c49d4f376ba46f2d0d181b642L67-R67) * Updated method calls in various files to reflect these changes. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L89-R89) [[2]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L150-R149) * Renamed `AzureCosmosDBNoSQLStore` to `CosmosNoSqlStore` and `AzureCosmosDBNoSQLCollection` to `CosmosNoSqlCollection`. Similar updates were made to MongoDB-related classes. [[1]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL178-R178) [[2]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L16-R18) * Replaced `data_model_type` with `record_type` in collection initialization across multiple files for uniformity. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L53-R53) [[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL67-R69) [[3]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L99-R123) * Consolidated imports for improved readability and maintainability. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17R16-R19) [[2]](diffhunk://#diff-af84e00363a79d8bd2f3b72976ecc95c0744fcdf89930ac9b058bfd27b27b83eL18-R18) * Adjusted default values and annotations in data models to align with the updated field types. [[1]](diffhunk://#diff-4c45e261749985abb60b9bd147b2bd2cb91fdfda869190da1f56c89032667eefL47-R58) [[2]](diffhunk://#diff-4c45e261749985abb60b9bd147b2bd2cb91fdfda869190da1f56c89032667eefL72-R71) These changes collectively enhance the maintainability and readability of the codebase while ensuring alignment with modern conventions. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Closes: #11938 <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
eavanvalkenburg
added a commit
to eavanvalkenburg/semantic-kernel
that referenced
this pull request
May 26, 2025
<!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This pull request introduces several updates across multiple files to standardize naming conventions, improve consistency in method calls, and modernize data model definitions. The primary changes include renaming key classes and methods, replacing deprecated fields with updated ones, and ensuring uniformity in collection management operations. * Replaced `VectorStoreRecordDataField`, `VectorStoreRecordKeyField`, and `VectorStoreRecordVectorField` with `VectorStoreDataField`, `VectorStoreKeyField`, and `VectorStoreVectorField` respectively across all relevant files. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17R16-R19) [[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL10-L18) [[3]](diffhunk://#diff-af84e00363a79d8bd2f3b72976ecc95c0744fcdf89930ac9b058bfd27b27b83eL18-R18) [[4]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L30-R36) [[5]](diffhunk://#diff-4c45e261749985abb60b9bd147b2bd2cb91fdfda869190da1f56c89032667eefL11-R14) * Updated data models in `semantic_caching.py`, `store_chat_history_in_cosmosdb.py`, and other files to use the new field types for consistency. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L35-R37) [[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL42-R44) [[3]](diffhunk://#diff-af84e00363a79d8bd2f3b72976ecc95c0744fcdf89930ac9b058bfd27b27b83eL63-R80) * Renamed `create_collection_if_not_exists` to `ensure_collection_exists` and `delete_collection` to `ensure_collection_deleted` for clarity and consistency. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L68-R68) [[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL194-R194) [[3]](diffhunk://#diff-3ad17b6faefe0a6ac2fff5b863169e5aac7ab99c49d4f376ba46f2d0d181b642L67-R67) * Updated method calls in various files to reflect these changes. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L89-R89) [[2]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L150-R149) * Renamed `AzureCosmosDBNoSQLStore` to `CosmosNoSqlStore` and `AzureCosmosDBNoSQLCollection` to `CosmosNoSqlCollection`. Similar updates were made to MongoDB-related classes. [[1]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL178-R178) [[2]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L16-R18) * Replaced `data_model_type` with `record_type` in collection initialization across multiple files for uniformity. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L53-R53) [[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL67-R69) [[3]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L99-R123) * Consolidated imports for improved readability and maintainability. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17R16-R19) [[2]](diffhunk://#diff-af84e00363a79d8bd2f3b72976ecc95c0744fcdf89930ac9b058bfd27b27b83eL18-R18) * Adjusted default values and annotations in data models to align with the updated field types. [[1]](diffhunk://#diff-4c45e261749985abb60b9bd147b2bd2cb91fdfda869190da1f56c89032667eefL47-R58) [[2]](diffhunk://#diff-4c45e261749985abb60b9bd147b2bd2cb91fdfda869190da1f56c89032667eefL72-R71) These changes collectively enhance the maintainability and readability of the codebase while ensuring alignment with modern conventions. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Closes: microsoft#11938 <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
eavanvalkenburg
added a commit
to eavanvalkenburg/semantic-kernel
that referenced
this pull request
May 26, 2025
<!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This pull request introduces several updates across multiple files to standardize naming conventions, improve consistency in method calls, and modernize data model definitions. The primary changes include renaming key classes and methods, replacing deprecated fields with updated ones, and ensuring uniformity in collection management operations. * Replaced `VectorStoreRecordDataField`, `VectorStoreRecordKeyField`, and `VectorStoreRecordVectorField` with `VectorStoreDataField`, `VectorStoreKeyField`, and `VectorStoreVectorField` respectively across all relevant files. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17R16-R19) [[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL10-L18) [[3]](diffhunk://#diff-af84e00363a79d8bd2f3b72976ecc95c0744fcdf89930ac9b058bfd27b27b83eL18-R18) [[4]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L30-R36) [[5]](diffhunk://#diff-4c45e261749985abb60b9bd147b2bd2cb91fdfda869190da1f56c89032667eefL11-R14) * Updated data models in `semantic_caching.py`, `store_chat_history_in_cosmosdb.py`, and other files to use the new field types for consistency. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L35-R37) [[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL42-R44) [[3]](diffhunk://#diff-af84e00363a79d8bd2f3b72976ecc95c0744fcdf89930ac9b058bfd27b27b83eL63-R80) * Renamed `create_collection_if_not_exists` to `ensure_collection_exists` and `delete_collection` to `ensure_collection_deleted` for clarity and consistency. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L68-R68) [[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL194-R194) [[3]](diffhunk://#diff-3ad17b6faefe0a6ac2fff5b863169e5aac7ab99c49d4f376ba46f2d0d181b642L67-R67) * Updated method calls in various files to reflect these changes. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L89-R89) [[2]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L150-R149) * Renamed `AzureCosmosDBNoSQLStore` to `CosmosNoSqlStore` and `AzureCosmosDBNoSQLCollection` to `CosmosNoSqlCollection`. Similar updates were made to MongoDB-related classes. [[1]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL178-R178) [[2]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L16-R18) * Replaced `data_model_type` with `record_type` in collection initialization across multiple files for uniformity. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L53-R53) [[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL67-R69) [[3]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L99-R123) * Consolidated imports for improved readability and maintainability. [[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17R16-R19) [[2]](diffhunk://#diff-af84e00363a79d8bd2f3b72976ecc95c0744fcdf89930ac9b058bfd27b27b83eL18-R18) * Adjusted default values and annotations in data models to align with the updated field types. [[1]](diffhunk://#diff-4c45e261749985abb60b9bd147b2bd2cb91fdfda869190da1f56c89032667eefL47-R58) [[2]](diffhunk://#diff-4c45e261749985abb60b9bd147b2bd2cb91fdfda869190da1f56c89032667eefL72-R71) These changes collectively enhance the maintainability and readability of the codebase while ensuring alignment with modern conventions. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Closes: microsoft#11938 <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
This pull request introduces several updates across multiple files to standardize naming conventions, improve consistency in method calls, and modernize data model definitions. The primary changes include renaming key classes and methods, replacing deprecated fields with updated ones, and ensuring uniformity in collection management operations.
Standardization of Data Model Fields:
VectorStoreRecordDataField
,VectorStoreRecordKeyField
, andVectorStoreRecordVectorField
withVectorStoreDataField
,VectorStoreKeyField
, andVectorStoreVectorField
respectively across all relevant files. [1] [2] [3] [4] [5]semantic_caching.py
,store_chat_history_in_cosmosdb.py
, and other files to use the new field types for consistency. [1] [2] [3]Renaming and Refactoring Collection Management:
create_collection_if_not_exists
toensure_collection_exists
anddelete_collection
toensure_collection_deleted
for clarity and consistency. [1] [2] [3]Renaming Classes for Improved Clarity:
AzureCosmosDBNoSQLStore
toCosmosNoSqlStore
andAzureCosmosDBNoSQLCollection
toCosmosNoSqlCollection
. Similar updates were made to MongoDB-related classes. [1] [2]Consistency in Record Type Definitions:
data_model_type
withrecord_type
in collection initialization across multiple files for uniformity. [1] [2] [3]Miscellaneous Updates:
These changes collectively enhance the maintainability and readability of the codebase while ensuring alignment with modern conventions.
Description
Closes: #11938
Contribution Checklist