julien-boudry / Condorcet

Command line application and PHP library, providing an election engine with a high-level interface. Native support 20+ voting methods, easy to extend. Support simple elections with ease or billions of votes in low resource environment. Intensively tested and highly polyvalent.
https://www.condorcet.io
MIT License
119 stars 11 forks source link

FilteredPairwise now accepts a minimum number of tags. #162

Closed LiamM32 closed 1 year ago

LiamM32 commented 1 year ago

With my new commit, getFilteredPairwise() now accepts an int as the second argument to specify a minimum number of tags which must match the tags specified in the first argument, but if set to 0 it will only use votes without any of the specified tags.

I added a test for this. This test and all existing tests are now successful.

julien-boudry commented 1 year ago

It's a good PR, has valuable functionality, and is well-executed regarding backward compatibility. I have added some additional extensions, code standards & internal simplification.

I will merge it now, thanks!

LiamM32 commented 1 year ago

Yay! Now I can put the 'split-vote' branch of Eurovision_Condorcet back on Condorcet dev-4.5.

I don't understand the failed check for Codacy Static Code Analysis. What's that about?

julien-boudry commented 1 year ago

Yes, something that I have to fix. Codacy accepts only running on the master branch, but the test try running on every branch.