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/3136 feature add more docstrings to pydantic models feedbackdataset #3137

Conversation

davidberenstein1957
Copy link
Member

@davidberenstein1957 davidberenstein1957 commented Jun 8, 2023

Description

I noticed some missing Pydantic Docstring in the FeedbackDataset schemas.

  • I added Pydantic Docstrings to the argilla/client/feedback/schemas.py
  • Pydantic schemas were hinting towards filling them with ResponseSchema and ValueSchema, which feels weird if you need to import them separately from argilla.client.feedback.schemas
    • ResponseSchema is added to the argilla.__init__ imports
    • ValueSchema is added to the argilla.__init__ imports

Closes #3136

Type of change

  • Refactor (change restructuring the codebase without changing functionality)
  • Documentation update

How Has This Been Tested

N.A.

Checklist

@davidberenstein1957 davidberenstein1957 changed the base branch from develop to releases/v1.9.0 June 8, 2023 19:57
@davidberenstein1957 davidberenstein1957 marked this pull request as ready for review June 8, 2023 20:02
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01 ⚠️

Comparison is base (cec9473) 90.92% compared to head (ccc3927) 90.91%.

❗ Current head ccc3927 differs from pull request most recent head 6bd6fac. Consider uploading reports for the commit 6bd6fac to get more accurate results

Additional details and impacted files
@@                 Coverage Diff                 @@
##           releases/v1.9.0    #3137      +/-   ##
===================================================
- Coverage            90.92%   90.91%   -0.01%     
===================================================
  Files                  215      215              
  Lines                11312    11312              
===================================================
- Hits                 10285    10284       -1     
- Misses                1027     1028       +1     
Flag Coverage Δ
pytest 90.91% <ø> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
src/argilla/__init__.py 83.33% <ø> (ø)
src/argilla/client/feedback/schemas.py 98.21% <ø> (ø)

... and 1 file 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.

Copy link
Member

@alvarobartt alvarobartt left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! But I'd add the default value in the docstrings, and use more generic examples (the comments below apply to all the occurrences)

chore: resolved suggestions review Alvaro

Co-authored-by: Alvaro Bartolome <[email protected]>
Co-authored-by: Alvaro Bartolome <[email protected]>
Copy link
Member

@alvarobartt alvarobartt left a comment

Choose a reason for hiding this comment

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

LGTM, but still some defaults are missing, settings should be removed from the schema init, and a minor change in the CHANGELOG.md 😄

required: Whether the question is required or not.
settings: The settings of the question.
labels: The labels of the label question.
visible_labels: The number of visible labels of the label question.
Copy link
Member

Choose a reason for hiding this comment

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

Here we're also missing the defaults! And in the rest of the schemas too!

title: The title of the question.
description: The description of the question.
required: Whether the question is required or not.
settings: The settings of the question.
Copy link
Member

Choose a reason for hiding this comment

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

And I would remove the settings from everywhere, since the user is not able to modify them, so we can ignore them! Also in the next minor release we'll remove those, so either keep them as is and remove then in the next release, or remove them now to avoid confusion.

@davidberenstein1957 davidberenstein1957 merged commit 73ed268 into releases/v1.9.0 Jun 9, 2023
@davidberenstein1957 davidberenstein1957 deleted the feature/3136-feature-add-more-docstrings-to-pydantic-models-feedbackdataset branch June 9, 2023 08:45
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.

[FEATURE] add more docstrings to Pydantic models FeedbackDataset
2 participants