From 5c8e1d45e274a6866a2ad245e2d8cd3301da0269 Mon Sep 17 00:00:00 2001 From: singlesp Date: Thu, 16 Jan 2025 15:15:34 -0500 Subject: [PATCH 1/5] docstring --- cubids/__about__.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/cubids/__about__.py b/cubids/__about__.py index d4341aebe..bb727e533 100644 --- a/cubids/__about__.py +++ b/cubids/__about__.py @@ -1,6 +1,25 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: -"""Base module variables.""" +"""Base module variables for CuBIDS. + +This module defines the base variables for the CuBIDS package, including version, +package name, copyright, credits, and URLs. + +Attributes +---------- +__version__ : str + The version of the CuBIDS package. +__packagename__ : str + The name of the CuBIDS package. +__copyright__ : str + The copyright information for the CuBIDS package. +__credits__ : str + The credits for the CuBIDS package. +__url__ : str + The URL for the CuBIDS package repository. +DOWNLOAD_URL : str + The URL to download the CuBIDS package. +""" try: from cubids._version import __version__ except ImportError: From 3d4f05ed13f349f0688b0c8fd15a53a3ae4b5407 Mon Sep 17 00:00:00 2001 From: singlesp Date: Thu, 16 Jan 2025 15:17:19 -0500 Subject: [PATCH 2/5] docstring --- cubids/__init__.py | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/cubids/__init__.py b/cubids/__init__.py index ff9b1d3d5..92fffc3fa 100644 --- a/cubids/__init__.py +++ b/cubids/__init__.py @@ -1,4 +1,37 @@ -"""Top-level package for CuBIDS.""" +"""Top-level package for CuBIDS. + +This module initializes the CuBIDS package and imports its main submodules and attributes. + +Submodules +---------- +cli : module + Command-line interface for CuBIDS. +config : module + Configuration utilities for CuBIDS. +constants : module + Constants used throughout the CuBIDS package. +cubids : module + Core functionalities of the CuBIDS package. +metadata_merge : module + Utilities for merging metadata in CuBIDS. +utils : module + Utility functions for CuBIDS. +validator : module + Validation utilities for CuBIDS. +workflows : module + Workflows for CuBIDS operations. + +Attributes +---------- +__version__ : str + The version of the CuBIDS package. +__packagename__ : str + The name of the CuBIDS package. +__copyright__ : str + The copyright information for the CuBIDS package. +__credits__ : str + The credits for the CuBIDS package. +""" from cubids import ( cli, From 86483d494806e3a0dd53201d67413b10c3b4657a Mon Sep 17 00:00:00 2001 From: singlesp Date: Thu, 16 Jan 2025 15:33:50 -0500 Subject: [PATCH 3/5] docstring --- cubids/constants.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/cubids/constants.py b/cubids/constants.py index dfbc2072b..466d00428 100644 --- a/cubids/constants.py +++ b/cubids/constants.py @@ -1,14 +1,20 @@ -"""Constants for CuBIDS.""" +"""Constants for CuBIDS. -# Names of identifier variables. -# Used to place EntitySet and ParamGroup at the beginning of a dataframe, -# but both are hardcoded in the relevant function. +This module defines various constants used throughout the CuBIDS package. + +Attributes +---------- +ID_VARS : set of str + Names of identifier variables. Used to place EntitySet and ParamGroup at + the beginning of a dataframe but both are hardcoded in the relevant function. +NON_KEY_ENTITIES : set of str + Entities that should not be used to group parameter sets. +IMAGING_PARAMS : set of str + List of metadata fields merged in `metadata_merge.py`. +""" ID_VARS = set(["EntitySet", "ParamGroup", "FilePath"]) -# Entities that should not be used to group parameter sets NON_KEY_ENTITIES = set(["subject", "session", "extension"]) # Multi-dimensional keys SliceTiming XXX: what is this line about? -# List of metadata fields and parameters (calculated by CuBIDS) -# Not sure what this specific list is used for. IMAGING_PARAMS = set( [ "ParallelReductionFactorInPlane", From 6be61cdcb2d16e8ae24ac66522ac378e1e4573e3 Mon Sep 17 00:00:00 2001 From: singlesp Date: Thu, 16 Jan 2025 15:36:02 -0500 Subject: [PATCH 4/5] module docstring --- cubids/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cubids/utils.py b/cubids/utils.py index 09c02e349..c4cdb457f 100644 --- a/cubids/utils.py +++ b/cubids/utils.py @@ -1,4 +1,7 @@ -"""Miscellaneous utility functions for CuBIDS.""" +"""Miscellaneous utility functions for CuBIDS. + +This module provides various utility functions used throughout the CuBIDS package. +""" import re from pathlib import Path From 414ef92961c20ea553c0fec5f6bcf399fe7744cf Mon Sep 17 00:00:00 2001 From: singlesp Date: Thu, 16 Jan 2025 15:40:39 -0500 Subject: [PATCH 5/5] black --- cubids/constants.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cubids/constants.py b/cubids/constants.py index 466d00428..54fdf451e 100644 --- a/cubids/constants.py +++ b/cubids/constants.py @@ -12,6 +12,7 @@ IMAGING_PARAMS : set of str List of metadata fields merged in `metadata_merge.py`. """ + ID_VARS = set(["EntitySet", "ParamGroup", "FilePath"]) NON_KEY_ENTITIES = set(["subject", "session", "extension"]) # Multi-dimensional keys SliceTiming XXX: what is this line about?