auto-traffic-control icon indicating copy to clipboard operation
auto-traffic-control copied to clipboard

Add Python SDK and example

Open Skinner927 opened this issue 3 years ago • 2 comments

I'm unsure if you're looking for a Python SDK, but I've spent some time on it and figured I'd at least share.

Please let me know what could be improved. I have not created a workflow because I'm looking for permission first.

Skinner927 avatar Aug 19 '22 06:08 Skinner927

Hi @Skinner927, contributions are very much appreciated! Especially new SDKs. Thanks for going through the effort of creating one for Python. 🙂

If you want to give the workflow a shot, check out test-sdk.yml. Would be great to get the same test in place that is used for the other SDKs. Essentially, run the test server and query the version of the game with the example in examples/python.

jdno avatar Aug 23 '22 19:08 jdno

Thanks @jdno, just chiming in that I plan to start working on these improvements and update the PR.

I'll admit I have no experience creating workflows on GitHub, but have many years of experience with GitLab pipelines and Jenkins, so it should be a fun learning experience. I'd appreciate on the following review if you could be quite critical of whatever workflow solution I come up with -- it's the best way to learn IMO.

Skinner927 avatar Aug 25 '22 13:08 Skinner927

I'm back from the dead. I believe this workflow will work, but I'm honestly unsure because I can't figure out how to test this manually and/or trigger it on my forked repo.

Skinner927 avatar Nov 28 '22 03:11 Skinner927

Add on: workflow_dispatch to your workflow to enable running the workflow via the website. The other event triggers require the trigger to occur, ex git push.

Nzen avatar Nov 28 '22 03:11 Nzen

Well I sure beat my head against this one. Took me about 4 hours to realize the test server is stripped down and only does version. I was running around trying to figure out why starting a game worked locally on Windows and Linux but not on the test 🤦

Anyways, I believe this is working now.

Thank you @Nzen for the event triggers info. It seems workflow_dispatch might only work on master/main? I ended up just using push locally.

Skinner927 avatar Nov 29 '22 08:11 Skinner927