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

review commented out code & ominous notes #389

Open
15 tasks
singlesp opened this issue Jan 16, 2025 · 0 comments
Open
15 tasks

review commented out code & ominous notes #389

singlesp opened this issue Jan 16, 2025 · 0 comments

Comments

@singlesp
Copy link
Contributor

singlesp commented Jan 16, 2025

Review sections of code that are currently commented out to determine if we want to keep them or not. Also look at ominous notes and determine if they warrant deletion or if a separate issue should be created to address them.

  • CuBIDS/cubids/cli.py

    Lines 528 to 534 in 61fed30

    # parser.add_argument('--include-groups',
    # action='store',
    # nargs='+',
    # default=[],
    # help='only include an exemplar subject from these '
    # 'listed Acquisition Groups in the exemplar dataset ',
    # required=False)
  • CuBIDS/cubids/cubids.py

    Lines 491 to 499 in f61e1ef

    # bids_file = self.layout.get_file(filepath)
    bids_file = filepath
    # associations = bids_file.get_associations()
    associations = self.get_nifti_associations(str(bids_file))
    for assoc_path in associations:
    # assoc_path = assoc.path
    if Path(assoc_path).exists():
    # print("FILE: ", filepath)
    # print("ASSOC: ", assoc.path)
  • CuBIDS/cubids/cubids.py

    Lines 612 to 619 in f61e1ef

    # save IntendedFor purges so that you can datalad run the
    # remove association file commands on a clean dataset
    # if self.use_datalad:
    # if not self.is_datalad_clean():
    # self.datalad_save(message="Renamed IntendedFors")
    # self.reset_bids_layout()
    # else:
    # print("No IntendedFor References to Rename")
  • # intentions = listify(fmap_file.get_metadata().get("IntendedFor"))
  • CuBIDS/cubids/cubids.py

    Lines 1027 to 1040 in f61e1ef

    # for col in range(len(col_list)):
    # col_dict[col + 1] = col_list[col]
    # header_dict = {}
    # # build header dictionary
    # header_dict['Long Description'] = name
    # description = 'https://cubids.readthedocs.io/en/latest/usage.html'
    # header_dict['Description'] = description
    # header_dict['Version'] = 'CuBIDS v1.0.5'
    # header_dict['Levels'] = col_dict
    # # Build top level dictionary
    # data_dict = {}
    # data_dict[name] = header_dict
  • CuBIDS/cubids/cubids.py

    Lines 1130 to 1132 in f61e1ef

    # if 'NumVolumes' in summary.columns \
    # and str(summary.loc[row, "NumVolumes"]) == 'nan':
    # summary.at[row, "NumVolumes"] = 1.0
  • CuBIDS/cubids/cubids.py

    Lines 1152 to 1155 in f61e1ef

    # if NumVolumes is nan, set to 1.0
    # if 'NumVolumes' in summary.columns \
    # and str(summary.loc[row, "NumVolumes"]) == 'nan':
    # summary.at[row, "NumVolumes"] = 1.0
  • # metadata = layout.get_metadata(path)
  • # param_group_cols = list(set(df.columns.to_list()) - set(["FilePath"]))
  • # print("Error loading sidecar: ", json_filename)
  • CuBIDS/cubids/cubids.py

    Lines 166 to 168 in f61e1ef

    Notes
    -----
    Why not use ``os.makedirs``?
  • CuBIDS/cubids/validator.py

    Lines 123 to 125 in f61e1ef

    # if verbose:
    # logger.info("Running the validator with call:")
    # logger.info('\"' + ' '.join(call) + '\"')
  • CuBIDS/cubids/cubids.py

    Lines 468 to 470 in 07c0947

    Notes
    -----
    This is the function I need to spend the most time on, since it has entities hardcoded.
  • CuBIDS/cubids/cubids.py

    Lines 1694 to 1698 in 07c0947

    Notes
    -----
    This is the only place where the constant ID_VARS is used,
    and the strings in that constant are hardcoded here,
    so we might not need that constant at all.
  • CuBIDS/cubids/cubids.py

    Lines 1714 to 1717 in 07c0947

    Notes
    -----
    The hardcoded suffix associated with each extension may not be comprehensive.
    BIDS has been extended a lot in recent years.
@singlesp singlesp changed the title review commented out code review commented out code & ominous notes Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants