diff --git a/.github/workflows/code_check.yml b/.github/workflows/code_check.yml index 6716b2c9..dcd58524 100644 --- a/.github/workflows/code_check.yml +++ b/.github/workflows/code_check.yml @@ -34,6 +34,7 @@ jobs: path: ${{ env.sif_file }} key: ${{ runner.os }}-singularity-${{ hashFiles('~/resources/retinal-rl.def') }} restore-keys: | + ${{ runner.os }}-singularity-${{ hashFiles('~/resources/retinal-rl.def') }} ${{ runner.os }}-singularity- - name: Pull Singularity container if: steps.cache-singularity.outputs.cache-hit != 'true' diff --git a/.github/workflows/config_scan.yml b/.github/workflows/config_scan.yml index 8f6051bd..929ebb68 100644 --- a/.github/workflows/config_scan.yml +++ b/.github/workflows/config_scan.yml @@ -21,6 +21,7 @@ jobs: path: ${{ env.sif_file }} key: ${{ runner.os }}-singularity-${{ hashFiles('~/resources/retinal-rl.def') }} restore-keys: | + ${{ runner.os }}-singularity-${{ hashFiles('~/resources/retinal-rl.def') }} ${{ runner.os }}-singularity- - name: Pull Singularity container if: steps.cache-singularity.outputs.cache-hit != 'true' diff --git a/doom_creator/util/_templates/vizdoom.py b/doom_creator/util/_templates/vizdoom.py index 52a05ea5..eb03d178 100644 --- a/doom_creator/util/_templates/vizdoom.py +++ b/doom_creator/util/_templates/vizdoom.py @@ -1,5 +1,13 @@ -def config(scenario_name): - return """\ +""" +This module contains a dummy for a vizdoom config. +""" + + +def config(scenario_name: str): + """Returns a config for a vizdoom game, + referencing {scenario_name}.zip as the scenario.""" + + return f"""\ doom_scenario_path = {scenario_name}.zip living_reward = 0.0 @@ -32,6 +40,4 @@ def config(scenario_name): available_game_variables = {{ HEALTH }} mode = PLAYER -""".format( - scenario_name=scenario_name - ) +""" diff --git a/doom_creator/util/templates.py b/doom_creator/util/templates.py index f093ebff..cbd87460 100644 --- a/doom_creator/util/templates.py +++ b/doom_creator/util/templates.py @@ -1 +1,8 @@ +"""Templates for doom scenario creation + +This module provides the templates for acs scripts, decorate +definitions and the overall config (vizdoom) +""" from doom_creator.util._templates import acs, decorate, vizdoom + +__all__ = ['acs', 'decorate', 'vizdoom']