actr_cli/templates/python/
echo.rs1use crate::error::Result;
2use crate::templates::ProjectTemplate;
3use std::collections::HashMap;
4use std::path::Path;
5
6pub fn load(files: &mut HashMap<String, String>) -> Result<()> {
7 let fixtures_root = Path::new(env!("CARGO_MANIFEST_DIR")).join("fixtures");
8 let python_fixtures = fixtures_root.join("python/echo");
9
10 ProjectTemplate::load_file(
11 &python_fixtures.join("manifest.toml.jinja2"),
12 files,
13 "manifest.toml",
14 )?;
15 ProjectTemplate::load_file(
16 &python_fixtures.join("workload.py.jinja2"),
17 files,
18 "workload.py",
19 )?;
20 ProjectTemplate::load_file(&python_fixtures.join("build.sh.jinja2"), files, "build.sh")?;
21 ProjectTemplate::load_file(
22 &python_fixtures.join("requirements.txt.jinja2"),
23 files,
24 "requirements.txt",
25 )?;
26 ProjectTemplate::load_file(
27 &python_fixtures.join("README.md.jinja2"),
28 files,
29 "README.md",
30 )?;
31 ProjectTemplate::load_file(
32 &python_fixtures.join("gitignore.jinja2"),
33 files,
34 ".gitignore",
35 )?;
36
37 let proto_fixtures = fixtures_root.join("protos");
38
39 ProjectTemplate::load_file(
40 &proto_fixtures.join("echo_service.hbs"),
41 files,
42 "protos/local/{{PROJECT_NAME_SNAKE}}.proto",
43 )?;
44
45 Ok(())
46}