Skip to content
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

feat: Add data loading and attaching to server #1051

Merged
merged 5 commits into from
Feb 25, 2024
Merged

feat: Add data loading and attaching to server #1051

merged 5 commits into from
Feb 25, 2024

Conversation

sarahwooders
Copy link
Collaborator

@sarahwooders sarahwooders commented Feb 23, 2024

Please describe the purpose of this pull request.
Currently only the CLI can load data source and attach source to agents. This adds three new functions to the SyncServer class:

  • server.create_source(name: str, user_id: uuid.UUID) - Create a source for a user (must be unique)
  • server.load_data(user_id: uuid.UUID, connector: DataConnector, source_name: Source) - Load data from a connector class into a user's source
  • server.attach_source_to_agent(self, user_id: uuid.UUID, agent_id: uuid.UUID, source_name: str) - Attached a source to an agent

How to test
The tests in test_server.py have been updated to test these functions.

Have you tested this PR?
Yes

Related issues or PRs
#1005

Is your PR over 500 lines of code?
No

@sarahwooders sarahwooders changed the title feature: Add data loading and attaching to server feat: Add data loading and attaching to server Feb 23, 2024
@sarahwooders sarahwooders requested a review from cpacker February 24, 2024 23:36
Copy link
Collaborator

@cpacker cpacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hell yeah brother

@cpacker cpacker merged commit ce1ce9d into main Feb 25, 2024
4 checks passed
@cpacker cpacker deleted the file-server branch February 25, 2024 03:34
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.

2 participants