Skip to content

Refactor and add unit tests for rest and label calibration #41

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

Merged

Conversation

gmmajal
Copy link
Contributor

@gmmajal gmmajal commented Apr 8, 2025

Relevant issue: #40

Background info: # any relevant background info for additional context, references to documentations etc.

  • The load_model() method inside qualle/interface/rest.py has no corresponding unit test. A new unit test should be included.
  • The else statement inside the get_concepts_for_subthesaurus() method found in qualle/features/label_calibration/thesauri_label_calibration.py is not being considered in our existing unit tests. This should be remedied.
  • In the most recent release of qualle the version and release-date were not updated inside the pyproject.toml file and CITATION.cff files. This info should be updated.

Changes introduced: # list changes to the code repo made in this pull request

  • A new unit test has been added for load_model().
  • A new case has been inserted inside the unit test test_get_concepts_for_thesaurus() found in tests/features/label_calibration/test_thesauri_label_calibration.py. Some additions had to be introduced inside the common.py and conftest.py files located in the very same folder.
  • The version and release-date of qualle have been updated to match the most recent release. The values inside pyproject.toml file and CITATION.cff file were bumped.
  • pytest filter warnings decorator has been added to filter RuntimeWarning associated with two unit tests that are deliberately using nan values. This point was also mentioned in pull request Warnings being raised in the unit tests #31 .

@gmmajal gmmajal requested a review from Lakshmi-bashyam April 8, 2025 11:21
@gmmajal gmmajal self-assigned this Apr 8, 2025
@gmmajal gmmajal linked an issue Apr 8, 2025 that may be closed by this pull request
2 tasks
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.87%. Comparing base (5f8bec2) to head (0ff4b36).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #41      +/-   ##
==========================================
+ Coverage   94.54%   94.87%   +0.33%     
==========================================
  Files          23       23              
  Lines         898      898              
==========================================
+ Hits          849      852       +3     
+ Misses         49       46       -3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmmajal gmmajal merged commit 420d37e into master Apr 9, 2025
9 checks passed
@gmmajal gmmajal mentioned this pull request Apr 9, 2025
2 tasks
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.

Improve coverage and readability
3 participants