Skip to content

Commit

Permalink
Add codespell to pre-commit (#1172)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored Oct 13, 2023
1 parent a956b7e commit 547c4bc
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 28 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ repos:
rev: v0.1.10
hooks:
- id: clean-notebook
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
exclude: (\.min\.js$|\.svg$|\.html$)
additional_dependencies:
- tomli
4 changes: 2 additions & 2 deletions doc/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Please note that hvPlot is not yet compatible with Bokeh 3.
- Convert `DataFrame` columns with type `RangeIndex` to strings to ensure compatibility with `HoloViews` ([#932](https://github.com/holoviz/hvplot/pull/932))
- Ensure that `xarray` dataset metadata propagates to `NdOverlays` ([#930](https://github.com/holoviz/hvplot/pull/930))
- Support `rioxarray` ([#905](https://github.com/holoviz/hvplot/pull/905))
- Improve error message mentionning `pyproj` ([#950](https://github.com/holoviz/hvplot/pull/950))
- Improve error message mentioning `pyproj` ([#950](https://github.com/holoviz/hvplot/pull/950))
- Explorer:
- Don't error on datetime-like axis ([#968](https://github.com/holoviz/hvplot/pull/968))
- Don't use xlim/ylim slider if start and end values are identical ([#966](https://github.com/holoviz/hvplot/pull/966))
Expand Down Expand Up @@ -194,7 +194,7 @@ Features:

- Improved `.interactive` Dataframe support: max_rows display, column
access ([#640](https://github.com/holoviz/hvplot/pull/640))
- Improved accesssor and attribute behavior for `.interactive`
- Improved accessor and attribute behavior for `.interactive`
([#633](https://github.com/holoviz/hvplot/pull/633),
[#635](https://github.com/holoviz/hvplot/pull/635),
[#641](https://github.com/holoviz/hvplot/pull/641),
Expand Down
2 changes: 1 addition & 1 deletion examples/reference/pandas/errorbars.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"`errorbars` are most helpful when overlayed with other plot types. To do this we'll use the `*` operator."
"`errorbars` are most helpful when overlaid with other plot types. To do this we'll use the `*` operator."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/reference/pandas/hist.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"`hist` is often a good way to start looking at continous data to get a sense of the distribution. Similar methods include [`kde`](kde.ipynb) (also available as `density`)."
"`hist` is often a good way to start looking at continuous data to get a sense of the distribution. Similar methods include [`kde`](kde.ipynb) (also available as `density`)."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/reference/xarray/image.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"outputs": [],
"source": [
"time = '2014-01-01'\n",
"data = ds.sel(time=time).mean('time') - 273 # convert to celcius\n",
"data = ds.sel(time=time).mean('time') - 273 # convert to celsius\n",
"\n",
"data.hvplot.image(x='lon', y='lat', z='air', title=time, clabel='T [C]')"
]
Expand Down
2 changes: 1 addition & 1 deletion examples/user_guide/Customization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
"source": [
"## Geographic options\n",
"\n",
"When dealing with geographic data, there are a number of options that become avaliable. See the [geographic section](Geographic_Data.ipynb) for more information on working with geographic data:\n",
"When dealing with geographic data, there are a number of options that become available. See the [geographic section](Geographic_Data.ipynb) for more information on working with geographic data:\n",
"\n",
" coastline (default=False):\n",
" Whether to display a coastline on top of the plot, setting\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/user_guide/Pandas_API.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Controling layout and targeting multiple axes\n",
"### Controlling layout and targeting multiple axes\n",
"\n",
"The layout of subplots can be specified using `.cols(n)`."
]
Expand Down Expand Up @@ -1052,7 +1052,7 @@
"source": [
"### Plotting tables\n",
"\n",
"The matplotlib backend includes support for the `table` keyword in `DataFrame.plot()` and `Series.plot()`. This same effect can be acomplished with holoviews by using `hvplot.table` and creating a layout of the resulting plots."
"The matplotlib backend includes support for the `table` keyword in `DataFrame.plot()` and `Series.plot()`. This same effect can be accomplished with holoviews by using `hvplot.table` and creating a layout of the resulting plots."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion hvplot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class _PatchHvplotDocstrings:

def __init__(self):
# Store the original signatures because the method signatures
# are going to be patched everytime an extension is changed.
# are going to be patched every time an extension is changed.
signatures = {}
for cls in [hvPlot, hvPlotTabular]:
for _kind in HoloViewsConverter._kind_mapping:
Expand Down
2 changes: 1 addition & 1 deletion hvplot/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ def _validate_kwds(self, kwds):
combined_opts = (self._data_options + self._axis_options +
self._op_options +
self._geo_options + kind_opts + valid_opts)
# Only add the gloabl styling options in the suggestions for bokeh
# Only add the global styling options in the suggestions for bokeh
# since they may not be supported by all the backends.
# See e.g. alpha for Area plots with plotly:
# https://github.com/holoviz/holoviews/issues/5226
Expand Down
6 changes: 3 additions & 3 deletions hvplot/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
- `__getitem__`
- `__array_ufunc__`
The `_depth` attribute starts at 0 and is incremented by 1 everytime
The `_depth` attribute starts at 0 and is incremented by 1 every time
a new `Interactive` instance is created part of a chain.
The root instance in an expression has a `_depth` of 0. An expression can
consist of multiple chains, such as `dfi[dfi.A > 1]`, as the `Interactive`
Expand All @@ -52,7 +52,7 @@
such as Pandas/Dask/... Dataframes/Series, Xarray Dataset/DataArray, etc.
For instance a Python expression such as `(series + 2).head()` can be
expressed with a dim transform whose repr will be `(dim('*').pd+2).head(2)`,
effectively showing that the dim transfom has recorded the different
effectively showing that the dim transform has recorded the different
operations that are meant to be applied to the data.
The `_transform` attribute stores the dim transform.
Expand Down Expand Up @@ -236,7 +236,7 @@ def __new__(cls, obj, **kwargs):
def applies(cls, obj):
"""
Subclasses must implement applies and return a boolean to indicate
wheter the subclass should apply or not to the obj.
whether the subclass should apply or not to the obj.
"""
return True

Expand Down
24 changes: 12 additions & 12 deletions hvplot/plotting/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class hvPlotTabular(hvPlotBase):
The plotting method: `df.hvplot(...)` creates a plot similarly to the familiar Pandas
`df.plot` method.
For more detailed options use a specific ploting method, e.g. `df.hvplot.line`.
For more detailed options use a specific plotting method, e.g. `df.hvplot.line`.
Reference: https://hvplot.holoviz.org/reference/index.html
Expand Down Expand Up @@ -273,15 +273,15 @@ class hvPlotTabular(hvPlotBase):

def line(self, x=None, y=None, **kwds):
"""
The `line` plot connects the points with a continous curve.
The `line` plot connects the points with a continuous curve.
Reference: https://hvplot.holoviz.org/reference/pandas/line.html
Parameters
----------
x : string, optional
Field name(s) to draw x-positions from. If not specified, the index is
used. Can refer to continous and categorical data.
used. Can refer to continuous and categorical data.
y : string or list, optional
Field name(s) to draw y-positions from. If not specified, all numerical
fields are used.
Expand Down Expand Up @@ -381,7 +381,7 @@ def step(self, x=None, y=None, where="mid", **kwds):
----------
x : string, optional
Field name(s) to draw x-positions from. If not specified, the index is
used. Must refer to continous data. Not categorical data.
used. Must refer to continuous data. Not categorical data.
y : string or list, optional
Field name(s) to draw y-positions from. If not specified, all numerical
fields are used.
Expand Down Expand Up @@ -480,7 +480,7 @@ def scatter(self, x=None, y=None, **kwds):
----------
x : string, optional
Field name(s) to draw x-positions from. If not specified, the index is
used. Can refer to continous and categorical data.
used. Can refer to continuous and categorical data.
y : string or list, optional
Field name(s) to draw y-positions from. If not specified, all numerical
fields are used.
Expand Down Expand Up @@ -585,7 +585,7 @@ def area(self, x=None, y=None, y2=None, stacked=True, **kwds):
----------
x : string, optional
Field name(s) to draw x-positions from. If not specified, the index is
used. Can refer to continous and categorical data.
used. Can refer to continuous and categorical data.
y : string, optional
Field name to draw the first y-position from
y2 : string, optional
Expand Down Expand Up @@ -657,7 +657,7 @@ def area(self, x=None, y=None, y2=None, stacked=True, **kwds):
def errorbars(self, x=None, y=None, yerr1=None, yerr2=None, **kwds):
"""
`errorbars` provide a visual indicator for the variability of the plotted data on a graph.
They are usually overlayed with other plots such as `scatter` , `line` or `bar` plots to
They are usually overlaid with other plots such as `scatter` , `line` or `bar` plots to
indicate the variability.
Reference: https://hvplot.holoviz.org/reference/pandas/errorbars.html
Expand All @@ -666,7 +666,7 @@ def errorbars(self, x=None, y=None, yerr1=None, yerr2=None, **kwds):
----------
x : string, optional
Field name to draw the x-position from. If not specified, the index is
used. Can refer to continous and categorical data.
used. Can refer to continuous and categorical data.
y : string, optional
Field name to draw the y-position from
yerr1 : string, optional
Expand Down Expand Up @@ -810,9 +810,9 @@ def heatmap(self, x=None, y=None, C=None, colorbar=True, **kwds):
----------
x : string, optional
Field name to draw x coordinates from. If not specified, the index is used. Can refer
to continous and categorical data.
to continuous and categorical data.
y : string
Field name to draw y-positions from. Can refer to continous and categorical data.
Field name to draw y-positions from. Can refer to continuous and categorical data.
C : string, optional
Field to draw heatmap color from. If not specified a simple count will be used.
colorbar: boolean, optional
Expand Down Expand Up @@ -1288,7 +1288,7 @@ def violin(self, y=None, by=None, **kwds):

def hist(self, y=None, by=None, **kwds):
"""
A `histogram` displays an approximate representation of the distribution of continous data.
A `histogram` displays an approximate representation of the distribution of continuous data.
Reference: https://hvplot.holoviz.org/reference/pandas/hist.html
Expand Down Expand Up @@ -1867,7 +1867,7 @@ class hvPlot(hvPlotTabular):
The plotting method: `df.hvplot(...)` creates a plot similarly to the familiar Pandas
`df.plot` method.
For more detailed options use a specific ploting method, e.g. `df.hvplot.line`.
For more detailed options use a specific plotting method, e.g. `df.hvplot.line`.
Reference: https://hvplot.holoviz.org/reference/index.html
Expand Down
2 changes: 1 addition & 1 deletion hvplot/plotting/scatter_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def scatter_matrix(data, c=None, chart='scatter', diagonal='hist',
from ..util import hv_version
if hv_version <= Version('1.14.6'):
warnings.warn(
"Versions of holoviews before 1.14.7 did not suppport "
"Versions of holoviews before 1.14.7 did not support "
"dynamic update of rasterized/datashaded scatter matrix. "
"Update holoviews to a newer version."
)
Expand Down
2 changes: 1 addition & 1 deletion hvplot/tests/testinteractive.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self, call_args, call_kwargs, **kwargs):
for k, v in kwargs.items():
if k in ['args', 'kwargs']:
raise ValueError(
'**kwargs passed to CallCtxt cant be named args or kwargs'
"**kwargs passed to CallCtxt can't be named args or kwargs"
)
setattr(self, k, v)
self.args = call_args
Expand Down
2 changes: 1 addition & 1 deletion hvplot/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class hvplot_extension(_hv.extension):
def __call__(self, *args, **params):
# importing e.g. hvplot.pandas always loads the bokeh extension.
# so hvplot.extension('matplotlib', compatibility='bokeh') doesn't
# require the user or the code to explicitely load bokeh.
# require the user or the code to explicitly load bokeh.
compatibility = params.pop('compatibility', None)
super().__call__(*args, **params)
backend = _hv.Store.current_backend
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ filterwarnings = [
# 2023-09: See https://github.com/python-streamz/streamz/issues/460
"ignore: pkg_resources is deprecated as an API:DeprecationWarning:streamz.plugins",
]

[tool.codespell]
ignore-words-list = "ser"
skip = "doc/generate_modules.py"
write-changes = true

0 comments on commit 547c4bc

Please sign in to comment.