Skip to content

Commit

Permalink
Merge pull request #5 from berenslab/feat-ci-pipeline-cache-test
Browse files Browse the repository at this point in the history
Merge feat ci pipeline cache test, correct some py files
  • Loading branch information
fabioseel authored Oct 11, 2024
2 parents 7770a4b + b7c698c commit 2cd2bed
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/code_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/config_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
16 changes: 11 additions & 5 deletions doom_creator/util/_templates/vizdoom.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -32,6 +40,4 @@ def config(scenario_name):
available_game_variables = {{ HEALTH }}
mode = PLAYER
""".format(
scenario_name=scenario_name
)
"""
7 changes: 7 additions & 0 deletions doom_creator/util/templates.py
Original file line number Diff line number Diff line change
@@ -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']

0 comments on commit 2cd2bed

Please sign in to comment.