Skip to content

Commit

Permalink
1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
owent committed Jul 10, 2023
1 parent b9623ad commit 6d29d26
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
更新记录
==========

1.4.2
------

1. 支持多个 `data_src_dir` 配置

1.4.1
------

Expand Down
15 changes: 13 additions & 2 deletions xresconv_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def main():
"data_version": None,
"output_matrix": {"file_path": None, "outputs": []},
"protocol_files": {"file_path": None, "inputs": []},
"data_source_dir": {"file_path": None, "inputs": []},
}

# 默认双线程,实际测试过程中java的运行优化反而比多线程更能提升效率
Expand Down Expand Up @@ -275,8 +276,17 @@ def load_global_options(gns):
elif tag_name == "output_dir":
xconv_options["args"]["-o"] = '"' + text_value + '"'

elif tag_name == "data_src_dir":
xconv_options["args"]["-d"] = '"' + text_value + '"'
elif tag_name == "data_src_dir" or tag_name == "data_source_dir":
if (
global_node["file_path"]
!= xconv_options["data_source_dir"]["file_path"]
):
xconv_options["data_source_dir"]["inputs"] = []
xconv_options["data_source_dir"]["file_path"] = global_node[
"file_path"
]
xconv_options["data_source_dir"]["inputs"].append("-d")
xconv_options["data_source_dir"]["inputs"].append('"' + text_value + '"')
elif tag_name == "data_version":
if xconv_options["data_version"] is None:
xconv_options["data_version"] = text_value
Expand Down Expand Up @@ -447,6 +457,7 @@ def load_list_item_nodes(lis):
item_cmd_args_array = []
item_cmd_args_array.extend(global_cmd_args_prefix_array)
item_cmd_args_array.extend(xconv_options["protocol_files"]["inputs"])
item_cmd_args_array.extend(xconv_options["data_source_dir"]["inputs"])

# merge global options
if "tags" in item_output and item_output["tags"]:
Expand Down

0 comments on commit 6d29d26

Please sign in to comment.