From a7678b07bffa9192c9466d57f29099430c5b8584 Mon Sep 17 00:00:00 2001 From: "arjxn.py" Date: Sat, 7 Sep 2024 18:42:50 +0530 Subject: [PATCH 01/10] Configure `codespell` hook --- .pre-commit-config.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..b832d6fb7 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,16 @@ +ci: + # pre-commit.ci will open PRs updating our hooks once a month + autoupdate_schedule: monthly + # skip any check that needs internet access + autofix_prs: true + +repos: + # Codespell hook configuration + - repo: https://github.com/codespell-project/codespell + rev: v2.3.0 + hooks: + - id: codespell + name: Spell Check with Codespell + args: ['--ignore-words-list=hte,nd'] + files: '\\.(tsx|md)$' + exclude: '' From 37d104dbe9b8727d5059bcf77f92a729ee347ee1 Mon Sep 17 00:00:00 2001 From: "arjxn.py" Date: Sat, 7 Sep 2024 19:42:56 +0530 Subject: [PATCH 02/10] exclude `.svg` --- .pre-commit-config.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b832d6fb7..bac781d15 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,5 +12,4 @@ repos: - id: codespell name: Spell Check with Codespell args: ['--ignore-words-list=hte,nd'] - files: '\\.(tsx|md)$' - exclude: '' + exclude: '.svg' From 3885728149783b23750a921cc6807e6203d570eb Mon Sep 17 00:00:00 2001 From: "arjxn.py" Date: Sat, 7 Sep 2024 19:49:55 +0530 Subject: [PATCH 03/10] write changes and also exclude `package-lock.json` --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bac781d15..63a85697d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,5 +11,5 @@ repos: hooks: - id: codespell name: Spell Check with Codespell - args: ['--ignore-words-list=hte,nd'] - exclude: '.svg' + args: ['--write-changes'] + exclude: 'package-lock\.json|\.svg$' From 8c27476663aab6a66c2b682cc8edcd18f6a949ba Mon Sep 17 00:00:00 2001 From: "arjxn.py" Date: Sat, 7 Sep 2024 20:08:39 +0530 Subject: [PATCH 04/10] Leave out some wanted words --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 63a85697d..38e942b1d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,5 +11,5 @@ repos: hooks: - id: codespell name: Spell Check with Codespell - args: ['--write-changes'] + args: ['--write-changes', '--ignore-words-list=cppp,normale'] exclude: 'package-lock\.json|\.svg$' From b63372a605335290444891fa7b0940862a843146 Mon Sep 17 00:00:00 2001 From: "arjxn.py" Date: Sat, 7 Sep 2024 20:14:05 +0530 Subject: [PATCH 05/10] One shot pass caught some typos --- src/components/about/Team/Joel.md | 2 +- src/components/blog/_config.yml | 2 +- src/components/blog/blogpostsDetails.json | 2 +- src/components/contact/index.tsx | 2 +- src/components/home/WhatWeDo/topics/Computing.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/about/Team/Joel.md b/src/components/about/Team/Joel.md index 36f497e19..fa13d7033 100644 --- a/src/components/about/Team/Joel.md +++ b/src/components/about/Team/Joel.md @@ -1,4 +1,4 @@ -Before joining QuantStack, Joël worked since 2003 in various companies covering a large spectre of domains all dominated by performance constraints: games, embedded software of all sorts, robotics (Softbank-Robotics/Aldebaran), "heavy" interractive web apps (https://jellynote.com score player for example)... +Before joining QuantStack, Joël worked since 2003 in various companies covering a large spectre of domains all dominated by performance constraints: games, embedded software of all sorts, robotics (Softbank-Robotics/Aldebaran), "heavy" interactive web apps (https://jellynote.com score player for example)... Through the years Joël participated to various open-source projects with, in recent years, a particular focus on dependency management for C++ projects (like build2) and the WebAssembly platform. diff --git a/src/components/blog/_config.yml b/src/components/blog/_config.yml index 7aae38ec6..fabb6ff46 100644 --- a/src/components/blog/_config.yml +++ b/src/components/blog/_config.yml @@ -538,7 +538,7 @@ blog: authors: Mariana Meireles - url: https://blog.jupyter.org/a-visual-debugger-for-jupyter-914e61716559 - title: A Visual Debuger for Jupyter + title: A Visual Debugger for Jupyter image: https://miro.medium.com/max/933/0*9pVDg58cTz5Yezw8.gif summary: Most of the progress made in software projects comes from incrementalism. The ability to quickly see the outcome of an execution and iterate has been one of the main reasons for the success of… date: Mar 25, 2020 diff --git a/src/components/blog/blogpostsDetails.json b/src/components/blog/blogpostsDetails.json index 7fd019665..a69e1989a 100644 --- a/src/components/blog/blogpostsDetails.json +++ b/src/components/blog/blogpostsDetails.json @@ -1015,7 +1015,7 @@ }, { "url": "https://blog.jupyter.org/a-visual-debugger-for-jupyter-914e61716559", - "title": "A Visual Debuger for Jupyter", + "title": "A Visual Debugger for Jupyter", "image": "/img/blogposts/A-Visual-Debuger-for-Jupyter.gif", "summary": "Most of the progress made in software projects comes from incrementalism. The ability to quickly see the outcome of an execution and iterate has been one of the main reasons for the success of…", "date": "Mar 25, 2020", diff --git a/src/components/contact/index.tsx b/src/components/contact/index.tsx index a5d13c041..eb0614f2d 100644 --- a/src/components/contact/index.tsx +++ b/src/components/contact/index.tsx @@ -17,7 +17,7 @@ export function Contact() { diff --git a/src/components/home/WhatWeDo/topics/Computing.md b/src/components/home/WhatWeDo/topics/Computing.md index 8294dffed..265bd725e 100644 --- a/src/components/home/WhatWeDo/topics/Computing.md +++ b/src/components/home/WhatWeDo/topics/Computing.md @@ -1 +1 @@ -We created several popular scientific computing packages. XSimd, an unified API for SIMD opreations, adopted by projects such as Apache Arrox, FireFox, Kytra, Pythran... Xtensor, a C++ n-dimensional array librairy with broadcasting and lazy evaluation. \ No newline at end of file +We created several popular scientific computing packages. XSimd, an unified API for SIMD operations, adopted by projects such as Apache Arrox, FireFox, Kytra, Pythran... Xtensor, a C++ n-dimensional array library with broadcasting and lazy evaluation. \ No newline at end of file From 9f62721398062a9354ed84b79cf5971deaefe4a9 Mon Sep 17 00:00:00 2001 From: "arjxn.py" Date: Sat, 7 Sep 2024 20:19:08 +0530 Subject: [PATCH 06/10] A couple of custom corrections --- .pre-commit-config.yaml | 8 +++++--- static/custom_corrections.txt | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 static/custom_corrections.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 38e942b1d..fa713ed7b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,5 @@ ci: - # pre-commit.ci will open PRs updating our hooks once a month autoupdate_schedule: monthly - # skip any check that needs internet access autofix_prs: true repos: @@ -11,5 +9,9 @@ repos: hooks: - id: codespell name: Spell Check with Codespell - args: ['--write-changes', '--ignore-words-list=cppp,normale'] + args: + - '--write-changes' + - '--ignore-words-list=cppp,normale' + - '--dictionary=static/custom_corrections.txt' + # Exclude package-lock.json and all .svg files exclude: 'package-lock\.json|\.svg$' diff --git a/static/custom_corrections.txt b/static/custom_corrections.txt new file mode 100644 index 000000000..cbc940533 --- /dev/null +++ b/static/custom_corrections.txt @@ -0,0 +1,2 @@ +organisation->organization +colour->color From f781e463f4691fd91a37e4e331a54e03148db3d1 Mon Sep 17 00:00:00 2001 From: "arjxn.py" Date: Mon, 9 Sep 2024 15:29:13 +0530 Subject: [PATCH 07/10] Try to use builtin dictionary --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fa713ed7b..2a91acfb7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,5 +13,6 @@ repos: - '--write-changes' - '--ignore-words-list=cppp,normale' - '--dictionary=static/custom_corrections.txt' + - '--builtin=en-GB_to_en-US' # Exclude package-lock.json and all .svg files exclude: 'package-lock\.json|\.svg$' From 6e0292b3cf298db0eb0621843bb780e07062a539 Mon Sep 17 00:00:00 2001 From: "arjxn.py" Date: Mon, 9 Sep 2024 18:35:46 +0530 Subject: [PATCH 08/10] Run hook with builtin dictionary --- .pre-commit-config.yaml | 1 - src/components/about/Team/Ian.md | 4 ++-- src/components/about/styles.module.css | 2 +- src/components/home/Hero/styles.module.css | 6 +++--- src/components/projects/descriptions/Header.md | 2 +- src/css/custom.css | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2a91acfb7..4596f70e6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,6 @@ repos: args: - '--write-changes' - '--ignore-words-list=cppp,normale' - - '--dictionary=static/custom_corrections.txt' - '--builtin=en-GB_to_en-US' # Exclude package-lock.json and all .svg files exclude: 'package-lock\.json|\.svg$' diff --git a/src/components/about/Team/Ian.md b/src/components/about/Team/Ian.md index 41b80e961..1d69c7ff7 100644 --- a/src/components/about/Team/Ian.md +++ b/src/components/about/Team/Ian.md @@ -1,5 +1,5 @@ Ian Thomas is a Scientific Software Developer at QuantStack. He holds a BA in Physics from Oxford University and PhD in ocean modeling from the University of Southampton. -He has particular interest in data analysis and visualisation, leaning towards solving mathematical and geometric problems. +He has particular interest in data analysis and visualization, leaning towards solving mathematical and geometric problems. -Ian has many years' experience as an open-source contributor. He is a core maintainer of Bokeh, a library for interactive visualisation in web browsers, and the lead maintainer of ContourPy, a Python/C++ library for calculating contours. He has also made significant contributions to Matplotlib and Datashader. +Ian has many years' experience as an open-source contributor. He is a core maintainer of Bokeh, a library for interactive visualization in web browsers, and the lead maintainer of ContourPy, a Python/C++ library for calculating contours. He has also made significant contributions to Matplotlib and Datashader. diff --git a/src/components/about/styles.module.css b/src/components/about/styles.module.css index a69f5addf..5bad741be 100644 --- a/src/components/about/styles.module.css +++ b/src/components/about/styles.module.css @@ -10,7 +10,7 @@ } .small_portrait_card:hover { - border: solid 1px grey; + border: solid 1px gray; cursor: pointer; text-decoration: #0000EE underline; } diff --git a/src/components/home/Hero/styles.module.css b/src/components/home/Hero/styles.module.css index b0f4a97a8..3e8a01372 100644 --- a/src/components/home/Hero/styles.module.css +++ b/src/components/home/Hero/styles.module.css @@ -36,7 +36,7 @@ } .pydata_informations { - color: grey; + color: gray; font-size: 12px; font-weight: 600; position: absolute; @@ -70,7 +70,7 @@ } .pydata_informations { - color: grey; + color: gray; font-size: var(--ifm-font-size-small); font-weight: 600; position: absolute; @@ -132,7 +132,7 @@ } .pydata_informations { - color: grey; + color: gray; font-size: var(--ifm-font-size-medium); font-weight: 600; position: absolute; diff --git a/src/components/projects/descriptions/Header.md b/src/components/projects/descriptions/Header.md index 4a3a9b0b0..1c87c9b4f 100644 --- a/src/components/projects/descriptions/Header.md +++ b/src/components/projects/descriptions/Header.md @@ -5,5 +5,5 @@ from data sciences to robotics. Open-source development is a unique way to break down collaboration barriers and reach users with -unexpected use cases. Enabling customisation and extensions of the +unexpected use cases. Enabling customization and extensions of the tools enables this diversity of applications. diff --git a/src/css/custom.css b/src/css/custom.css index 5eeaa778b..193974f2e 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -30,7 +30,7 @@ --ifm-text-color-footer: black; /*popup overlay*/ - --ifm-background-color-popup-overlay: grey; + --ifm-background-color-popup-overlay: gray; /* Font sizes */ --ifm-font-size-small: 14px; From 7ea99bdab25a9aacb127433528fe84b0f518c6e9 Mon Sep 17 00:00:00 2001 From: "arjxn.py" Date: Mon, 9 Sep 2024 18:36:23 +0530 Subject: [PATCH 09/10] Delete custom dict --- static/custom_corrections.txt | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 static/custom_corrections.txt diff --git a/static/custom_corrections.txt b/static/custom_corrections.txt deleted file mode 100644 index cbc940533..000000000 --- a/static/custom_corrections.txt +++ /dev/null @@ -1,2 +0,0 @@ -organisation->organization -colour->color From 7a89c300cd02728f54dbc47cd8de40f2d4954026 Mon Sep 17 00:00:00 2001 From: "arjxn.py" Date: Wed, 11 Sep 2024 19:02:24 +0530 Subject: [PATCH 10/10] Add a note in README to run pre-commit hooks locally --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 0c6c2c27b..71a13ce02 100644 --- a/README.md +++ b/README.md @@ -39,3 +39,29 @@ $ GIT_USER= yarn deploy ``` If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. + +### Pre-commit Hook Setup + +To ensure code quality and consistency, we use `pre-commit` hooks. Here's how to set up and run the pre-commit hook locally: + +1. **Install pre-commit:** + + If `pre-commit` isn't already installed, you can install it using `pip`: + + ```bash + $ pip install pre-commit + ``` +2. **Install the pre-commit hooks:** + + Once `pre-commit` is installed, set up the hooks for the repository by running: + + ```bash + $ pre-commit install + ``` +3. **Run pre-commit hooks manually:** + + To run the `pre-commit` hooks on all files manually, use: + + ```bash + $ pre-commit run --all-files + ```