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

refactor(stage): create an abstraction for file locations #45

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

nunogoncalves03
Copy link
Member

We have recently updated the Management API to include new endpoints for managing files in personal and shared spaces. Thus, we would like to update the Python SDK to support these resources as well.

Since the methods for stage files and personal/shared space files are quite similar, we would like to refactor the Python SDK by introducing an abstract class called FileLocation. This class will initially be implemented by Stage and later by the other file spaces.

This PR introduces the abstract class and modifies the previously implemented file objects to make them generic for future use with other file spaces.

cc: @ricardoasmarques @kanitsharma

@nunogoncalves03 nunogoncalves03 added the feature New feature or request label Nov 25, 2024
@nunogoncalves03 nunogoncalves03 self-assigned this Nov 25, 2024
@nunogoncalves03 nunogoncalves03 changed the title feat(stage): create an abstraction for FileLocation feat(stage): create an abstraction for file locations Nov 25, 2024
@nunogoncalves03 nunogoncalves03 changed the title feat(stage): create an abstraction for file locations refactor(stage): create an abstraction for file locations Nov 25, 2024
Base automatically changed from ngoncalves/stage-starter-workspaces to main November 25, 2024 14:55
@nunogoncalves03 nunogoncalves03 force-pushed the ngoncalves/file-location-refactor branch from 6942115 to 2f0a82d Compare December 2, 2024 11:59
singlestoredb/management/files.py Outdated Show resolved Hide resolved
singlestoredb/management/workspace.py Show resolved Hide resolved
Copy link
Collaborator

@kesmit13 kesmit13 left a comment

Choose a reason for hiding this comment

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

It looks like *.ipynb needs to be added to the options.package_data in setup.cfg. The notebook files are not being installed in the test directory.

@nunogoncalves03 nunogoncalves03 force-pushed the ngoncalves/file-location-refactor branch from 8e2fc5b to fc5bbaa Compare December 3, 2024 18:10
@kesmit13 kesmit13 merged commit 86ac2cb into main Dec 3, 2024
11 checks passed
@kesmit13 kesmit13 deleted the ngoncalves/file-location-refactor branch December 3, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants