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: add DatasetPublishValidator class #5568

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

jfcalvo
Copy link
Member

@jfcalvo jfcalvo commented Oct 4, 2024

Description

A small refactor moving validation logic for publish_dataset context function to DatasetPublishValidator class. Once we merge this PR then I can do changes to the validations so we can increase flexibility to import datasets from the Hub.

I was bored of creating "helper functions" for counting queries for database so I have added count_by function into our database models mixin class. I hope it can be useful.

Type of change

  • Refactor (change restructuring the codebase without changing functionality)

How Has This Been Tested

  • Running test suite.

Checklist

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

@jfcalvo jfcalvo requested a review from frascuchon October 4, 2024 12:25
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.28%. Comparing base (9677435) to head (4028784).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5568   +/-   ##
========================================
  Coverage    91.28%   91.28%           
========================================
  Files          145      145           
  Lines         6025     6037   +12     
========================================
+ Hits          5500     5511   +11     
- Misses         525      526    +1     
Flag Coverage Δ
argilla-server 91.28% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jfcalvo jfcalvo merged commit 6c5d5e9 into develop Oct 4, 2024
4 of 5 checks passed
@jfcalvo jfcalvo deleted the refactor/add-dataset-publish-validator branch October 4, 2024 12:34
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