Implement Support for Client Updates
Closed this issue · 1 comments
AndyGrant commented
Client.py should check for a config file in the same directory. This config file should hold many of the settings that are found in Client.py currently. These settings should be documented in the wiki. One possible setting is auto-update true, and update-repository <>. Whenever the Client is told it is out of date (!), instead of quitting, it will auto update itself. The mechanism by which this happens is unclear at this time.
AndyGrant commented
Here is how we are going to do this:
- Add an endpoint to the API, which provides the repo and branch/tag/commit of the current version being used. For example, in the config.py, we'll have
OPENBENCH_REPO='AndyGrant/OpenBench'
,OPENBENCH_REF='master'
. - We will start finally splitting the Client into multiple files. The primary driver will be a very small file. The only purpose of this file is to hit the aforementioned endpoint, download the .zip from github, extract the files, and create a local setup. This will remove the need to explicitly download cutechess.
- After that driver was pulled everything done, it will import and run some entry point function to the real client.
- We will add a proper Exception called WrongOpenBenchVersion. If this is caught in the driver, then we will download the files once again.