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 list_user_workspaces and User.workspaces property #3334

Merged
merged 21 commits into from
Jul 4, 2023

Conversation

alvarobartt
Copy link
Member

@alvarobartt alvarobartt commented Jul 4, 2023

Description

This PR adds the list_user_workspaces function in the SDK and the Python client, as of the recently included API endpoint at #3308, so this PR needs to wait upon its parent one to be merged first.

This PR then, solves the issue we had when listing workspaces from an user, since we were listing all the workspaces, and just available for certain users.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested

  • Add unit tests for both the SDK and the Python client

Checklist

  • I added relevant documentation
  • follows the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I filled out the contributor form (see text above)
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

@alvarobartt alvarobartt added this to the v1.13 milestone Jul 4, 2023
@alvarobartt alvarobartt requested a review from gabrielmbmb July 4, 2023 12:07
src/argilla/client/users.py Outdated Show resolved Hide resolved
alvarobartt and others added 2 commits July 4, 2023 16:42
@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Patch coverage: 93.71% and project coverage change: +0.25 🎉

Comparison is base (6630d7b) 90.13% compared to head (75156ae) 90.39%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3334      +/-   ##
===========================================
+ Coverage    90.13%   90.39%   +0.25%     
===========================================
  Files          233      238       +5     
  Lines        12493    12739     +246     
===========================================
+ Hits         11261    11515     +254     
+ Misses        1232     1224       -8     
Flag Coverage Δ
pytest ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ack/integrations/huggingface/card/_dataset_card.py 100.00% <ø> (ø)
.../feedback/integrations/huggingface/card/_parser.py 100.00% <ø> (ø)
src/argilla/tasks/database/migrate.py 39.13% <ø> (-4.87%) ⬇️
src/argilla/server/settings.py 77.65% <50.00%> (-3.52%) ⬇️
src/argilla/server/database.py 76.47% <60.00%> (-23.53%) ⬇️
...lient/feedback/integrations/huggingface/dataset.py 85.36% <85.36%> (ø)
src/argilla/server/contexts/datasets.py 92.46% <89.84%> (-3.56%) ⬇️
src/argilla/server/apis/v0/handlers/workspaces.py 89.39% <90.90%> (+1.06%) ⬆️
src/argilla/client/feedback/config.py 92.59% <91.66%> (-7.41%) ⬇️
src/argilla/client/sdk/v1/users/api.py 92.30% <92.30%> (ø)
... and 43 more

... and 9 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@alvarobartt alvarobartt requested a review from frascuchon July 4, 2023 15:04
@gabrielmbmb gabrielmbmb merged commit a784149 into develop Jul 4, 2023
@gabrielmbmb gabrielmbmb deleted the feat/list-user-workspaces branch July 4, 2023 15:25
leiyre pushed a commit that referenced this pull request Jul 5, 2023
* develop:
  fix: return all workspaces in system for owner users (#3343)
  fix: `rg.init` with argilla user using quickstart images raise an unexpected error (#3341)
  feat: add `Suggestion` endpoints (#3304)
  feat: add `list_user_workspaces` and `User.workspaces` property (#3334)
  refactor: add `HuggingFaceDatasetMixIn` under `integrations` (#3326)
  feat: add list user workspaces endpoint (#3308)
  ci: Stop linking issues to team work project
  chore: add missing `greenlet` dependency in `server` extra (#3330)
  docs: update developer docs (#3314)
  Docs/3312 docs 112 is not building correctly (#3313)
  fix: unit test failing if not local db (#3307)
  ci: Optimize build + test pipeline (#3300)
  refactor: simplify old bulk endpoints to avoid create datasets if does not exists (#3306)
leiyre pushed a commit that referenced this pull request Jul 5, 2023
* develop:
  fix: return all workspaces in system for owner users (#3343)
  fix: `rg.init` with argilla user using quickstart images raise an unexpected error (#3341)
  feat: add `Suggestion` endpoints (#3304)
  feat: add `list_user_workspaces` and `User.workspaces` property (#3334)
  docs: update developer docs (#3314)
  Docs/3312 docs 112 is not building correctly (#3313)
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