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

[FEATURE] Add workspace_id to GET /api/v1/me/datasets #3726

Closed
alvarobartt opened this issue Sep 7, 2023 · 0 comments · Fixed by #3727
Closed

[FEATURE] Add workspace_id to GET /api/v1/me/datasets #3726

alvarobartt opened this issue Sep 7, 2023 · 0 comments · Fixed by #3727
Assignees
Labels
type: enhancement Indicates new feature requests
Milestone

Comments

@alvarobartt
Copy link
Member

Describe the solution you'd like

The filtering when listing FeedbackDataset datasets to be applied in the API-side rather than locally once all the FeedbackDataset datasets have been pulled from the API. So on, this implies adding the workspace_id param to the GET /api/v1/me/datasets endpoint, as well as removing the for dataset in datasets if dataset.workspace == workspace_id filtering in the Python client side.

@alvarobartt alvarobartt added the type: enhancement Indicates new feature requests label Sep 7, 2023
@alvarobartt alvarobartt added this to the v1.16.0 milestone Sep 7, 2023
@alvarobartt alvarobartt self-assigned this Sep 7, 2023
alvarobartt added a commit that referenced this issue Sep 7, 2023
# Description

This PR adds the `workspace_id` param to `GET /api/v1/me/datasets` so
that the workspace filtering when listing `FeedbackTask` datasets is
applied in the API-side, as well as making sure that no local filters
are applied e.g. `FeedbackDataset.list(workspace=...)`

Closes #3726

**Type of change**

- [X] New feature (non-breaking change which adds functionality)
- [X] Improvement (change adding some improvement to an existing
functionality)

**How Has This Been Tested**

- [x] Add tests for `GET /api/v1/me/datasets` using the `workspace_id`
param, including also the updated policies for non-owner users
- [x] Add tests for `list_datasets` in the Python SDK using the
`workspace_id` arg
- [x] Add tests for `FeedbackDataset.list` in the Python client using
the `workspace` arg

**Checklist**

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

---------

Co-authored-by: Gabriel Martín Blázquez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant