diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 24c05abc..e55cc2c8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -61,3 +61,9 @@ repos: - "types-Pygments>=2.17" - "types-colorama>=0.4.15.12" - "types-setuptools>=69" + - repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + additional_dependencies: + - tomli diff --git a/README.md b/README.md index 30cc69d4..f7b2cd8a 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,6 @@ jupyter labextension develop . --overwrite ``` Note for developers: the `--symlink` argument on Linux or OS X allows one to modify the JavaScript code in-place. This feature is not available with Windows. -` ## Contributions diff --git a/examples/Column Width Auto-Fit.ipynb b/examples/Column Width Auto-Fit.ipynb index 8ec6198f..33251500 100644 --- a/examples/Column Width Auto-Fit.ipynb +++ b/examples/Column Width Auto-Fit.ipynb @@ -8,7 +8,7 @@ "### `ipydatagrid` supports auto-fitting of column widths!\n", "\n", "The DataGrid constructor can take the following arguments:\n", - "1. `auto_fit_columns`: boolean, indicates whether to auot-fit column widths. Setting to False will reset all column sizes to `base_column_size`.\n", + "1. `auto_fit_columns`: boolean, indicates whether to auto-fit column widths. Setting to False will reset all column sizes to `base_column_size`.\n", "2. `auto_fit_params` : dict, allows for more granular customisation of the auto-fitting algorithm:\n", " * `area`: select which section of the grid to apply auto-fitting on. Possible options are `all`, `row-header` (index column) and `body`.\n", " * `padding`: specifies how much padding should be added to the width of each column after resizing (default 30) \n", diff --git a/examples/ConditionalFormatting.ipynb b/examples/ConditionalFormatting.ipynb index 45d43d56..5362f75b 100644 --- a/examples/ConditionalFormatting.ipynb +++ b/examples/ConditionalFormatting.ipynb @@ -169,7 +169,7 @@ " }\n", ")\n", "\n", - "# Formatting the values in column 1 based on the value of the silbing row in column 2\n", + "# Formatting the values in column 1 based on the value of the sibling row in column 2\n", "def format_based_on_other_column(cell):\n", " return \"green\" if cell.metadata.data[\"Column 2\"] > 0.0 else \"yellow\"\n", "\n", diff --git a/examples/DataGrid.ipynb b/examples/DataGrid.ipynb index d251f96a..26e5907e 100644 --- a/examples/DataGrid.ipynb +++ b/examples/DataGrid.ipynb @@ -191,7 +191,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Perfomance test: A million cells with ipydatagrid" + "# Performance test: A million cells with ipydatagrid" ] }, { diff --git a/examples/Themes.ipynb b/examples/Themes.ipynb index feb21d33..92bf1120 100644 --- a/examples/Themes.ipynb +++ b/examples/Themes.ipynb @@ -34,7 +34,7 @@ "14. `header_selection_border_color`: border color of headers intersecting with selected area at column or row\n", "15. `cursor_fill_color`: fill color of cursor\n", "16. `cursor_border_color`: border color of cursor\n", - "17. `scroll_shadow` : Dict of color parameters for scroll shadow (vertical and horizontal). Takes three paramaters:\n", + "17. `scroll_shadow` : Dict of color parameters for scroll shadow (vertical and horizontal). Takes three parameters:\n", " * `size` : size of shadow in pixels\n", " * `color1` : gradient color 1\n", " * `color2` : gradient color 2\n", diff --git a/ipydatagrid/datagrid.py b/ipydatagrid/datagrid.py index f6987c91..c5e90eb3 100644 --- a/ipydatagrid/datagrid.py +++ b/ipydatagrid/datagrid.py @@ -316,7 +316,7 @@ class DataGrid(DOMWidget): cursor_fill_color : fill color of cursor cursor_border_color : border color of cursor scroll_shadow : Dict of color parameters for scroll shadow (vertical and - horizontal). Takes three paramaters: + horizontal). Takes three parameters: size : size of shadow in pixels color1 : gradient color 1 color2 : gradient color 2 diff --git a/js/core/filterMenu.ts b/js/core/filterMenu.ts index 58eff0f0..9b29a086 100644 --- a/js/core/filterMenu.ts +++ b/js/core/filterMenu.ts @@ -351,7 +351,7 @@ export class InteractiveFilterDialog extends BoxPanel { this.userInteractedWithDialog = false; - // Determines whether we should or not tick the "Select all" chekcbox + // Determines whether we should or not tick the "Select all" checkbox this.updateSelectAllCheckboxState(); // Update styling on unique value grid diff --git a/js/core/gridContextMenu.ts b/js/core/gridContextMenu.ts index 6f6acbc8..30e31ff4 100644 --- a/js/core/gridContextMenu.ts +++ b/js/core/gridContextMenu.ts @@ -25,7 +25,7 @@ export abstract class GridContextMenu { } /** - * Opens the context menu in reponse to the `cellClick` signal of the + * Opens the context menu in response to the `cellClick` signal of the * data grid. * * @param grid - The "sender" of the signal. @@ -74,7 +74,7 @@ export namespace GridContextMenu { */ export class FeatherGridContextMenu extends GridContextMenu { /** - * Opens the context menu in reponse to the `cellClick` signal of the + * Opens the context menu in response to the `cellClick` signal of the * data grid. * * @param grid - The "sender" of the signal. diff --git a/js/core/transform.ts b/js/core/transform.ts index 271e24c4..bebc3a15 100644 --- a/js/core/transform.ts +++ b/js/core/transform.ts @@ -29,7 +29,7 @@ export namespace Transform { */ export type Filter = { /** - * A type alias for this trasformation. + * A type alias for this transformation. */ type: 'filter'; @@ -39,7 +39,7 @@ export namespace Transform { columnIndex: number; /** - * The operator for this trasformation. + * The operator for this transformation. */ operator: FilterOperator; diff --git a/js/core/transformStateManager.ts b/js/core/transformStateManager.ts index 9e47a0ec..a47e5925 100644 --- a/js/core/transformStateManager.ts +++ b/js/core/transformStateManager.ts @@ -104,7 +104,7 @@ export class TransformStateManager { } /** - * Creates an optimzed list of TransformExecutors for the provided data. + * Creates an optimized list of TransformExecutors for the provided data. * * @param data - The dataset to operate on. */ diff --git a/js/datagrid.ts b/js/datagrid.ts index d0761c60..dd583275 100644 --- a/js/datagrid.ts +++ b/js/datagrid.ts @@ -303,7 +303,7 @@ export class DataGridModel extends DOMWidgetModel { } /** - * Helper function to conver snake_case strings to camelCase. + * Helper function to convert snake_case strings to camelCase. * Assumes all strings are valid snake_case (all lowercase). * @param string snake_case string * @returns camelCase string diff --git a/js/vegaexpr.ts b/js/vegaexpr.ts index 5420c423..7b7a9854 100644 --- a/js/vegaexpr.ts +++ b/js/vegaexpr.ts @@ -125,7 +125,7 @@ export class VegaExprView extends WidgetView { export interface ParsedVegaExpr { /** - * A JavaScript soring literal describing + * A JavaScript storing literal describing * the converted vega expression */ code: string; diff --git a/pyproject.toml b/pyproject.toml index d5d622e7..ac56f7ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -108,6 +108,10 @@ disable = "C0330, C0326" [tool.pylint.format] max-line-length = "80" +[tool.codespell] +ignore-words-list = "statics" +skip = "*/yarn.lock" + [tool.tbump] field = [ { name = "channel", default = "" }, diff --git a/ui-tests-ipw7/tests/notebooks/conditional_formatting.ipynb b/ui-tests-ipw7/tests/notebooks/conditional_formatting.ipynb index c3176954..ffaee754 100644 --- a/ui-tests-ipw7/tests/notebooks/conditional_formatting.ipynb +++ b/ui-tests-ipw7/tests/notebooks/conditional_formatting.ipynb @@ -125,7 +125,7 @@ " }\n", ")\n", "\n", - "# Formatting the values in column 1 based on the value of the silbing row in column 2\n", + "# Formatting the values in column 1 based on the value of the sibling row in column 2\n", "def format_based_on_other_column(cell):\n", " return \"green\" if cell.metadata.data[\"Column 2\"] > 0.0 else \"yellow\"\n", "\n", diff --git a/ui-tests-ipw7/tests/notebooks/datagrid_nested_hierarchies_update.ipynb b/ui-tests-ipw7/tests/notebooks/datagrid_nested_hierarchies_update.ipynb index a1e62da3..30a9b6a0 100644 --- a/ui-tests-ipw7/tests/notebooks/datagrid_nested_hierarchies_update.ipynb +++ b/ui-tests-ipw7/tests/notebooks/datagrid_nested_hierarchies_update.ipynb @@ -65,7 +65,7 @@ "metadata": {}, "outputs": [], "source": [ - "# We can potentially improve the hueristics for this calculation\n", + "# We can potentially improve the heuristics for this calculation\n", "nested_grid.auto_fit_columns = True" ] }, diff --git a/ui-tests-ipw8/tests/notebooks/conditional_formatting.ipynb b/ui-tests-ipw8/tests/notebooks/conditional_formatting.ipynb index c3176954..ffaee754 100644 --- a/ui-tests-ipw8/tests/notebooks/conditional_formatting.ipynb +++ b/ui-tests-ipw8/tests/notebooks/conditional_formatting.ipynb @@ -125,7 +125,7 @@ " }\n", ")\n", "\n", - "# Formatting the values in column 1 based on the value of the silbing row in column 2\n", + "# Formatting the values in column 1 based on the value of the sibling row in column 2\n", "def format_based_on_other_column(cell):\n", " return \"green\" if cell.metadata.data[\"Column 2\"] > 0.0 else \"yellow\"\n", "\n", diff --git a/ui-tests-ipw8/tests/notebooks/datagrid_nested_hierarchies_update.ipynb b/ui-tests-ipw8/tests/notebooks/datagrid_nested_hierarchies_update.ipynb index a1e62da3..30a9b6a0 100644 --- a/ui-tests-ipw8/tests/notebooks/datagrid_nested_hierarchies_update.ipynb +++ b/ui-tests-ipw8/tests/notebooks/datagrid_nested_hierarchies_update.ipynb @@ -65,7 +65,7 @@ "metadata": {}, "outputs": [], "source": [ - "# We can potentially improve the hueristics for this calculation\n", + "# We can potentially improve the heuristics for this calculation\n", "nested_grid.auto_fit_columns = True" ] },