Inconsistency when it comes to `Path` as type hint.
anders-kiaer opened this issue · 0 comments
anders-kiaer commented
#351 is related to an underlying issue:
- For plugin arguments that have
Path
as type hint, Webviz will today automatically convert any user input relative paths to absolute paths (resolved relative to webviz configuration file). - If
webviz docs
is executed, any default value will be shown besides the associated argument name.
For plugins that both use Path
for an argument type, and has a relative Path
as default value for the same argument, an inconsistency appears:
- If the user does not provide a value, the plugin will use its default relative path.
- If the user actually provides the default value in the input value, it is resolved to an absolute path before given to the plugin.
Depending on plugin logic, this could easily end up with two different results.
Potential solutions include: Derive our own AbsolutePath
type from Path
, and only resolve for those?