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

Add more abstract classes #122

Merged
merged 22 commits into from
Nov 4, 2020
Merged

Add more abstract classes #122

merged 22 commits into from
Nov 4, 2020

Conversation

daffidwilde
Copy link
Owner

In an attempt to tidy up the codebase, and to potentially start some typehinting (#33), more abstract classes have been added for players and matchings now.

@daffidwilde daffidwilde merged commit bcf1f62 into v1.4-prep Nov 4, 2020
@daffidwilde daffidwilde deleted the add-abstract-classes branch November 4, 2020 09:43
daffidwilde added a commit that referenced this pull request Nov 4, 2020
* Move algorithms to submodule (#121)

* Update imports and wording in tests.

* Update subpackage inits and util files.

* Move algorithm funcs to algorithm subpackage.

* Format codebase with isort, black, flake8.

* Update API docs.

* Make `Player.forget()` protected.

i.e. /forget/_forget

* Move to `_forget` in all tests.

* Move to `_forget` in SA player classes.

These players have their own forget methods.

* Move to `_forget` in base game and util function.

* Move to `_forget` in games.

* Protect `Player.match()` and `Player.unmatch()`

* Move to `_(un)match` in other player tests.

* Move to `_unmatch` in SR example test.

* Move to `_(un)match` in all player classes.

* Move to `_(un)match` in games and util functions.

* Protect the `delete` and `match` functions.

The ones in `matching.games.util` are for matching/deleting pairs.

* Make relevant changes to game calls.

* Minor formatting fixes.

* Implement extended algorithms (from book) (#130)

* Implement extended algorithms (from book)

Thanks to The Good Book (citation in `stable_roommates.py`), some minor
adjustments to HR and SM (nothing functionally different), and a
complete overhaul of SR have been implemented.

* Fix formatting.

* Add GusfieldIrving citation to bibliography.

* Add more abstract classes (#122)

* Write tests for new matching classes.

* Write tests for new base class structure.

* Clean up old tests.

* Implement base classes for players and matchings.

* Add compatability to games and hospital classes.

* Update game class tests.

* Catch attribute typo in supervisor.

* Add compatability to other player tests.

* Catch attribute typo in SR test.

* Implement composite strategies for HR tests.

* Update game class tests.

Catch attribute typo in supervisor.

Add compatability to other player tests.

Catch attribute typo in SR test.

* Start implementing composites with SR.

* Format codebase.

* Catch typo in SA tutorial.

* Update classes in README

* Format codebase with black>19

* Add first phase check to SR.

* Fix (now-outdated) logic in tests.

* Add `NoStableMatchingWarning` for SR (#131)

* Add warning catcher to algorithm tests.

* Add warning catcher to solver tests.

* Add no solution example from GS62.

* Implement `NoStableMatchingWarning` source code.

* Drop CI support for 3.6 (add in 3.9)

Also, run the flake8 linter.

* Fix typo in CI flake8 call (snuck in last commit)

* Update changelog and version number.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant