Skip to content

Commit 4c20b2f

Browse files
committed
chore: a few more updates
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 67bf6c3 commit 4c20b2f

File tree

4 files changed

+24
-19
lines changed

4 files changed

+24
-19
lines changed

notebooks/3.2 NumPy.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@
691691
"name": "python",
692692
"nbconvert_exporter": "python",
693693
"pygments_lexer": "ipython3",
694-
"version": "3.12.11"
694+
"version": "3.14.3"
695695
}
696696
},
697697
"nbformat": 4,

notebooks/3.4 Numba.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@
467467
"name": "python",
468468
"nbconvert_exporter": "python",
469469
"pygments_lexer": "ipython3",
470-
"version": "3.12.11"
470+
"version": "3.14.3"
471471
}
472472
},
473473
"nbformat": 4,

notebooks/3.5 pybind11.ipynb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@
4646
"---\n",
4747
"\n",
4848
"```cmake\n",
49-
"cmake_minimium_required(VERSION 3.15...3.26)\n",
49+
"cmake_minimium_required(VERSION 3.15...4.2)\n",
5050
"project(python_example LANGUAGES CXX)\n",
5151
"\n",
52-
"set(PYBIND11_FINDPYTHON ON)\n",
5352
"find_package(pybind11 CONFIG REQUIRED)\n",
5453
"\n",
5554
"pybind11_add_module(python_example MODULE src/main.cpp)\n",
@@ -71,13 +70,13 @@
7170
"\n",
7271
"```toml\n",
7372
"[build-system]\n",
74-
"requires = [\"scikit-build-core\", \"pybind11\"]\n",
73+
"requires = [\"scikit-build-core\", \"pybind11>=3\"]\n",
7574
"build-backend = \"scikit_build_core.build\"\n",
7675
"\n",
7776
"[project]\n",
7877
"name = \"example\"\n",
7978
"version = \"0.0.1\"\n",
80-
"requires-python = \">=3.8\"\n",
79+
"requires-python = \">=3.10\"\n",
8180
"```\n",
8281
"---"
8382
]
@@ -101,11 +100,11 @@
101100
" runs-on: ${{ matrix.os }}\n",
102101
"\n",
103102
" steps:\n",
104-
" - uses: actions/checkout@v3\n",
103+
" - uses: actions/checkout@v6\n",
105104
" \n",
106-
" - uses: pypa/cibuildwheel@v2.14\n",
105+
" - uses: pypa/cibuildwheel@v3.3\n",
107106
"\n",
108-
" - uses: actions/upload-artifact@v3\n",
107+
" - uses: actions/upload-artifact@v6\n",
109108
" with:\n",
110109
" path: ./wheelhouse/*.whl\n",
111110
"```\n",
@@ -167,7 +166,7 @@
167166
"name": "python",
168167
"nbconvert_exporter": "python",
169168
"pygments_lexer": "ipython3",
170-
"version": "3.12.11"
169+
"version": "3.14.3"
171170
}
172171
},
173172
"nbformat": 4,

notebooks/3.6 Code Quality and CI.ipynb

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
"cell_type": "markdown",
3232
"metadata": {},
3333
"source": [
34-
"One of my favorite tools is [pre-commit](https://pre-commit.com). It allows you to drive almost any \"fixer\" or \"linter\" available, all from one place. It handles environments and caching and even updates for you.\n",
34+
"One of my favorite tools is [pre-commit](https://pre-commit.com) / [prek](https://prek.j178.dev) (faster). It allows you to drive almost any \"fixer\" or \"linter\" available, all from one place. It handles environments and caching and even updates for you.\n",
3535
"\n",
3636
"To configure, add a `.pre-commit-config.yaml` file like this:\n",
3737
"\n",
3838
"```yaml\n",
3939
"repos:\n",
4040
"# Some \"common\" checks useful for almost any repo\n",
4141
"- repo: https://github.com/pre-commit/pre-commit-hooks\n",
42-
" rev: v4.4.0\n",
42+
" rev: \"v6.0.0\"\n",
4343
" hooks:\n",
4444
" - id: check-added-large-files\n",
4545
" - id: check-case-conflict\n",
@@ -53,10 +53,10 @@
5353
" - id: trailing-whitespace\n",
5454
"\n",
5555
"# Automatically format Python code\n",
56-
"- repo: https://github.com/psf/black\n",
57-
" rev: \"23.7.0\"\n",
56+
"- repo: https://github.com/astral-sh/ruff-pre-commit\n",
57+
" rev: \"v0.14.11\"\n",
5858
" hooks:\n",
59-
" - id: black\n",
59+
" - id: ruff-format\n",
6060
"```\n",
6161
"\n",
6262
"The file has a list of repos (local checks can be written too). Each repo contains pre-commit hooks that you can run and configure. You should put modifying \"fixer\" checks before the \"linter\" checks, just in case they fix something that then gets linted."
@@ -66,26 +66,32 @@
6666
"cell_type": "markdown",
6767
"metadata": {},
6868
"source": [
69-
"You can install pre-commit from `brew` (macOS), or via `pipx`/`pip` for anything with Python.\n",
69+
"You can install pre-commit or prek from `brew` (macOS), or via `uv`/`pipx`/`pip` for anything with Python.\n",
7070
"\n",
7171
"You can then run it like this:\n",
7272
"\n",
7373
"```bash\n",
74+
"# Pick one\n",
7475
"pre-commit run -a\n",
76+
"prek -a\n",
7577
"```\n",
7678
"\n",
7779
"That will check everything. You don't need to know anything about how to run the checkers or linters, it's a single standard interface for all projects. Each hook gets a unique, cached environment, so the next time you run it, it's lightning fast. If you leave off the `-a`, it _only checks the changed files in your staging area, even partially staged ones!_.\n",
7880
"\n",
7981
"If you want to update to the latest versions of all your hooks, run:\n",
8082
"\n",
8183
"```bash\n",
84+
"# Pick one\n",
8285
"pre-commit autoupdate\n",
86+
"prek auto-update\n",
8387
"```\n",
8488
"\n",
8589
"If you want to use it in the namesake \"pre-commit\" mode, then run:\n",
8690
"\n",
8791
"```bash\n",
92+
"# Pick one\n",
8893
"pre-commit install\n",
94+
"prek install\n",
8995
"```\n",
9096
"\n",
9197
"Now it runs before every commit, and you'll never check in \"bad\" code again! Use `-n` to skip the pre-commit check when committing for emergencies.\n",
@@ -126,14 +132,14 @@
126132
" runs-on: [ubuntu-latest, macos-latest, windows-latest]\n",
127133
"\n",
128134
" steps:\n",
129-
" - uses: actions/checkout@v3\n",
135+
" - uses: actions/checkout@v6\n",
130136
" \n",
131-
" - name: actions/setup-python@v4\n",
137+
" - name: actions/setup-python@v6\n",
132138
" with:\n",
133139
" python-version: ${{ matrix.python-version }}\n",
134140
" \n",
135141
" - name: Install with dev requirements\n",
136-
" run: pip install -e .[dev]\n",
142+
" run: pip install -e . --group=dev\n",
137143
"\n",
138144
" - name: Test with pytest\n",
139145
" run: pytest\n",

0 commit comments

Comments
 (0)