Order return of collections.list_all() alphabetically by key#1636
Conversation
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
|
|
To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge. |
|
Hi @saireddythfc, thanks for the contribution! Looks like the linter needs to be ran on your code, we use |
|
Update:
|
|
Update:
@tsmith023 any chance of a formal review? |
tsmith023
left a comment
There was a problem hiding this comment.
Implementation LGTM, just the test needs fixing imo!
tsmith023
left a comment
There was a problem hiding this comment.
LGTM now 😁 The only thing left is the linter complaining about a docstring!
integration/test_collections_sorting.py:15:1: D202 No blank lines allowed after function docstring
Once fixed, I'll merge
Fixed extra spacing after docstring
|
I agree to the CLA shown by @weaviate-git-bot |
Modified the _collection_configs_from_json and _collection_configs_simple_from_json functions in weaviate/collections/classes/config_methods.py to sort the dictionaries by key before returning them.
Added unit tests in test/collection/test_collections_sorting.py to verify the sorting functionality.
Added integration tests in integration/test_collections_sorting.py to verify the sorting in a real environment.