Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Runtime running user's code in randomly generated environment.

Notifications You must be signed in to change notification settings

project-lynx-coding-game/lynx-runtime

Repository files navigation

lynx-runtime

Architecture

Small runtime running user's code in randomly generated environment.

User can perform specific callbacks in order to change state of the game's world.

Changes to the world are printed to stdout which is captured by runner microservice and passed further until it reaches frontend service which displays it in a visual environment.

Setup

pip install -r requirements.txt

To use autopep8 hook for pre-commit:

python -m pip install autopep8 pre-commit
pre-commit install

Building container image

Podman

podman build . -t lynx-runtime:<version>

Docker

docker build . -t lynx-runtime:<version>

Running container image

In order to run code.py found inside ./usr directory use:

Podman

podman run -v./usr/:/code:ro lynx-runtime:<version>

Docker

docker run -v <absolute local path to the ./usr directory>:/code:ro lynx-runtime:<version>

Running tests

In order to run all tests found inside ./tests directory use:

pytest tests 

Development

version 0.1:

  • Create basic classes for level, agents etc.
  • Add game main loop.
  • User's code execution inside exec using predefined __builtins__.

About

Runtime running user's code in randomly generated environment.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •