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

Improve how the E.M type is detected to match fair data station properties #2069

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

stuzart
Copy link
Member

@stuzart stuzart commented Nov 19, 2024

Problem was discovered during testing, where it was matching the wrong EMType based on just the number of properties matching.

Now updated to downgrade matches based on the number of properties left over. So if 2 properties match all the properties of one type this will be chosen in preference to another where 2 also match, but there are several properties that don't match.

due to unexpected results found during testing.
@stuzart stuzart added this to the 1.16.0 milestone Nov 19, 2024
@stuzart stuzart changed the base branch from main to seek-1.16 November 19, 2024 13:03
score = (property_ids - pids).length
emt = nil if (property_ids & pids).empty?
[score, emt]
extended_metadata_property_ids = collect_extended_metadata_type_attibute_pids(emt)
Copy link
Contributor

Choose a reason for hiding this comment

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

Will properties in the datastation_entity that are not covered by the EMT be ignored?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, they are included in the difference score. It's why I used

(property_ids | extended_metadata_property_ids) - intersection

instead of just

extended_metadata_property_ids - property_ids

@stuzart stuzart merged commit 280e2e0 into seek-1.16 Nov 21, 2024
23 checks passed
@stuzart stuzart deleted the fds-detect-emtd branch November 21, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants