diff --git a/datajob/__init__.py b/datajob/__init__.py index 930f27b..4dbdbb2 100644 --- a/datajob/__init__.py +++ b/datajob/__init__.py @@ -21,5 +21,11 @@ def call_subprocess(cmd: str) -> None: + """ + call a command as a subprocess in a secure way. + https://stackoverflow.com/a/59090212/1771155 + :param cmd: the command to execute + :return: None + """ print(f"datajob subprocess command: " f"{cmd}") subprocess.check_call(shlex.split(cmd)) diff --git a/datajob/package/wheel.py b/datajob/package/wheel.py index 63cbcc7..554a4e1 100644 --- a/datajob/package/wheel.py +++ b/datajob/package/wheel.py @@ -45,7 +45,8 @@ def _poetry_wheel(project_root: str) -> None: def _execute_packaging_logic(project_root: str, config_file: str, cmd: str) -> None: """ - + check if the config file exists in the project root and execute the command to + create a wheel. :param project_root: the path to the root of your project. :param config_file: the confgi file to package the project as a wheel (setup.py or pyproject.toml) :param cmd: the command to execute to create a wheel.