[APPROVED] WildCogs - Chess in Discord

Discord Name:
WildStriker#6222

GitHub Repository (Must be V3):

Description:
Only one cog to play chess with another user. Its working but probably has some bugs…

use standard algerbraic notation to complete a move. see example here:


I use CairoSVG to convert python-chess svg board into a png (does discord support svg embedded images? possibly in the future?) It requires a specific version required for Windows OS as I couldn’t get it to work out of the box.

On Linux you need to install cairo separately
https://cairosvg.org/documentation/#installation

1 Like

Hey Wild Striker. Thanks for the submission. I’ll be taking a look at your cogs tomorrow. Just wanted to give you a heads up that I’ll be the reviewer for this application.

I have completed my review, and overall I found the cog to be refreshing. You do fall, below our minimum requirement of three cogs, but this one is complex enough to meet our declared exception. There is however, some work to do. If you have any questions or comments please feel free to respond on this thread or you can message me on discord.

Top Level

You are missing a readme for your repository.
Your info.json at the main level has some incorrect values for the keys.
Check out this link for an example on how to set up your repository.

Chess Game

  • Missing some keys in your info.json file.
  • chess_game folder name should be chess.
  • Using pickle instead of Config. If you need to save a game object, you can always convert it to a dictionary my_obj.__dict__ and save state that way, if needed.
  • Use config, instead of pickle. You can store the game state with a string, see: https://python-chess.readthedocs.io/en/latest/pgn.html#chess.pgn.StringExporter
  • Make docstrings triple " instead of '. (Optional)
  • info.json is missing keys and has some incorrect values for the ones it does have.

Additional Notes

I had trouble installing this on windows 10. Cairosvg has always been trouble for me on windows. I had to install the GTK+ Windows Runtime Environment in order to get this to run. I think it’s important for windows users who may load your cog, and not have this should be prompted with a message about where to go and install it. Lots of users will install a cog without reading someone’s repository first, and then they will just assume it’s broken, when it’s really just them missing something.

Also send me a msg on discord when you can.

Hi Redjumpman,

Thanks for your feedback, I will make these changes as soon as I can.

I didn’t think Cairosvg had any additional dependencies on windows, I just know I couldn’t get the newest version to work downgrading to 1.0.22 satisfied my needs.

I will try to reach you tommorow via discord if I can. Thanks.

1 Like

Update:
I have switched over to using config to store on going games.

Next I am planning on installing my cog on a fresh install of windows to write out proper instructions to get it up and running.

Once I have that figured out I will create the readme file and update the info.json files

Apologizes for the late reply. I’ve looked over your commit history and this looks great! I’m approving this application. If you have any further questions send me a PM on cog board or a DM on discord.