-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
StableMarriage
rank internals (#175)
* Write init test for new single matching * Move to ruff over black for formatting * Remove limit on parallel CI * Write test for SingleMatching repr dunder method * Check dictionary is in single matching repr * Write test for equivalence dunder * Write test for single matching inverter * Remove old SingleMatching tests * Implement SingleMatching class * Move matching classes to subpackage * Write test for instantiating SM classes * Fix ruff config and add pre-commit * Write tests for utility builder * Write test for preference list builder (slow!) * Reduce test size for preference builder * Implement builders for SM * Write input validator tests * Implement input validator * Ensure higher utility leads to higher ranking * Reintegrate tests into modular structure * Translate SM algorithm test to rankings * Write test for player set attribute inverter * Move rank matrices to class attributes * Write tests for solver * Implement solver and algorithm * Rewrite preference converter test * Write test for converting incomplete preferences * Reimplement preference converter * Include preference lookup in attributes * Write optimality tests * Rewrite example tests * Ensure rejections are recorded * Write test for preference matching converter * Revert example tests to use preference terms * Implement a preference matching converter * Reformat code base and drop deprecated np.infty * Bump actions and drop support for Python<3.10 * Stop doctesting paper and fix examples in README * Update all docs that SM touches * Remove creation from instances how-to * Remove SM solver test module * Wrap SR tutorial solution with `dict()` for now The changes to `SingleMatching` are causing issues downstream. Still not sure what this will look like for SR in the future, but this will do for now. * Make small formatting changes * Add in manual matching update for SR test Again, the new `SingleMatching` class is causing issues for SR... * Remove change to SM discussion * Stop rejections leading to immediate forget
- Loading branch information
1 parent
fff4bf7
commit ee04279
Showing
34 changed files
with
1,123 additions
and
830 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-added-large-files | ||
name: Check for files larger than 5 MB | ||
args: [ "--maxkb=5120" ] | ||
- id: end-of-file-fixer | ||
name: Check for a blank line at the end of scripts (auto-fixes) | ||
exclude: '\.Rd' | ||
- id: trailing-whitespace | ||
name: Check for trailing whitespaces (auto-fixes) | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.7.0 | ||
hooks: | ||
- id: ruff | ||
args: [ --fix ] | ||
- id: ruff-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,4 @@ keywords: | |
- matching | ||
- python | ||
- game | ||
license: MIT | ||
license: MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.