dev #10
|  | @ -1,5 +1,5 @@ | |||
| import os | ||||
| from typing import Set | ||||
| from typing import Dict | ||||
| 
 | ||||
| from joj3_config_generator.models import joj1, repo, result, task | ||||
| from joj3_config_generator.models.const import CACHE_ROOT, JOJ3_CONFIG_ROOT | ||||
|  | @ -27,7 +27,7 @@ def convert(repo_conf: repo.Config, task_conf: task.Config) -> result.Config: | |||
|     # Construct health check stage | ||||
|     if not repo_conf.force_skip_health_check_on_test or not current_test: | ||||
|         result_conf.stage.stages.append(get_health_check_stage(repo_conf)) | ||||
|     cached: Set[str] = set() | ||||
|     cached: Dict[str, None] = {} | ||||
|     # Convert each stage in the task configuration | ||||
|     for task_stage in task_conf.stages: | ||||
| 
					
					jon-lee marked this conversation as resolved
					
						
						
							Outdated
						
					
				 | ||||
|         result_conf.stage.stages.append(get_conf_stage(task_conf, task_stage, cached)) | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| import re | ||||
| 
					
					jon-lee marked this conversation as resolved
					
				 
				
					
						张泊明518370910136
						commented  Path should not be relative to  Path should not be relative to `JOJ3_CONFIG_ROOT` in this file, should be relative to `task.toml` dir 
				
					
						李衍志523370910113
						commented  I reckon you said things is relative to  I reckon you said things is relative to `JOJ3_CONFIG_ROOT` in JTC before. we have a `task.type` in `task.toml` to mend the path 
				
					
						张泊明518370910136
						commented  
 `config.path` is relative to `JOJ3_CONFIG_ROOT`. 
				
					
						李衍志523370910113
						commented  could you explain further? I m not quite sure my understanding is clear. could you explain further? I m not quite sure my understanding is clear. 
				
					
						张泊明518370910136
						commented  In  In `joj3_config_generator/models/task.py`, `Config.path` is relative to `JOJ3_CONFIG_ROOT`, so `task.toml` will located at `JOJ3_CONFIG_ROOT / task_conf.path` in JTC. | ||||
| import shlex | ||||
| 
					
					jon-lee marked this conversation as resolved
					
				 
				
					
						张泊明518370910136
						commented  Some  Some `with_.update` is still using raw dict, not model with `model_dump`. | ||||
| from typing import Any, Callable, Dict, List, Set, Tuple | ||||
| from typing import Any, Callable, Dict, List, Tuple | ||||
| 
 | ||||
| from joj3_config_generator.models import result, task | ||||
| from joj3_config_generator.models.const import JOJ3_CONFIG_ROOT | ||||
|  | @ -9,7 +9,7 @@ from joj3_config_generator.models.const import JOJ3_CONFIG_ROOT | |||
| def get_conf_stage( | ||||
| 
					
					jon-lee marked this conversation as resolved
					
						
						
							Outdated
						
					
				 
				
					
						张泊明518370910136
						commented  
 `ParserEnum` | ||||
|     task_conf: task.Config, | ||||
|     task_stage: task.Stage, | ||||
|     cached: Set[str], | ||||
|     cached: Dict[str, None], | ||||
| ) -> result.StageDetail: | ||||
|     conf_stage = result.StageDetail( | ||||
|         name=task_stage.name, | ||||
|  | @ -55,7 +55,9 @@ def get_processed_dict( | |||
|     return processed_dict | ||||
| 
 | ||||
| 
 | ||||
| def get_executor_with(task_stage: task.Stage, cached: Set[str]) -> result.ExecutorWith: | ||||
| def get_executor_with( | ||||
|     task_stage: task.Stage, cached: Dict[str, None] | ||||
| ) -> result.ExecutorWith: | ||||
|     file_import = task_stage.files.import_ | ||||
|     copy_in_files = [file for file in file_import if file not in cached] | ||||
|     file_export = task_stage.files.export | ||||
| 
					
					jon-lee marked this conversation as resolved
					
						
						
							Outdated
						
					
				 
				
					
						张泊明518370910136
						commented  not necessary not necessary 
				
					
						李衍志523370910113
						commented  resolved. resolved. | ||||
|  | @ -81,7 +83,7 @@ def get_executor_with(task_stage: task.Stage, cached: Set[str]) -> result.Execut | |||
|         cases=[], | ||||
|     ) | ||||
|     for file in file_export: | ||||
|         cached.add(file) | ||||
|         cached[file] = None | ||||
|     return executor_with_config | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -222,11 +222,11 @@ | |||
|                                 } | ||||
|                             }, | ||||
|                             "copyInCached": { | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/ex2": "h7/build/ex2", | ||||
|                                 "h7/build/ex2-asan": "h7/build/ex2-asan", | ||||
|                                 "h7/build/compile_commands.json": "h7/build/compile_commands.json", | ||||
|                                 "h7/build/ex2-ubsan": "h7/build/ex2-ubsan", | ||||
|                                 "h7/build/ex2": "h7/build/ex2" | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/compile_commands.json": "h7/build/compile_commands.json" | ||||
|                             }, | ||||
|                             "copyInDir": ".", | ||||
|                             "copyOut": [ | ||||
|  | @ -322,11 +322,11 @@ | |||
|                                 } | ||||
|                             }, | ||||
|                             "copyInCached": { | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/ex2": "h7/build/ex2", | ||||
|                                 "h7/build/ex2-asan": "h7/build/ex2-asan", | ||||
|                                 "h7/build/compile_commands.json": "h7/build/compile_commands.json", | ||||
|                                 "h7/build/ex2-ubsan": "h7/build/ex2-ubsan", | ||||
|                                 "h7/build/ex2": "h7/build/ex2" | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/compile_commands.json": "h7/build/compile_commands.json" | ||||
|                             }, | ||||
|                             "copyInDir": ".", | ||||
|                             "copyOut": [ | ||||
|  | @ -444,11 +444,11 @@ | |||
|                             "cpuSetLimit": "", | ||||
|                             "copyIn": {}, | ||||
|                             "copyInCached": { | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/ex2": "h7/build/ex2", | ||||
|                                 "h7/build/ex2-asan": "h7/build/ex2-asan", | ||||
|                                 "h7/build/compile_commands.json": "h7/build/compile_commands.json", | ||||
|                                 "h7/build/ex2-ubsan": "h7/build/ex2-ubsan", | ||||
|                                 "h7/build/ex2": "h7/build/ex2" | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/compile_commands.json": "h7/build/compile_commands.json" | ||||
|                             }, | ||||
|                             "copyInDir": ".", | ||||
|                             "copyOut": [ | ||||
|  | @ -587,11 +587,11 @@ | |||
|                             "cpuSetLimit": "", | ||||
|                             "copyIn": {}, | ||||
|                             "copyInCached": { | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/ex2": "h7/build/ex2", | ||||
|                                 "h7/build/ex2-asan": "h7/build/ex2-asan", | ||||
|                                 "h7/build/compile_commands.json": "h7/build/compile_commands.json", | ||||
|                                 "h7/build/ex2-ubsan": "h7/build/ex2-ubsan", | ||||
|                                 "h7/build/ex2": "h7/build/ex2" | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/compile_commands.json": "h7/build/compile_commands.json" | ||||
|                             }, | ||||
|                             "copyInDir": ".", | ||||
|                             "copyOut": [ | ||||
|  | @ -684,11 +684,11 @@ | |||
|                             "cpuSetLimit": "", | ||||
|                             "copyIn": {}, | ||||
|                             "copyInCached": { | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/ex2": "h7/build/ex2", | ||||
|                                 "h7/build/ex2-asan": "h7/build/ex2-asan", | ||||
|                                 "h7/build/compile_commands.json": "h7/build/compile_commands.json", | ||||
|                                 "h7/build/ex2-ubsan": "h7/build/ex2-ubsan", | ||||
|                                 "h7/build/ex2": "h7/build/ex2" | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/compile_commands.json": "h7/build/compile_commands.json" | ||||
|                             }, | ||||
|                             "copyInDir": ".", | ||||
|                             "copyOut": [ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	
Make this
Path.home()default to/home/tt. For now, create a const for this dir.fixed