From 240fb5956485d3c2aa940d45976bb1c67d079772 Mon Sep 17 00:00:00 2001 From: Joe Ziminski <55797454+JoeZiminski@users.noreply.github.com> Date: Wed, 4 Oct 2023 18:35:58 +0100 Subject: [PATCH] Fix the space case data type to datatype. --- datashuttle/command_line_interface.py | 4 ++-- datashuttle/configs/canonical_configs.py | 2 +- datashuttle/configs/config_class.py | 2 +- datashuttle/datashuttle.py | 2 +- datashuttle/utils/folders.py | 4 ++-- docs/source/pages/documentation.md | 4 ++-- tests/tests_integration/test_make_folders.py | 2 +- tests/tests_integration/test_ssh_file_transfer.py | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/datashuttle/command_line_interface.py b/datashuttle/command_line_interface.py index e8c4aac2..520689ce 100644 --- a/datashuttle/command_line_interface.py +++ b/datashuttle/command_line_interface.py @@ -613,7 +613,7 @@ def construct_parser(): nargs="+", type=str, required=False, - help="Optional: (str, single or multiple) (selection of data types, or 'all')", + help="Optional: (str, single or multiple) (selection of datatypes, or 'all')", ) make_sub_folders_parser.add_argument( "--datatype", @@ -663,7 +663,7 @@ def construct_parser(): type=str, nargs="+", required=False, - help="Optional: (str, single or multiple) (selection of data types, or 'all') (default 'all')", + help="Optional: (str, single or multiple) (selection of datatypes, or 'all') (default 'all')", ) upload_parser.add_argument( "--dry-run", diff --git a/datashuttle/configs/canonical_configs.py b/datashuttle/configs/canonical_configs.py index f440f1c9..57107c48 100644 --- a/datashuttle/configs/canonical_configs.py +++ b/datashuttle/configs/canonical_configs.py @@ -153,7 +153,7 @@ def check_dict_values_raise_on_fail(config_dict: Configs) -> None: if not any([config_dict[key] for key in get_datatypes()]): utils.log_and_raise_error( - f"At least one data type must be True in " + f"At least one datatype must be True in " f"configs, from: {' '.join(get_datatypes())}." ) diff --git a/datashuttle/configs/config_class.py b/datashuttle/configs/config_class.py index 5dbd7c1f..5c0bfc65 100644 --- a/datashuttle/configs/config_class.py +++ b/datashuttle/configs/config_class.py @@ -308,7 +308,7 @@ def get_datatype_items( self, datatype: Union[str, list] ) -> Union[ItemsView, zip]: """ - Get the .items() structure of the data type, either all of + Get the .items() structure of the datatype, either all of them (stored in self.datatype_folders) or as a single item. """ if isinstance(datatype, str): diff --git a/datashuttle/datashuttle.py b/datashuttle/datashuttle.py index cf33d865..1d63bc38 100644 --- a/datashuttle/datashuttle.py +++ b/datashuttle/datashuttle.py @@ -313,7 +313,7 @@ def upload( be prefixed with "sub-", or the prefix will be automatically added. "@*@" can be used as a wildcard. "all" will search for all sub-folders in the - data type folder to upload. + datatype folder to upload. ses_names : a session name / list of session names, similar to sub_names but requiring a "ses-" prefix. diff --git a/datashuttle/utils/folders.py b/datashuttle/utils/folders.py index b5355ffb..b965026e 100644 --- a/datashuttle/utils/folders.py +++ b/datashuttle/utils/folders.py @@ -88,7 +88,7 @@ def make_datatype_folders( Parameters ---------- - datatype : data type (e.g. "behav", "all") to use. Use + datatype : datatype (e.g. "behav", "all") to use. Use empty string ("") for none. sub_or_ses_level_path : Full path to the subject @@ -382,7 +382,7 @@ def search_for_wildcards( return new_all_names -# Search Data Types +# Search Datatypes # ----------------------------------------------------------------------------- diff --git a/docs/source/pages/documentation.md b/docs/source/pages/documentation.md index 7cc6ba93..29cf7d30 100644 --- a/docs/source/pages/documentation.md +++ b/docs/source/pages/documentation.md @@ -159,7 +159,7 @@ When the `all` argument is used for `--datatype` (`-dt`), the folders created de ``` -### Data Types Folders +### Datatype Folders In [SWC-Blueprint](https://swc-blueprint.neuroinformatics.dev/specification.html), *datatypes* specify where acquired experimental data of currently supported types (`behav`, `ephys`, `funcimg` and `histology`) is stored. See the [*datatypes* section of the SWC-Blueprint for more details](https://swc-blueprint.neuroinformatics.dev/specification.html#datatype). @@ -182,7 +182,7 @@ upload \ Will *upload* (from *local* to *central* ) _behavioural_ _sessions_ 5 and 6, collected at any date, for _subjects_ 1 to 3. -The keyword `all` can be input in place of a `-sub`, `-ses` or _datatype_ argument `-dt` to transfer all available subject, sessions or data types available. For example: +The keyword `all` can be input in place of a `-sub`, `-ses` or _datatype_ argument `-dt` to transfer all available subject, sessions or datatypes available. For example: ``` datashuttle \ diff --git a/tests/tests_integration/test_make_folders.py b/tests/tests_integration/test_make_folders.py index f4177cde..8c3a7b09 100644 --- a/tests/tests_integration/test_make_folders.py +++ b/tests/tests_integration/test_make_folders.py @@ -246,7 +246,7 @@ def test_custom_folder_names(self, project): def test_datatypes_subsection(self, project, files_to_test): """ Check that combinations of datatypes passed to make file folder - make the correct combination of data types. + make the correct combination of datatypes. Note this will fail when new top level folders are added, and should be updated. diff --git a/tests/tests_integration/test_ssh_file_transfer.py b/tests/tests_integration/test_ssh_file_transfer.py index 7ed8213d..a03360a7 100644 --- a/tests/tests_integration/test_ssh_file_transfer.py +++ b/tests/tests_integration/test_ssh_file_transfer.py @@ -285,7 +285,7 @@ def make_pathtable_search_filter(self, sub_names, ses_names, datatype): create the table of only transferred sub, ses and datatype. Two arguments must be created, one of all sub / ses / datatypes - and the other of all non sub/ non ses / non data type + and the other of all non sub/ non ses / non datatype folders. These must be handled separately as they are mutually exclusive. """