From cf5cedc597755af62b6bff90cbd7424bc5514480 Mon Sep 17 00:00:00 2001 From: IanCa Date: Fri, 13 Oct 2023 19:17:14 -0500 Subject: [PATCH 1/3] Initial codespell commit --- .github/workflows/codespell.yaml | 22 ++++++++++++++++++++++ pyproject.toml | 4 ++++ 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/codespell.yaml diff --git a/.github/workflows/codespell.yaml b/.github/workflows/codespell.yaml new file mode 100644 index 000000000..3deac45af --- /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/pyproject.toml b/pyproject.toml index 8bc13baf6..f5549033c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,7 @@ [build-system] requires = ["setuptools>=42", "versioneer-518"] build-backend = "setuptools.build_meta" + +[tool.codespell] +skip = '*.git,*.pdf,*.xml,*.mediawiki,*.svg,versioneer.py,venv*,*.tsv,*.yaml,*.yml,*.json,*.rdf,*.jsonld' +ignore-words-list = 'te,parms' From 9afb7b66e62bdd6b96ce9f97503f73a2fe811635 Mon Sep 17 00:00:00 2001 From: IanCa Date: Mon, 16 Oct 2023 14:23:02 -0500 Subject: [PATCH 2/3] Do spelling fixes, excluse spec tests folder --- hed/models/column_mapper.py | 2 +- hed/models/expression_parser.py | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hed/models/column_mapper.py b/hed/models/column_mapper.py index 761ab81a9..e0948b9bd 100644 --- a/hed/models/column_mapper.py +++ b/hed/models/column_mapper.py @@ -149,7 +149,7 @@ def _set_sidecar(self, sidecar): sidecar (Sidecar or None): the sidecar to use :raises ValueError: - - A sidecar was prevoiusly set + - A sidecar was previously set """ if self._sidecar: raise ValueError("Trying to set a second sidecar on a column mapper.") diff --git a/hed/models/expression_parser.py b/hed/models/expression_parser.py index ab56aa76b..736ff562e 100644 --- a/hed/models/expression_parser.py +++ b/hed/models/expression_parser.py @@ -235,7 +235,7 @@ def handle_expr(self, hed_group, exact=False): class ExpressionOr(Expression): def handle_expr(self, hed_group, exact=False): groups1 = self.left.handle_expr(hed_group, exact=exact) - # Don't early out as we need to gather all groups incase tags appear more than once etc + # Don't early out as we need to gather all groups in case tags appear more than once etc groups2 = self.right.handle_expr(hed_group, exact=exact) # todo: optimize this eventually # Filter out duplicates diff --git a/pyproject.toml b/pyproject.toml index f5549033c..7ba509cc0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,5 +3,5 @@ requires = ["setuptools>=42", "versioneer-518"] build-backend = "setuptools.build_meta" [tool.codespell] -skip = '*.git,*.pdf,*.xml,*.mediawiki,*.svg,versioneer.py,venv*,*.tsv,*.yaml,*.yml,*.json,*.rdf,*.jsonld' +skip = '*.git,*.pdf,*.xml,*.mediawiki,*.svg,versioneer.py,venv*,*.tsv,*.yaml,*.yml,*.json,*.rdf,*.jsonld,spec_tests' ignore-words-list = 'te,parms' From 05aec79ecc82743ae8f7f7b72b1d93c12063dde6 Mon Sep 17 00:00:00 2001 From: IanCa Date: Mon, 16 Oct 2023 16:36:12 -0500 Subject: [PATCH 3/3] Fix Monique noitced in documentation --- hed/tools/remodeling/operations/remove_columns_op.py | 4 ++-- hed/tools/remodeling/operations/rename_columns_op.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hed/tools/remodeling/operations/remove_columns_op.py b/hed/tools/remodeling/operations/remove_columns_op.py index 267a7039a..6901b6ce5 100644 --- a/hed/tools/remodeling/operations/remove_columns_op.py +++ b/hed/tools/remodeling/operations/remove_columns_op.py @@ -6,8 +6,8 @@ class RemoveColumnsOp(BaseOp): """ Remove columns from a tabular file. Required remodeling parameters: - - **remove_names** (*list*): The names of the columns to be removed. - - **ignore_missing** (*boolean*): If true, names in remove_names that are not columns in df should be ignored. + - **column_names** (*list*): The names of the columns to be removed. + - **ignore_missing** (*boolean*): If true, names in column_names that are not columns in df should be ignored. """ diff --git a/hed/tools/remodeling/operations/rename_columns_op.py b/hed/tools/remodeling/operations/rename_columns_op.py index 2a2f275a9..0a3329b0c 100644 --- a/hed/tools/remodeling/operations/rename_columns_op.py +++ b/hed/tools/remodeling/operations/rename_columns_op.py @@ -8,7 +8,7 @@ class RenameColumnsOp (BaseOp): Required remodeling parameters: - **column_mapping** (*dict*): The names of the columns to be removed. - - **ignore_missing** (*bool*): If true, the names in remove_names that are not columns and should be ignored. + - **ignore_missing** (*bool*): If true, the names in column_mapping that are not columns and should be ignored. """