-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
All model templates should be rendered with these variables, in addition to other model-specific variables:
We can try to minimize the need to define all of these in every reporter.
with open(target_html_filepath, 'w', encoding='utf-8') as target_file:
target_file.write(TEMPLATE.render(
report_script=__file__,
timestamp=time.strftime('%Y-%m-%d %H:%M'),
model_id=model_spec.model_id,
model_name=model_name,
model_description=model_description,
userguide_page=model_spec.userguide,
args_dict=args_dict,
model_spec_outputs=model_spec.outputs,
...
))- Perhaps we can define a wrapper/decorator that deals with defining the
report_scriptandtimestamp. page_titlecan probably be removed entirely and constructed withinbase.html.- We could consider passing in the entire
model_specinstead of various attributes, but I'm not sure if that's a good idea. It offloads the attribute access to the templates.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels