Skip to content

schema.AlgorithmContext#330

Merged
ericbuckley merged 8 commits into
mainfrom
feature/293-algo-context
May 1, 2025
Merged

schema.AlgorithmContext#330
ericbuckley merged 8 commits into
mainfrom
feature/293-algo-context

Conversation

@ericbuckley

@ericbuckley ericbuckley commented Apr 25, 2025

Copy link
Copy Markdown
Collaborator

Description

Create AlgorithmContext nested schema object to store include_multiple_results, log_odds and skip_values.

Related Issues

closes #293

Additional Notes

The max_log_odds_points parameter was removed from the compare method. It's still required in the function, but now we need to retrieve the log_odds value for a feature BEFORE we call the matcher function (previously the matcher functions were retrieving this from the kwargs). Since we're doing that in compare, it seemed simple enough to just make that a calculated value (summations are simple and quick).

<--------------------- REMOVE THE LINES BELOW BEFORE MERGING --------------------->

Checklist

Please review and complete the following checklist before submitting your pull request:

  • I have ensured that the pull request is of a manageable size, allowing it to be reviewed within a single session.
  • I have reviewed my changes to ensure they are clear, concise, and well-documented.
  • I have updated the documentation, if applicable.
  • I have added or updated test cases to cover my changes, if applicable.
  • I have minimized the number of reviewers to include only those essential for the review.

Checklist for Reviewers

Please review and complete the following checklist during the review process:

  • The code follows best practices and conventions.
  • The changes implement the desired functionality or fix the reported issue.
  • The tests cover the new changes and pass successfully.
  • Any potential edge cases or error scenarios have been considered.

@codecov

codecov Bot commented Apr 25, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.11%. Comparing base (952a4da) to head (3ff28ab).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #330      +/-   ##
==========================================
- Coverage   98.23%   98.11%   -0.13%     
==========================================
  Files          33       33              
  Lines        1924     1958      +34     
==========================================
+ Hits         1890     1921      +31     
- Misses         34       37       +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.

@ericbuckley ericbuckley self-assigned this Apr 25, 2025
@ericbuckley ericbuckley marked this pull request as ready for review April 25, 2025 14:01
Comment thread src/recordlinker/schemas/algorithm.py Outdated

@bamader bamader left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sorry for the delay on getting back to this--for whatever reason it just took me a while to wrap my head around the validation layer on top of the caching layer on top of the dictionary. I think everything makes logical sense to me, just a few outstanding questions to clear up on my part!

Comment thread src/recordlinker/assets/initial_algorithms.json
Comment thread src/recordlinker/schemas/algorithm.py
Comment thread src/recordlinker/schemas/algorithm.py Outdated
@bamader bamader self-requested a review April 30, 2025 12:39
bamader
bamader previously approved these changes Apr 30, 2025

@bamader bamader left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Questions have been cleared up so giving the +1 to merge!

@ericbuckley ericbuckley merged commit c559c1e into main May 1, 2025
@ericbuckley ericbuckley deleted the feature/293-algo-context branch May 1, 2025 02:24
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.

create algorithm_context

3 participants