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

workspace handles #554

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

workspace handles #554

wants to merge 7 commits into from

Conversation

nikochiko
Copy link
Member

@nikochiko nikochiko commented Dec 4, 2024

  • db: add handle to workspaces
  • add default handle generator for workspaces
  • refactor input box and update logic for handles
  • add handles to workspace admin
  • show handle-input on workspaces
  • create default handle for workspaces on creation

Q/A checklist

  • If you add new dependencies, did you update the lock file?
poetry lock --no-update
  • Run tests
ulimit -n unlimited && ./scripts/run-tests.sh
  • Do a self code review of the changes - Read the diff at least twice.
  • Carefully think about the stuff that might break because of this change - this sounds obvious but it's easy to forget to do "Go to references" on each function you're changing and see if it's used in a way you didn't expect.
  • The relevant pages still run when you press submit
  • The API for those pages still work (API tab)
  • The public API interface doesn't change if you didn't want it to (check API tab > docs page)
  • Do your UI changes (if applicable) look acceptable on mobile?
  • Ensure you have not regressed the import time unless you have a good reason to do so.
    You can visualize this using tuna:
python3 -X importtime -c 'import server' 2> out.log && tuna out.log

To measure import time for a specific library:

$ time python -c 'import pandas'

________________________________________________________
Executed in    1.15 secs    fish           external
   usr time    2.22 secs   86.00 micros    2.22 secs
   sys time    0.72 secs  613.00 micros    0.72 secs

To reduce import times, import libraries that take a long time inside the functions that use them instead of at the top of the file:

def my_function():
    import pandas as pd
    ...

Legal Boilerplate

Look, I get it. The entity doing business as “Gooey.AI” and/or “Dara.network” was incorporated in the State of Delaware in 2020 as Dara Network Inc. and is gonna need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Dara Network Inc can use, modify, copy, and redistribute my contributions, under its choice of terms.


@nikochiko nikochiko marked this pull request as ready for review December 4, 2024 14:57
@nikochiko nikochiko requested review from devxpy and removed request for devxpy December 4, 2024 14:57
@nikochiko
Copy link
Member Author

@devxpy do you want to review and merge this part first? - adding workspace->handle to DB and allowing workspace admins to edit it.

Or, to wait and review it along with the UI changes for rendering the workspace page on /{workspace-handle} (that is not in this PR yet)?

@nikochiko
Copy link
Member Author

image

return new_handle


def update_handle(handle: Handle | None, name: str | None) -> Handle | None:
Copy link
Member

Choose a reason for hiding this comment

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

this could be a method on Handle?

@devxpy
Copy link
Member

devxpy commented Dec 6, 2024

I do think the better path would be to move handles from app user to workspace entirely, but I guess this is easier

@nikochiko
Copy link
Member Author

I was thinking the same, but not entirely. On the users' profile page, we do include contributions to other workspaces and I think that's the way we want it.

I also think it's likely that we might want to allow adding saved runs from another workspace to a user's profile a la github

@devxpy
Copy link
Member

devxpy commented Dec 12, 2024

I meant more like how we transferred billing info from user to workspace so its consistent and we can always refer to current_workspace.handle

@nikochiko
Copy link
Member Author

that makes sense to me 👍

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