rom-py / rompy

Relocatable Ocean Modelling in PYthon (rompy) combines templated cookie-cutter model configuration with various xarray extensions to assist in the setup and evaluation of coastal ocean model
https://rom-py.github.io/rompy/
BSD 3-Clause "New" or "Revised" License
2 stars 9 forks source link

remove override of internal cookie cutter find template functionality #80

Closed benjaminleighton closed 2 months ago

benjaminleighton commented 3 months ago

Importing from rompy.model import ModelRun in turn calls from .core.render import render

which overrides the default behaviour of cookiecutter find_template chaning the expected number of arguments

This override of the default behaviour of cookiecutter then causes a failure executing generate() on the ModelRun object.

generate() it calls the render function in in rompy/core/render.py which in turn calls generate_files in cookiecutter which itself calls find_template expecting 2 arguments but finding only one.

As a temporary fix this just patches the rompy find_template function to accept the expected argument but the logic is confusing and we should see if we can use the default find_template behaviour.