deeporiginbio / deeporigin-client

Deep Origin CLI and Python client
https://deeporiginbio.github.io/deeporigin-client/
MIT License
9 stars 0 forks source link

feat: better way of interacting with databases #72

Closed sg-s closed 1 month ago

sg-s commented 1 month ago

problem description

a typical user flow is

right now, to do so, we have to worry about API calls where we have to laboriously pass database ID, column IDs, etc.

proposed solution -- ux

1. user creates a df using pandas-like syntax

Screenshot 2024-08-19 at 9 52 42 PM

2. user modifies some data

the dataframe warns user that there are unsynced changes

Screenshot 2024-08-19 at 9 53 05 PM

3. user uses pandas-like to_deeporigin df method to write changes back to DO

Screenshot 2024-08-19 at 9 53 16 PM

4. user views df again

Screenshot 2024-08-19 at 9 53 34 PM

5. user turns on auto_sync to live dangerously

Screenshot 2024-08-19 at 9 53 47 PM

6. user makes some changes

Screenshot 2024-08-19 at 9 54 03 PM

technical implementation

we create a new class that subclasses a pandas dataframe, and write special methods to talk to the data hub

changes

changes post review