feat(standings): exclusive/non-exclusive opponent filtering - #7957
feat(standings): exclusive/non-exclusive opponent filtering#7957Rathoz wants to merge 2 commits into
Conversation
|
Is it intended that this inverses the same setting in current GTLs? (exclusive=true by default) |
There was a problem hiding this comment.
Pull request overview
Adds an exclusive option to standings import logic so match counting can be restricted to matches where all opponents belong to the standings set (vs the existing behavior where any one opponent is sufficient). This extends the standings table import/filtering behavior while keeping the prior default (non-exclusive) behavior intact, with new specs validating the option across aliasing and imported-opponent scenarios.
Changes:
- Add
|exclusive=handling to the standings table template and pass options into LPDB match import. - Implement exclusive/non-exclusive opponent-based match filtering in
Standings/Parse/Lpdb.lua(including alias resolution before filtering). - Extend
standings_import_spec.luato cover exclusive vs non-exclusive counting, aliases, imported opponents, and literal opponents.
Reviewed changes
Copilot reviewed 3 out of 54 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lua/wikis/commons/Standings/Table.lua | Wires exclusive template arg into LPDB import options. |
| lua/wikis/commons/Standings/Parse/Lpdb.lua | Adds alias application + exclusive/non-exclusive relevance filtering during match import. |
| lua/spec/standings_import_spec.lua | Updates and adds specs to validate filtering behavior and new options. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Yes |
Adds |exclusive= to standings tables. When set, a match is only counted if every opponent of that match is part of the standings. The default (non-exclusive) keeps the previous behaviour, where a single opponent being part of the standings is enough. Opponents count as part of the standings when they are listed manually, or, when importopponents is on, when they would be imported (which is every non-literal opponent). Aliases are resolved before the check, so an aliased opponent counts as the opponent it maps to. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Addresses review feedback: fix grammar in the exclusive option comment, note that the inverted default vs legacy GroupTableLeague is intentional, and correct the importOpponents field doc, which only decides standings membership for the filter here rather than adding opponents itself. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
44ddd4d to
dd36775
Compare
Stacked on #7886 (
standings-alias-support), retarget tomainonce that merges.What
Adds
|exclusive=to standings tables. When set, a match is only counted if every opponent of that match is part of the standings. The default (non-exclusive) is the previous behaviour, where a single opponent being part of the standings is enough.An opponent is part of the standings when it is listed manually, or — when
importopponentsis on — when it would be imported, which is every non-literal opponent. Aliases are resolved before the check.How it was tested
busted— new specs instandings_import_spec.luacover non-exclusive counting a one-sided match, exclusive skipping it, alias resolution running first, imported opponents counting as part of the standings, and exclusive dropping a match against a literal opponent. Existing import specs updated for the new options argument.🤖 Generated with Claude Code