8000 pre-commit hook for codespell by cyschneck · Pull Request #579 · NCAR/geocat-comp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pre-commit hook for codespell #579

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

Merged
merged 2 commits into from
Mar 19, 2024
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
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ repos:
- id: docformatter
args: [--in-place]

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
- tomli

- repo: https://github.com/pre-commit/pre-commit-hooks # Some common pre-commit hooks
rev: v3.4.0
hooks:
Expand Down
2 changes: 2 additions & 0 deletions docs/contrib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ To manually run the pre-commit hooks, use the following command:

pre-commit run --all-files

If `codespell` flags on a jargon specific term, you can add the term to the `ignore-words-list` in`pyproject.toml`. Any words added to the `ignore-words-list` should be lower-case.

You can skip the pre-commit hooks by adding the ``--no-verify`` flag to your
commit command like this:

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ examples to get you started.
:img-top: _static/images/icons/handshake.svg
:link: getting_started/overview.rst

Get aquainted with GeoCAT-comp
Get acquainted with GeoCAT-comp

.. grid-item-card:: Quick Installation
:class-title: custom-title
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ compatibility between dependency packages.

Also, note that the Conda package manager automatically installs all required
dependencies of GeoCAT-comp, meaning it is not necessary to explicitly install
Python, NumPy, Xarray, or Dask when creating an envionment and installing GeoCAT-comp.
Python, NumPy, Xarray, or Dask when creating an environment and installing GeoCAT-comp.
Although packages like Matplotlib are often used with GeoCAT-comp, they are considered
`optional` dependencies and must be explicitly installed.

Expand Down
8 changes: 8 additions & 0 deletions docs/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
Release Notes
=============

v2024.02.0 (Unreleased)
------------------------------
Upcoming release

Internal Changes
^^^^^^^^^^^^^
* Additional pre-commit hook for codespell by `Cora Schneck`_ in (:pr:`579`)

v2024.02.0 (February 28, 2024)
------------------------------
This release switches the package to use an implicit namespace and adds support
Expand Down
2 changes: 1 addition & 1 deletion docs/user_api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Gradient

gradient

Iterpolation
Interpolation
^^^^^^^^^^^^
.. currentmodule:: geocat.comp.interpolation
.. autosummary::
Expand Down
2 changes: 1 addition & 1 deletion geocat/comp/climatologies.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def climate_anomaly(
dimension.

freq : str
Frequency alias. When the ``'year'`` allias is used, the yearly average is
Frequency alias. When the ``'year'`` alias is used, the yearly average is
subtracted from each data point. Multiyear climatologies are not yet possible
with this function. Accepted aliases:

Expand Down
18 changes: 9 additions & 9 deletions geocat/comp/fourier_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def fourier_filter(
band_pass: bool = False,
band_block: bool = False) -> typing.Union[np.ndarray, xr.DataArray]:
"""Filter a dataset by frequency. This function allows for low_pass,
high_pass, band_pass, or band_block filtering of the data's freqency
high_pass, band_pass, or band_block filtering of the data's frequency
representation.

Parameters
Expand Down Expand Up @@ -174,8 +174,8 @@ def fourier_low_pass(
frequency: float,
cutoff_frequency_low: float,
time_axis: int = 0) -> typing.Union[np.ndarray, xr.DataArray]:
"""Filter a dataset by frequency. This function allowes for low_pass
filtering of the data's freqency representation.
"""Filter a dataset by frequency. This function allows for low_pass
filtering of the data's frequency representation.

Parameters
----------
Expand Down Expand Up @@ -208,8 +208,8 @@ def fourier_high_pass(
frequency: float,
cutoff_frequency_high: float,
time_axis: int = 0) -> typing.Union[np.ndarray, xr.DataArray]:
"""Filter a dataset by frequency. This function allowes for high_pass
filtering of the data's freqency representation.
"""Filter a dataset by frequency. This function allows for high_pass
filtering of the data's frequency representation.

Parameters
----------
Expand Down Expand Up @@ -243,8 +243,8 @@ def fourier_band_pass(
cutoff_frequency_low: float,
cutoff_frequency_high: float,
time_axis: int = 0) -> typing.Union[np.ndarray, xr.DataArray]:
"""Filter a dataset by frequency. This function allowes for band_pass
filtering of the data's freqency representation.
"""Filter a dataset by frequency. This function allows for band_pass
filtering of the data's frequency representation.

Parameters
----------
Expand Down Expand Up @@ -282,8 +282,8 @@ def fourier_band_block(
cutoff_frequency_low: float,
cutoff_frequency_high: float,
time_axis: int = 0) -> typing.Union[np.ndarray, xr.DataArray]:
"""Filter a dataset by frequency. This function allowes for band_block
filtering of the data's freqency representation.
"""Filter a dataset by frequency. This function allows for band_block
filtering of the data's frequency representation.

Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion geocat/comp/interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def _temp_extrapolate(data, lev_dim, lev, p_sfc, ps, phi_sfc):
Returns
-------
result: :class:`xarray.DataArray`
The extrapolated temepratures at the provided pressure levels.
The extrapolated temperatures at the provided pressure levels.
"""
R_d = 287.04 # dry air gas constant
g_inv = 1 / 9.80616 # inverse of gravity
Expand Down
2 changes: 1 addition & 1 deletion geocat/comp/meteorology.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ def heat_index(
) -> typing.Union[np.ndarray, xr.DataArray]:
"""Compute the 'heat index' as calculated by the National Weather Service.

The heat index calculation in this funtion is described at:
The heat index calculation in this function is described at:
https://www.wpc.ncep.noaa.gov/html/heatindex_equation.shtml

The 'Heat Index' is a measure of how hot weather "feels" to the body. The combination of temperature and humidity
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ requires = [

[tool.setuptools_scm]
fallback_version = "999"

[tool.codespell]
ignore-words-list = "alph, ond,"
skip = '*.ipynb'
0