diff --git a/.github/workflows/codespell.yaml b/.github/workflows/codespell.yaml new file mode 100644 index 0000000..3deac45 --- /dev/null +++ b/.github/workflows/codespell.yaml @@ -0,0 +1,22 @@ +--- +name: Codespell + +on: + push: + branches: [develop] + pull_request: + branches: [develop] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v2 \ No newline at end of file diff --git a/docs/source/FileRemodelingTools.md b/docs/source/FileRemodelingTools.md index cf1b5fd..5f45133 100644 --- a/docs/source/FileRemodelingTools.md +++ b/docs/source/FileRemodelingTools.md @@ -849,8 +849,8 @@ The resulting columns are called *stopped* and *stop_failed*, respectively. ```json [{ - "operation": "factor_column" - "description": "Create factors for the succesful_stop and unsuccesful_stop values." + "operation": "factor_column", + "description": "Create factors for the succesful_stop and unsuccesful_stop values.", "parameters": { "column_name": "trial_type", "factor_values": ["succesful_stop", "unsuccesful_stop"], @@ -923,12 +923,12 @@ The resulting factor columns are named *correct* and *incorrect*, respectively. ```json [{ - "operation": "factor_hed_tags" - "description": "Create factors based on whether the event represented a correct or incorrect action.", + "operation": "factor_hed_tags", + "description": "Create factors based on whether the event represented a correct or incorrect action.",, "parameters": { "queries": ["correct-action", "incorrect-action"], - "query-names": ["correct", "incorrect"], - "remove-types": [], + "query_names": ["correct", "incorrect"], + "remove_types": [], "expand_context": false } }] @@ -995,8 +995,8 @@ applies and 0's otherwise. ```json [{ - "operation": "factor_hed_type" - "description": "Factor based on the sex of the images being presented." + "operation": "factor_hed_type", + "description": "Factor based on the sex of the images being presented.", "parameters": { "type_tag": "Condition-variable", "type_values": [] @@ -1075,8 +1075,8 @@ have the same values to be merged into a single event. ```json [{ - "operation": "merge_consecutive" - "description": "Merge consecutive *succesful_stop* events that match the *match_columns." + "operation": "merge_consecutive", + "description": "Merge consecutive *succesful_stop* events that match the *match_columns.", "parameters": { "column_name": "trial_type", "event_code": "succesful_stop", diff --git a/docs/source/HedConditionsAndDesignMatrices.md b/docs/source/HedConditionsAndDesignMatrices.md index 72e4b4c..d6223be 100644 --- a/docs/source/HedConditionsAndDesignMatrices.md +++ b/docs/source/HedConditionsAndDesignMatrices.md @@ -346,7 +346,7 @@ Example 9 shows the portion of the [**task-facePerception_events.json**](./_static/data/task-FacePerception_events.json) that encodes information about the *setup_right_sym* event found as the first event in the event file excerpt of Example 8. -This excerpt only contains the relevent definition and the relevant annotation. +This excerpt only contains the relevant definition and the relevant annotation. ````{admonition} Example 9: Excerpt of the JSON sidecar relevant to the *setup_right_sym* event. diff --git a/docs/source/HedGovernance.md b/docs/source/HedGovernance.md index 40834ac..85f32ab 100644 --- a/docs/source/HedGovernance.md +++ b/docs/source/HedGovernance.md @@ -1,4 +1,3 @@ --------------------DRAFT--------------------------------------------------- # HED governance and decision-making Table of Contents diff --git a/docs/source/HedMatlabTools.md b/docs/source/HedMatlabTools.md index a70cf7c..da717a2 100644 --- a/docs/source/HedMatlabTools.md +++ b/docs/source/HedMatlabTools.md @@ -329,7 +329,7 @@ in the *EEG.event* data structure in sufficient detail that anyone using the dat in the future will not need to find and read a separate, detailed description of the dataset or study to understand the recorded experimental events. As demonstrated below, such annotation will allow us to extract epochs using meaningful -HED tags instead of the alpha-numeric codes often associated with shared EEG data. +HED tags instead of the alphanumeric codes often associated with shared EEG data. #### Launching EEGLAB HEDTools To add and view HED tags for the dataset, from EEGLAB menu, select: @@ -608,7 +608,7 @@ to indicate the command line version. Use the MATLAB `pyenv` function again without arguments to check that your installation is as expected. -````{Admonition} Example response for pyenv all with no argments after setting environment. +````{Admonition} Example response for pyenv all with no arguments after setting environment. ```matlab PythonEnvironment with properties: diff --git a/docs/source/HedOnlineTools.md b/docs/source/HedOnlineTools.md index f8c880c..b226c2f 100644 --- a/docs/source/HedOnlineTools.md +++ b/docs/source/HedOnlineTools.md @@ -406,7 +406,7 @@ The non-HED portions of the spreadsheet and the prefix-columns are the same as i **Returns:** If there are any errors, the tool returns a downloadable `.txt` file of error messages, -otherise the tool returns a downloadable spreadsheet with the HED tags converted to short. +otherwise the tool returns a downloadable spreadsheet with the HED tags converted to short. `````` (strings-online-tools-anchor)= diff --git a/docs/source/HedPythonTools.md b/docs/source/HedPythonTools.md index e57b101..2bec120 100644 --- a/docs/source/HedPythonTools.md +++ b/docs/source/HedPythonTools.md @@ -290,9 +290,7 @@ file_list = get_file_list(bids_root_path, extensions=[ ".json", ".tsv"], name_su The HED tools provide both generic and BIDS-specific classes for dictionaries of filenames. - -The -Many of the HED data processing tools make extensive use of dictionaries specif +Many of the HED data processing tools make extensive use of dictionaries specifying both data and format. #### BIDS-specific dictionaries of files @@ -436,7 +434,7 @@ and then to log each processing step using the file's key. This allows a processing step to be applied to all the relevant files in the dataset. After all the processing is complete, the `print_log` method outputs the logged messages by key, thus showing all the -processing steps that hav been applied to each file +processing steps that have been applied to each file as shown in the [**previous example**](example-output-hed-logger-anchor). (using-hed-logger-example-anchor)= diff --git a/docs/source/HedSchemaDevelopersGuide.md b/docs/source/HedSchemaDevelopersGuide.md index 74c494e..04c5448 100644 --- a/docs/source/HedSchemaDevelopersGuide.md +++ b/docs/source/HedSchemaDevelopersGuide.md @@ -310,7 +310,7 @@ Drive has tags of interest to driving experiments. ``` ```` -Notice that this schema does not include any auxilliary sections --- these are inherited +Notice that this schema does not include any auxiliary sections --- these are inherited from the standard schema. This schema would be saved in a MediaWiki file called `HED_drive_0.0.1.mediawiki`. diff --git a/docs/source/HedSearchGuide.md b/docs/source/HedSearchGuide.md index ec80019..9bff91a 100644 --- a/docs/source/HedSearchGuide.md +++ b/docs/source/HedSearchGuide.md @@ -127,7 +127,7 @@ The tag short forms are used for the matching to assure consistency. Matching using a tag prefix with the `*` wildcard, matches the starting portion of the tag. Thus, Age/3* matches *Age/3* as well as *Age/34*. -Notice that the query Age* matches a myraid of tags including *Agent*, *Agent-state*, +Notice that the query Age* matches a myriad of tags including *Agent*, *Agent-state*, and *Agent-property*. ### Logical queries diff --git a/docs/source/WhatsNew.md b/docs/source/WhatsNew.md index 20652bc..66a2fd0 100644 --- a/docs/source/WhatsNew.md +++ b/docs/source/WhatsNew.md @@ -1,6 +1,10 @@ (whats-new-anchor)= # What's new? +Upcoming... **Nov. 10-17, 2023 sFN (Society for Neuroscience)** in Washington D.C.: +> **Visit SCCN booth (#3031)** for help and information (or just to visit) about **NEMAR/OpenNeuro**, **EEGLAB**, **HED**, **LSL**, and **MoBI**. + + **September 20, 2023 16:00 CEST**: **INCF Workshop on HED and BIDS** > Event annotation in neuroimaging using HED: from experiment to analysis > Half-day workshop at [**INCF Assembly 2023**](https://neuroinformatics.incf.org/register). diff --git a/docs/source/index.rst b/docs/source/index.rst index ac0e6dd..95938ac 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -105,7 +105,7 @@ Visit the `HED project homepage `_ for links to IntroductionToHed.md WhatsNew.md HowCanYouUseHed.md - + HedGovernance.md .. toctree:: @@ -144,12 +144,6 @@ Visit the `HED project homepage `_ for links to HedSchemas.md HedTestDatasets.md -.. toctree:: - :maxdepth: 3 - :hidden: - :caption: Drafts: - - HedGovernance.md Indices and tables ================== diff --git a/hedcode/jupyter_notebooks/bids/validate_bids_dataset.ipynb b/hedcode/jupyter_notebooks/bids/validate_bids_dataset.ipynb index 7b9f875..ab597a7 100644 --- a/hedcode/jupyter_notebooks/bids/validate_bids_dataset.ipynb +++ b/hedcode/jupyter_notebooks/bids/validate_bids_dataset.ipynb @@ -32,18 +32,8 @@ }, { "cell_type": "code", - "execution_count": 1, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Using HEDTOOLS version: {'date': '2023-09-01T15:54:07-0500', 'dirty': True, 'error': None, 'full-revisionid': '15594c2afa770e08f3881f4a9de04d21b3113750', 'version': '0.3.0+128.g15594c2.dirty'}\n", - "HED Examples version: {'version': '0.2.0+131.gae61cba.dirty', 'full-revisionid': 'ae61cba59be07284460a7503b282640e031b5e1f', 'dirty': True, 'error': None, 'date': '2023-09-03T13:50:01-0500'}\n", - "No HED validation errors\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "from hed.errors import get_printable_issue_string\n", "from hed.tools import BidsDataset\n", @@ -55,8 +45,10 @@ "\n", "## Set the dataset location and the check_for_warnings flag\n", "check_for_warnings = False\n", - "dataset_path = '../../../datasets/eeg_ds003645s_hed_column'\n", - "\n", + "#dataset_path = '../../../datasets/eeg_ds003645s_hed_column'\n", + "#dataset_path = '../../../datasets/eeg_ds004105s_hed'\n", + "dataset_path = 't:/summaryTests/ds004105-download'\n", + "outfile = 't:/ds004105_errors.txt'\n", "## Validate the dataset\n", "bids = BidsDataset(dataset_path)\n", "issue_list = bids.validate(check_for_warnings=check_for_warnings)\n", @@ -64,14 +56,13 @@ " issue_str = get_printable_issue_string(issue_list, \"HED validation errors: \", skip_filename=False)\n", "else:\n", " issue_str = \"No HED validation errors\"\n", - "print(issue_str)" + "print(issue_str)\n", + "if outfile:\n", + " with open(outfile, 'w') as fp:\n", + " fp.write(issue_str)\n" ], "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2023-09-03T20:15:04.777492900Z", - "start_time": "2023-09-03T20:14:59.038952100Z" - } + "collapsed": false } } ], diff --git a/hedcode/jupyter_notebooks/bids/validate_bids_datasets.ipynb b/hedcode/jupyter_notebooks/bids/validate_bids_datasets.ipynb index bb2eb3c..8091091 100644 --- a/hedcode/jupyter_notebooks/bids/validate_bids_datasets.ipynb +++ b/hedcode/jupyter_notebooks/bids/validate_bids_datasets.ipynb @@ -36,8 +36,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "Using HEDTOOLS version: {'date': '2023-09-01T15:54:07-0500', 'dirty': True, 'error': None, 'full-revisionid': '15594c2afa770e08f3881f4a9de04d21b3113750', 'version': '0.3.0+128.g15594c2.dirty'}\n", - "HED Examples version: {'version': '0.2.0+131.gae61cba.dirty', 'full-revisionid': 'ae61cba59be07284460a7503b282640e031b5e1f', 'dirty': True, 'error': None, 'date': '2023-09-03T13:50:01-0500'}\n", + "Using HEDTOOLS version: {'date': '2023-10-12T10:29:43-0500', 'dirty': False, 'error': None, 'full-revisionid': 'e9e63e39f6a99487c5e69ae96e653c4580045ec0', 'version': '0.3.0+164.ge9e63e3'}\n", + "HED Examples version: {'version': '0.2.0+168.g92a829c.dirty', 'full-revisionid': '92a829cb0336bd952db10f1890f23dde80aecd36', 'dirty': True, 'error': None, 'date': '2023-10-10T13:35:06-0500'}\n", "Validating eeg_ds003645s_hed\n", "No HED validation errors\n", "Validating eeg_ds003645s_hed_column\n", @@ -93,8 +93,8 @@ "name": "#%%\n" }, "ExecuteTime": { - "end_time": "2023-09-03T20:21:08.429817700Z", - "start_time": "2023-09-03T20:20:39.090638800Z" + "end_time": "2023-10-17T12:11:03.224728400Z", + "start_time": "2023-10-17T12:10:21.630499700Z" } } } diff --git a/setup.cfg b/setup.cfg index cb5476a..5c83106 100644 --- a/setup.cfg +++ b/setup.cfg @@ -57,4 +57,8 @@ style = pep440 versionfile_source = hedcode/_version.py versionfile_build = hedcode/_version.py tag_prefix = -parentdir_prefix = hedcode- \ No newline at end of file +parentdir_prefix = hedcode- + +[codespell] +skip = '*.git,*.pdf,*.xml,*.mediawiki,*.svg,versioneer.py,venv*,*.tsv,*.yaml,*.yml,*.json,*.rdf,*.jsonld,datasets*,' +ignore-words-list = 'te,parms'