fix: Improve build tooling configuration#45
Conversation
- Add asdf reshim to setup script for Python compatibility - Exclude .venv directory from markdown linting in build and serve - Pin mkdocs version to ~= 1.6 - Remove trailing blank line from requirements.txt
There was a problem hiding this comment.
Pull request overview
This PR refines local build/lint setup for the MkDocs documentation site by tightening dependency reproducibility and adjusting developer tooling scripts.
Changes:
- Pin
mkdocsto~= 1.6inrequirements.txt. - Update
setupto optionally runasdf reshim pythonafter installing Python dependencies. - Exclude
.venvfrom markdownlint runs invoked bybuild/serve.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
requirements.txt |
Pins MkDocs to the 1.6.x line to reduce build variability. |
package.json |
Enhances setup for asdf users and adjusts markdownlint globs for build/serve. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| "scripts": { | ||
| "setup": "npm install && pip3 install -r requirements.txt", | ||
| "setup": "npm install && pip3 install -r requirements.txt && (command -v asdf >/dev/null && asdf reshim python || true)", |
There was a problem hiding this comment.
The setup script currently swallows any failure from asdf reshim python (because of ... || true). If asdf is installed but the reshim fails, the script still exits successfully and CLI tools like mkdocs may still not be on PATH for asdf users. Consider using an explicit conditional (run asdf reshim python only when asdf exists) while letting real reshim failures surface.
| "setup": "npm install && pip3 install -r requirements.txt && (command -v asdf >/dev/null && asdf reshim python || true)", | |
| "setup": "npm install && pip3 install -r requirements.txt && (if command -v asdf >/dev/null; then asdf reshim python; fi)", |
| "scripts": { | ||
| "setup": "npm install && pip3 install -r requirements.txt", | ||
| "setup": "npm install && pip3 install -r requirements.txt && (command -v asdf >/dev/null && asdf reshim python || true)", | ||
| "lint": "markdownlint-cli2 '**/*.md' '!node_modules'", |
There was a problem hiding this comment.
The .venv exclusion was added to build/serve, but npm run lint still runs markdownlint-cli2 without excluding .venv. If the goal is to avoid linting vendored dependencies consistently, lint should use the same ignore patterns as build/serve (or centralize the glob list to keep them in sync).
| "lint": "markdownlint-cli2 '**/*.md' '!node_modules'", | |
| "lint": "markdownlint-cli2 '**/*.md' '!node_modules' '!.venv'", |
Summary
Improvements to the build tooling and dependency configuration.
Changes
package.jsonasdf reshim pythonafter pip install so that newly installed CLI tools (likemkdocs) are available on the PATH when using asdf.venvdirectory from markdown linting to avoid linting vendored dependenciesrequirements.txtmkdocsversion to~= 1.6for reproducible builds