valohai / valohai-utils

Python helper library for Valohai
MIT License
2 stars 2 forks source link

Add dir_path property to inputs (fixes #51) #67

Closed JuhaKiili closed 3 years ago

JuhaKiili commented 3 years ago

Shortcut to get input folder path:

valohai.inputs("my_images").dir_path

One aesthetical decision here was that we have valohai.inputs("my_images").path("file.txt") and it might be considered consistent to have valohai.inputs("my_images").dir_path() method instead of property.

I chose property over method but can be argued either way.

fixes #51

ruksi commented 3 years ago

I would use method .dir_path() over property .dir_path for consistency with .path()

JuhaKiili commented 3 years ago

I would use method .dir_path() over property .dir_path for consistency with .path()

I changed it to method now.