diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000..41105888 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,23 @@ +# Codespell configuration is within pyproject.toml +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c52ab83..01d685b8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,3 +20,10 @@ repos: - id: trailing-whitespace - id: end-of-file-fixer - id: debug-statements + # Configuration for codespell is in pyproject.toml + - repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + additional_dependencies: + - tomli diff --git a/README.rst b/README.rst index 307c39b6..7a84ca32 100644 --- a/README.rst +++ b/README.rst @@ -2,6 +2,8 @@ Overview ======== +typohere: ot + .. start-badges .. list-table:: diff --git a/docs/faq.rst b/docs/faq.rst index 0eaff077..66c77281 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -22,7 +22,7 @@ Why is my ``StdDev`` so high? Why is my ``Min`` way lower than ``Q1-1.5IQR``? You may see this issue in the histogram plot. This is another instance of *bad isolation*. - For example, Intel CPUs have a feature called `Turbo Boost `_ wich + For example, Intel CPUs have a feature called `Turbo Boost `_ which overclocks your CPU depending on how many cores you have at that time and how hot your CPU is. If your CPU is too hot you get no Turbo Boost. If you get Turbo Boost active then the CPU quickly gets hot. You can see how this won't work for sustained workloads. diff --git a/docs/index.rst b/docs/index.rst index 7e53779a..7547ce6d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,7 +9,7 @@ Notable features and goals: * Sensible defaults and automatic calibration for microbenchmarks * Good integration with pytest * Comparison and regression tracking -* Exhausive statistics +* Exhaustive statistics * JSON export Examples: diff --git a/docs/usage.rst b/docs/usage.rst index 8a39ba77..65bf8564 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -262,7 +262,7 @@ You can set per-test options with the ``benchmark`` marker: Extra info ========== -You can set arbirary values in the ``benchmark.extra_info`` dictionary, which +You can set arbitrary values in the ``benchmark.extra_info`` dictionary, which will be saved in the JSON if you use ``--benchmark-autosave`` or similar: .. code-block:: python diff --git a/pyproject.toml b/pyproject.toml index bddde827..4af58412 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,3 +59,11 @@ skip-string-normalization = true [tool.ruff.flake8-quotes] inline-quotes = "single" + +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +[tool.codespell] +skip = '.git,*.pdf,*.svg,go.sum' +check-hidden = true +# ignore-regex = '' +# name and unfortunate choices for a few variables +ignore-words-list = 'daa,serie,splitted' diff --git a/tests/test_benchmark.py b/tests/test_benchmark.py index d1969fb2..832f57d5 100644 --- a/tests/test_benchmark.py +++ b/tests/test_benchmark.py @@ -759,7 +759,7 @@ def pytest_benchmark_update_machine_info(config, machine_info): simple_test = """ def test_simple(benchmark): @benchmark - def resuilt(): + def result(): 1+1 """