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

Add codespell/fix typos #778

Merged
merged 3 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/codespell.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion hed/models/column_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
2 changes: 1 addition & 1 deletion hed/models/expression_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions hed/tools/remodeling/operations/remove_columns_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

"""

Expand Down
2 changes: 1 addition & 1 deletion hed/tools/remodeling/operations/rename_columns_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

"""

Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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,spec_tests'
ignore-words-list = 'te,parms'