Skip to content

Commit 80b4d19

Browse files
committed
Refactor and add back --executor_str
Refactor and add back --executor_str
1 parent cd0a0f4 commit 80b4d19

File tree

4 files changed

+25
-14
lines changed

4 files changed

+25
-14
lines changed

.idea/workspace.xml

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

stable.toml renamed to dev.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Rename to build stable version
2-
# This is stable version
1+
# Rename to build dev version
2+
# This is dev version
33
[build-system]
4-
requires = ["setuptools>=61.0"]
4+
requires = ["setuptools"]
55
build-backend = "setuptools.build_meta"
66

77
[project]
8-
name = "je_auto_control"
9-
version = "0.0.134"
8+
name = "je_auto_control_dev"
9+
version = "0.0.71"
1010
authors = [
1111
{ name = "JE-Chen", email = "[email protected]" },
1212
]

je_auto_control/__main__.py

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# argparse
22
import argparse
3+
import json
34
import sys
45

56
from je_auto_control.utils.exception.exception_tags import \
@@ -23,9 +24,15 @@ def preprocess_execute_files(file_path: str):
2324
execute_files(get_dir_files_as_list(file_path))
2425

2526

27+
def preprocess_read_str_execute_action(execute_str: str):
28+
execute_str = json.loads(execute_str)
29+
execute_action(execute_str)
30+
31+
2632
argparse_event_dict = {
2733
"execute_file": preprocess_execute_action,
2834
"execute_dir": preprocess_execute_files,
35+
"execute_str": preprocess_read_str_execute_action,
2936
"create_project": create_project_dir
3037
}
3138
parser = argparse.ArgumentParser()
@@ -41,6 +48,10 @@ def preprocess_execute_files(file_path: str):
4148
"-c", "--create_project",
4249
type=str, help="create project with template"
4350
)
51+
parser.add_argument(
52+
"--execute_str",
53+
type=str, help="execute json str"
54+
)
4455
args = parser.parse_args()
4556
args = vars(args)
4657
for key, value in args.items():

pyproject.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Rename to build dev version
2-
# This is dev version
1+
# Rename to build stable version
2+
# This is stable version
33
[build-system]
4-
requires = ["setuptools"]
4+
requires = ["setuptools>=61.0"]
55
build-backend = "setuptools.build_meta"
66

77
[project]
8-
name = "je_auto_control_dev"
9-
version = "0.0.70"
8+
name = "je_auto_control"
9+
version = "0.0.135"
1010
authors = [
1111
{ name = "JE-Chen", email = "[email protected]" },
1212
]

0 commit comments

Comments
 (0)