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

Merge from Haji's fork into main fork #125

Open
wants to merge 117 commits into
base: analysis
Choose a base branch
from

Conversation

noahbenson
Copy link
Owner

No description provided.

Copy link
Owner Author

@noahbenson noahbenson left a 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):
Copy link
Owner Author

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
Copy link
Owner Author

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
Copy link
Owner Author

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.

Comment on lines +1 to +3
from . import plot_annot_properties as visannot
from . import plot_contours as viscontours
from . import utils as utils
Copy link
Owner Author

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.

Copy link
Owner Author

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.

Copy link
Owner Author

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.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add docstrings!

@JiyeongHa JiyeongHa self-assigned this Dec 10, 2024
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.

2 participants