closeout.domain_layer.entities package
Submodules
closeout.domain_layer.entities.disposition_letter module
closeout.domain_layer.entities.proposals_search_result module
closeout.domain_layer.entities.prototype_project module
closeout.domain_layer.entities.template module
- class closeout.domain_layer.entities.template.Template(template_content: str)
Bases:
objectA template that can be rendered using Jinja2
- get_renderer()
Get a template renderer that can render this template
- Returns:
A TemplateRenderer object that can render the template
- render(**context) str
Render the template with the given context
- Parameters:
context – Variables to use in the template
- Returns:
Rendered template as a string
- Raises:
TemplateRenderError – If there are any errors during template rendering
- exception closeout.domain_layer.entities.template.TemplateRenderError(message: str, errors: List[str])
Bases:
ExceptionException raised when template rendering fails
- class closeout.domain_layer.entities.template.TemplateRenderer(template_content: str)
Bases:
objectA wrapper around Jinja2 template that hides implementation details
- render(**context) str
Render the template with the given context
- Parameters:
context – Variables to use in the template
- Returns:
Rendered template as a string
- Raises:
TemplateRenderError – If there are any errors during template rendering
- closeout.domain_layer.entities.template.format_as_hours(quantity: Quantity) str
Format a Quantity[“time”] as hours with two decimal places.
- Args:
quantity: An astropy Quantity object representing time
- Returns:
A string representing the time in hours with two decimal places (e.g., “5.25”)