Initially, we put these scripts here because there was not a good place for them in the codebase. However, it has become clear that they should be integrated into the codebase because:
1) As changes are made to the game/category/mechanic models, these fixtures need to be regenerated.
2) Not having certains functions in the codebase has led us to violate DRY. As an example, the code to autofill games in the create games page and the code to create category and mechanic fixtures is missing the XML parsing functionality that was implemented here.
Proposed next steps:
Create a games/utils folder with a file for BGG API functions and separate script files to regenerate fixtures.
The most up to date BGG API code is a combination of the Creating Game Fixtures and the autofilling code in src/chigame/games/views.py. The code in these places should be combined and put into the games/util folder.
The code to cleanly parse XML code should be added to the code for autofilling game creation and to the code for creating category and mechanic fixtures.
Some new and important code related to fetching information from BoardGameGeek is in wiki pages:
Initially, we put these scripts here because there was not a good place for them in the codebase. However, it has become clear that they should be integrated into the codebase because: 1) As changes are made to the game/category/mechanic models, these fixtures need to be regenerated. 2) Not having certains functions in the codebase has led us to violate DRY. As an example, the code to autofill games in the create games page and the code to create category and mechanic fixtures is missing the XML parsing functionality that was implemented here.
Proposed next steps:
games/utils
folder with a file for BGG API functions and separate script files to regenerate fixtures.src/chigame/games/views.py
. The code in these places should be combined and put into thegames/util
folder.Functions to look at: