From 1ce7e978d2dd944fd2bf0e403126ab6d3ee4aa62 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sat, 6 Jan 2024 13:43:07 -0500 Subject: [PATCH 1/6] Add github action to codespell master on push and PRs --- .github/workflows/codespell.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..4110588 --- /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 From 482475d8305a1cc25d1f56f8e7490b3d84be5588 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sat, 6 Jan 2024 13:43:07 -0500 Subject: [PATCH 2/6] Add rudimentary codespell config --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index bddde82..53860b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,3 +59,10 @@ 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 = '' +# ignore-words-list = '' From 9470cc912b4640ccc2bbf7cb82b58c5397a9f782 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sat, 6 Jan 2024 13:43:07 -0500 Subject: [PATCH 3/6] Add pre-commit definition for codespell --- .pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c52ab8..01d685b 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 From c0d0203f37c05e5d0b1fab7f12394be538411343 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sat, 6 Jan 2024 13:44:40 -0500 Subject: [PATCH 4/6] Ignores for codespell --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 53860b9..4af5841 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,4 +65,5 @@ inline-quotes = "single" skip = '.git,*.pdf,*.svg,go.sum' check-hidden = true # ignore-regex = '' -# ignore-words-list = '' +# name and unfortunate choices for a few variables +ignore-words-list = 'daa,serie,splitted' From bcc8def7ecfdcc165ae84397356c00c4e6fb8406 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sat, 6 Jan 2024 13:44:42 -0500 Subject: [PATCH 5/6] [DATALAD RUNCMD] run codespell throughout fixing typo automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- docs/faq.rst | 2 +- docs/index.rst | 2 +- docs/usage.rst | 2 +- tests/test_benchmark.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/faq.rst b/docs/faq.rst index 0eaff07..66c7728 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 7e53779..7547ce6 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 8a39ba7..65bf856 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/tests/test_benchmark.py b/tests/test_benchmark.py index d1969fb..832f57d 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 """ From f39f9b6fd46d89c2440e74f959ba13c5573d51cc Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sat, 6 Jan 2024 13:48:52 -0500 Subject: [PATCH 6/6] TEMP: adding typo on purpose to see if CI picksup without our workflow --- README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.rst b/README.rst index 307c39b..7a84ca3 100644 --- a/README.rst +++ b/README.rst @@ -2,6 +2,8 @@ Overview ======== +typohere: ot + .. start-badges .. list-table::