Open aqw opened 6 months ago
@bpoldrack @TobiasKadelka Not sure if I captured your suggestions/thoughts well here. Please add them to help clarify what you two see.
Registering the idea of PathParameter
class, that allows to capture that sort of annotation (currently description
). onyo_XXX
could potentially accept both Path
or PathParameter
. Constructor would take a Path
and an optional annotation (implementing a default ofc). This class could behave like a Path
and only overwrite its __str__
to make use of the annotation. So, for any actual path operation code doesn't need to change and only when calling str()
on it there would be an effect.
The
onyo_tree
function accepts a tuple(str, Path)
fordirs
.This is in contrast to how other commands accept paths. The
str
is to show the user the directories they called, in the format they called it.This avoids loads of complexities with relative vs absolute paths, and CWD that is not repo-root.
Questions are (non-exclusive of each other):
onyo_tree
print always relative to repo root