Skip to content

Commit 1950d17

Browse files
committed
Enhance project configuration: add Sourcery pre-commit hook, update README for virtual environment setup, and improve dark/light mode palette in mkdocs.yml
1 parent 94b82ff commit 1950d17

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,4 +290,4 @@ tests/files/.mkdoxy
290290
temp/
291291
local/
292292

293-
.idea/
293+
.idea/

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
---
22
repos:
3+
- repo: https://github.com/sourcery-ai/sourcery
4+
rev: v1.19.0
5+
hooks:
6+
- id: sourcery
7+
# The best way to use Sourcery in a pre-commit hook:
8+
# * review only changed lines:
9+
# * omit the summary
10+
args: [--diff=git diff HEAD, --no-summary]
311
- repo: https://github.com/pre-commit/pre-commit-hooks
412
rev: v4.5.0
513
hooks:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ pip install mkdoxy
4141
```
4242
Development version with all dependencies:
4343
```bash
44+
python -m venv .venv
4445
python -m pip install mkdoxy ".[dev]"
4546
```
4647

mkdocs.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,23 @@ theme:
2525
repo: fontawesome/brands/github
2626

2727
palette:
28-
- scheme: slate
28+
# Palette toggle for dark mode
29+
- media: "(prefers-color-scheme: dark)"
30+
scheme: slate
2931
primary: orange
3032
accent: orange
33+
toggle:
34+
icon: material/brightness-4
35+
name: Switch to light mode
36+
37+
# Palette toggle for light mode
38+
- media: "(prefers-color-scheme: light)"
39+
scheme: default
40+
primary: orange
41+
accent: orange
42+
toggle:
43+
icon: material/brightness-7
44+
name: Switch to dark mode
3145

3246
extra:
3347
social:

0 commit comments

Comments
 (0)