This feature request is for...
PyGambit
Requested enahancement or feature
This issue is meant to scope an initial PR of the games library/catalog idea discussed in #623 but not yet to move all tests & documentation/tutorials etc over to loading from the catalog.
To do:
This feature request is for...
PyGambit
Requested enahancement or feature
This issue is meant to scope an initial PR of the games library/catalog idea discussed in #623 but not yet to move all tests & documentation/tutorials etc over to loading from the catalog.
To do:
/catalogand move the EFG/NFG files from contrib/games therecatalog.pywhich contains the catalog of games.g = pygambit.catalog.PrisonersDilemma()game_typefromgame_filecatalog.pycatalog.pyshould be refactored to be a proper database, whether a yml/json file or sqlite etcI think a json/yml file would be harder to maintain and look at diffs in PRs, db is overkillcatalog.ymlwhich is generated by the database building scriptAnother option could be a "catalog metadata" dataclass that is added to Game objects directlyvalid_game: falseread_efg("game.efg")orread_nfg("game.nfg")and return the game objectcatalog.ymlhave a docstring, which gets populated bygame.commentor description field (not metadata) in the catalog entrytests/games.pyupdate.pyadds games to the rst doc from catalog.py as well as catalog.ymlgames()function builds each game when it runssubclass.gameto get themImportErrorwhen doingfrom pygambit import catalogcatalog.load()function which generates the classes, so we don't have to do so when importing pygambit to begin with?catalog.pycatalog_update.pyworks as expected now catalog location movedcatalog_update.pyshould also updateMakefile.amOR the latter should load fromcatalog.ymlcatalog_update.pyagain should update rstdocstringfield that gets used to describe the field in the docs page - can we make each metadata field an optional attribute ofCatalogGamewith a type and possible valuescontrib/gamestocatalog_game_filesW_ex1and similar catalog funcs not getting docs built with _game docstring?loaded from (could have an
imgfield incatalog.yml)catalog_update.pycoded_gamesand make sure an error is thrown if you try to make one with the_gamefunction not returning a gamecatalog.ymlcatalog_games.pycatalog_update.pyscript workspip install ruamel.yamlCatalogGame