8000 Collection names and UIDs by shabani1 · Pull Request #80 · lexy-ai/lexy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Collection names and UIDs #80

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
merged 2 commits into from
Apr 9, 2024
Merged

Collection names and UIDs #80

merged 2 commits into from
Apr 9, 2024

Conversation

shabani1
Copy link
Contributor
@shabani1 shabani1 commented Apr 9, 2024

What

  • Switch to using collection_name instead of collection_id
    • collection_id will now contain a short UID generated for each collection
    • Support client methods using both collection_id and collection_name
    • New endpoints for the pattern collections/{collection_id}/documents
  • New server CRUD module and client methods to get Collection by name or ID
  • Updated models
    • Binding uses Collection ID as FK but can be created with Collection name
  • Updated documentation and tutorials
  • Additional tests
    • Server tests for bindings
    • Test model creation for bindings, collections,
  • Update server reload setting to only watch for changes in server code

Why

This allows proper CRUD using unique identifiers for collections. We can now change collection names, and use unique collection IDs for storing files in S3/GCS/Azure paths.

Test plan

  • Run make run-tests and verify that all tests pass
  • Run examples/tests.ipynb and verify that there are no errors
  • Run examples/images.ipynb and verify that the tutorial works as expected

Miscellaneous

This PR contains changes to DB schema - easiest way is to drop and recreate your tables. Otherwise you need to run a migration (not provided here because other fields will soon change).

@shabani1 shabani1 merged commit 71938c7 into main Apr 9, 2024
@shabani1 shabani1 deleted the rs/collection-names-and-uids branch April 9, 2024 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0