(self, model_tag, embed_data,
jinja_file_name, output_path)
| 44 | f.write(source) |
| 45 | |
| 46 | def gen_micro_source_from_bytes(self, model_tag, embed_data, |
| 47 | jinja_file_name, output_path): |
| 48 | cwd = os.path.dirname(__file__) |
| 49 | j2_env = Environment( |
| 50 | loader=FileSystemLoader(cwd), |
| 51 | trim_blocks=True, keep_trailing_newline=True) |
| 52 | |
| 53 | template_name = JINJA2_DIR + jinja_file_name |
| 54 | source = j2_env.get_template(template_name).render( |
| 55 | model_tag=model_tag, |
| 56 | embed_data=embed_data, |
| 57 | data_size=len(embed_data), |
| 58 | ) |
| 59 | with open(output_path, "w") as f: |
| 60 | f.write(source) |
| 61 | |
| 62 | def gen_micro_source_from_array(self, model_tag, embed_data, |
| 63 | jinja_file_name, output_path): |
no outgoing calls
no test coverage detected