Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Oct 6, 2021
Merged

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

merged 2 commits into from
Oct 6, 2021

Conversation

JuhaKiili
Copy link
Contributor

@JuhaKiili JuhaKiili commented Oct 5, 2021

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
Copy link
Member

ruksi commented Oct 5, 2021

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

@JuhaKiili
Copy link
Contributor Author

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

I changed it to method now.

@JuhaKiili JuhaKiili closed this Oct 6, 2021
@JuhaKiili JuhaKiili reopened this Oct 6, 2021
@JuhaKiili JuhaKiili merged commit 1caec81 into master Oct 6, 2021
@JuhaKiili JuhaKiili deleted the dirpath branch October 6, 2021 08:17
@drazendee drazendee mentioned this pull request Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

valohai-utils inputs should have a method for returning directory path only
2 participants