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

refactor: move Question schemas to his own file and unify canonical Question schema adding dataset_id #4487

Conversation

jfcalvo
Copy link
Member

@jfcalvo jfcalvo commented Jan 12, 2024

Description

This PR includes the following changes:

  • Move Question related schemas for API v1 to his own file at schemas/v1/questions.py.
  • Use only one Question canonical schema removing duplications.
  • Question schema will include always dataset_id as attribute.
  • Small renaming of schemas to avoid conflicts in the same file.

Refs #4407

Type of change

(Please delete options that are not relevant. Remember to title the PR according to the type of change)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (change restructuring the codebase without changing functionality)
  • Improvement (change adding some improvement to an existing functionality)
  • Documentation update

How Has This Been Tested

  • Running and modifying unit tests.

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/)

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. area: api Indicates that an issue or pull request is related to the Fast API server or REST endpoints language: python Pull requests or issues that update Python code team: backend Indicates that the issue or pull request is owned by the backend team type: refactor Indicates internal refactoring of the code-base labels Jan 12, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 12, 2024
@jfcalvo jfcalvo merged commit 27c88d9 into refactor/api-v1-schemas-unification Jan 12, 2024
2 checks passed
@jfcalvo jfcalvo deleted the refactor/api-v1-schemas-unification-questions branch January 12, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Indicates that an issue or pull request is related to the Fast API server or REST endpoints language: python Pull requests or issues that update Python code lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files. team: backend Indicates that the issue or pull request is owned by the backend team type: refactor Indicates internal refactoring of the code-base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants