You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that, at the moment, all output aliases are meant to be for the OutputAlias.any type. I guess this makes sense when a handler can can potentially take something like a file or folder and turn it into a list of numbers. However, the comfort recipes have some outputs that have no handlers are pretty much always intended to be folders like this output here:
I still want to add an alias so that I can overwrite the description and variable name to something suitable for a Grasshopper component. But, if I change the type of the output above to OutputAlias.folder and I translate a recipe using the alias like adaptive-comfort-map, I get an esoteric pydantic error wheneven I go to translate the recipe with pollination-dsl:
C:\Users\chris\Documents\GitHub\recipes\adaptive-comfort-map>pollination dsl translate adaptive-comfort-map C:\ladybug\tests --luigi
loading recipe: pollination-adaptive-comfort-map
Traceback (most recent call last):
File "c:\users\chris\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\chris\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\chris\AppData\Local\Programs\Python\Python37\Scripts\pollination.exe\__main__.py", line 7, in <module>
File "c:\users\chris\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "c:\users\chris\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "c:\users\chris\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\chris\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\chris\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\chris\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\users\chris\appdata\local\programs\python\python37\lib\site-packages\click\decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\users\chris\appdata\local\programs\python\python37\lib\site-packages\pollination_dsl\cli.py", line 81, in translate_recipe
recipe = load(recipe_name, baked=True)
File "c:\users\chris\appdata\local\programs\python\python37\lib\site-packages\pollination_dsl\package.py", line 168, in load
package = _load_recipe(module, baked)
File "c:\users\chris\appdata\local\programs\python\python37\lib\site-packages\pollination_dsl\package.py", line 118, in _load_recipe
qb_dag = main_dag.queenbee
File "c:\users\chris\appdata\local\programs\python\python37\lib\site-packages\pollination_dsl\dag\base.py", line 68, in queenbee
outputs.append(method.to_queenbee(name=method_name))
File "c:\users\chris\appdata\local\programs\python\python37\lib\site-packages\pollination_dsl\dag\outputs.py", line 89, in to_queenbee
'alias': [al.to_queenbee().dict() for al in self.alias]
File "c:\users\chris\appdata\local\programs\python\python37\lib\site-packages\pollination_dsl\dag\outputs.py", line 89, in <listcomp>
'alias': [al.to_queenbee().dict() for al in self.alias]
File "c:\users\chris\appdata\local\programs\python\python37\lib\site-packages\pollination_dsl\alias\outputs.py", line 92, in to_queenbee
return func.parse_obj(data)
File "pydantic\main.py", line 572, in pydantic.main.BaseModel.parse_obj
File "pydantic\main.py", line 400, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for DAGFolderOutputAlias
from
field required (type=value_error.missing)
The text was updated successfully, but these errors were encountered:
It seems that, at the moment, all output aliases are meant to be for the
OutputAlias.any
type. I guess this makes sense when a handler can can potentially take something like a file or folder and turn it into a list of numbers. However, the comfort recipes have some outputs that have no handlers are pretty much always intended to be folders like this output here:https://github.com/pollination/pollination-alias/blob/master/pollination/alias/outputs/comfort.py#L82
I still want to add an alias so that I can overwrite the description and variable name to something suitable for a Grasshopper component. But, if I change the type of the output above to
OutputAlias.folder
and I translate a recipe using the alias like adaptive-comfort-map, I get an esoteric pydantic error wheneven I go to translate the recipe with pollination-dsl:The text was updated successfully, but these errors were encountered: