-
Notifications
You must be signed in to change notification settings - Fork 29
Implement getLocalPath in Python #36
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
Conversation
add upstream branch
.gitignore
Outdated
| .DS_Store | ||
| .idea | ||
| *__pycache__* | ||
| *.edd-info* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like .egg-info was misspelled - would you mind removing this entry?
python/commons/lab.py
Outdated
| class Paths(dj.Lookup): | ||
| definition = ... | ||
|
|
||
| def getLocalPath(self, path, local_os=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping with Python convention, let's call this get_local_path, using snake_case rather thank CamelCase. Although this makes the method name different from Matlab, it fits better with rest of the naming conventions.
python/commons/lab.py
Outdated
| class Paths(dj.Lookup): | ||
| definition = ... | ||
|
|
||
| def getLocalPath(self, path, local_os=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this method doesn't use self, which usually suggests that this is better off as a staticmethod. Place @staticmethod right above the function definition, and you can skip the self argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Complete oversight on my side - it does indeed use self as this is acting as placeholder class for DataJoint table implemented in Matlab.
Add getLocalPath in python