Merge branch 'develop' into feature/OP-3593_Move-load-functions-into-pipeline

This commit is contained in:
Jakub Trllo 2022-07-20 16:25:56 +02:00
commit d232ad4f41
31 changed files with 726 additions and 70 deletions

View file

@ -524,10 +524,10 @@ def get_workdir_with_workdir_data(
anatomy_filled = anatomy.format(workdir_data)
# Output is TemplateResult object which contain useful data
path = anatomy_filled[template_key]["folder"]
if path:
path = os.path.normpath(path)
return path
output = anatomy_filled[template_key]["folder"]
if output:
return output.normalized()
return output
def get_workdir(

View file

@ -409,6 +409,19 @@ class TemplateResult(str):
self.invalid_types
)
def normalized(self):
"""Convert to normalized path."""
cls = self.__class__
return cls(
os.path.normpath(self),
self.template,
self.solved,
self.used_values,
self.missing_keys,
self.invalid_types
)
class TemplatesResultDict(dict):
"""Holds and wrap TemplateResults for easy bug report."""

View file

@ -53,7 +53,7 @@ def pack_project(project_name, destination_dir=None):
Args:
project_name(str): Project that should be packaged.
destination_dir(str): Optinal path where zip will be stored. Project's
destination_dir(str): Optional path where zip will be stored. Project's
root is used if not passed.
"""
print("Creating package of project \"{}\"".format(project_name))