populationgenomics / metamist

Sample level metadata system
MIT License
1 stars 1 forks source link

Fix mismatch between epid and esid in create_test_subset #815

Closed vivbak closed 4 weeks ago

vivbak commented 1 month ago

Closes https://github.com/populationgenomics/metamist/issues/814

When the sample_to_sg_attribute_map is created, the keys are created like so:

exid_old_sid = (s['participant']['externalId'], s['id'])

When the code later references this map, it creates the keys like so

seid_sid_key = (new_sample['externalId'], old_sid)

Using the externalID from the participant when setting up the map, and using the externalID from the sample when accessing it later.

We often use the same name for both, so this can go relatively unnoticed in production.

codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 77.30%. Comparing base (b8121aa) to head (9b912d5).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #815 +/- ## ======================================= Coverage 77.30% 77.30% ======================================= Files 157 157 Lines 13010 13010 ======================================= Hits 10057 10057 Misses 2953 2953 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.