-
Notifications
You must be signed in to change notification settings - Fork 15
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
Merge from Haji's fork into main fork #125
base: analysis
Are you sure you want to change the base?
Conversation
…e new cache files
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.
Overall looks good! We'll talk through the plot_* files and utils.py next time!
Let's also schedule a brief meeting to fix your github branches.
def load_allreports(region, | ||
reports_path=None, | ||
include_mean=True, | ||
sids=subject_list): | ||
sids=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.
sids=None
is a good way to set up the argument, but there needs to be an if
statement inside the function:
if sids is None:
sids = subject_list
"""Loads all reports for a region and returns a dataframe of them. | ||
|
||
This runs `load_report` over all raters, subjects, and hemispheres and | ||
returns a dataframe of all the reports. If a report file is not found, | ||
then the row is left with NaNs indicating missing data. | ||
""" | ||
from .config import raters_by_region |
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.
Good catch!
@@ -1,5 +1,5 @@ | |||
''' | |||
The hcpannot package contains code for annotating the HCP 7 Tesla Retinotopy | |||
The hcpannot package contains visualization for annotating the HCP 7 Tesla Retinotopy |
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.
Not sure how this got here, but not needed.
from . import plot_annot_properties as visannot | ||
from . import plot_contours as viscontours | ||
from . import utils as utils |
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.
This is a fine way to organize your __init__.py
file, but I would just name the modules visannot.py, viscontours.py, and utils.py. You can still import them, but people will be surprised if they have two names.
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.
Big picture things to do:
- Add docstrings to functions. These don't need to be fancy especially if the function is made to be called internally and not by a user; one line is usually fine for those. For functions meant to be called by the user, look at Numpy's guide.
- Pretty minor: Best to word-wrap lines at 79 or 80 columns.
- Divide the file into two sections (this is sort of already done): at the top is the private functions not meant to be called externally, and at the bottom are the public functions with longer docstrings. Section these off with some comments.
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.
Review this code before our next meeting—we want to have a better idea of how it gets run, and we can maybe walk through an example of how it is intended to work.
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.
Add docstrings!
No description provided.