feat: write ui file to qt/ dir on new service creation
This commit is contained in:
@@ -13,6 +13,7 @@ class Paths(BaseSettings):
|
||||
repo_root: DirectoryPath = REPO_ROOT
|
||||
|
||||
services_dir: DirectoryPath = Path("services")
|
||||
qt_dir: DirectoryPath = Path("qt")
|
||||
|
||||
service_registry_file: FilePath = Path("config/services_registry.yml")
|
||||
iocs_overview_filename: FilePath = Path("docs/user/ioc/iocs_overview.md")
|
||||
|
||||
@@ -17,6 +17,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
REPO_ROOT = get_git_root(__file__)
|
||||
SERVICE_TEMPLATES_DIR = REPO_ROOT / "templates" / "service"
|
||||
QT_TEMPLATES_DIR = REPO_ROOT / "templates" / "qt"
|
||||
|
||||
|
||||
class ServiceCreator:
|
||||
@@ -88,6 +89,13 @@ class ServiceCreator:
|
||||
"service_name_lower": service.name_lower,
|
||||
"service_name_lower_underscores": service.name_lower_underscores,
|
||||
"user": user,
|
||||
},
|
||||
)
|
||||
copier.run_copy(
|
||||
src_path=str(QT_TEMPLATES_DIR),
|
||||
dst_path=str(self.ctx.write_paths.qt_dir),
|
||||
data={
|
||||
"service_name_upper": service.name_upper,
|
||||
"ui_filename": ui_filename,
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user