Remove requirements files and update CI workflow#14
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes generated/pinned requirements files and updates the docs CI workflow to build/deploy documentation via Hatch instead of installing from requirements/requirements-docs.txt.
Changes:
- Delete the autogenerated
requirements/requirements-style.txtandrequirements/requirements-docs.txtfiles. - Update
pyproject.tomlto removehatch-pip-compileusage and droppip-compileenv types. - Update
.github/workflows/docs.ymlto run docs build/deploy viahatch runinstead of directmkdocscommands.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| requirements/requirements-style.txt | Removed pinned style tool dependency lockfile. |
| requirements/requirements-docs.txt | Removed pinned docs dependency lockfile. |
| pyproject.toml | Removes hatch-pip-compile requirement and pip-compile env types for style/docs. |
| .github/workflows/docs.yml | Switch docs CI to install Hatch and run hatch run docs:build/deploy. |
Comments suppressed due to low confidence (1)
pyproject.toml:177
stylepreviously usedtype = "pip-compile"with a generated requirements file that pinned formatter/linter versions. After removing the pip-compile env type,black/isort/ruffare now unpinned, which can change CI behavior over time and potentially diverge from the pinned tool versions in.pre-commit-config.yaml. Consider pinning these tool versions in the Hatchstyleenv dependencies (or otherwise ensuring CI and pre-commit use the same versions).
[tool.hatch.envs.style]
detached = true
dependencies = [
"black",
"isort",
"ruff",
]
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: pip install hatch | ||
| - name: Build site | ||
| run: mkdocs build --strict | ||
| run: hatch run docs:build |
There was a problem hiding this comment.
By switching the docs job from a fully pinned requirements-docs.txt install to hatch run docs:build, the versions of the docs build toolchain become implicit and may drift over time, which can make scheduled builds/deploys flaky. If reproducible docs builds are desired, consider introducing a lock/pin mechanism for the docs environment (e.g., pin key docs plugins in Hatch env deps, or adopt a lock file approach) to replace the removed requirements file.
Agent-Logs-Url: https://github.com/mkdocs-ng/mkdocs/sessions/4406160a-20af-46e1-a2bb-3277bf302bea Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com>
Agent-Logs-Url: https://github.com/mkdocs-ng/mkdocs/sessions/4406160a-20af-46e1-a2bb-3277bf302bea Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com>
Agent-Logs-Url: https://github.com/mkdocs-ng/mkdocs/sessions/4406160a-20af-46e1-a2bb-3277bf302bea Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com>
Related Issue
Closes #
Type of Change
Checklist
hatch run test:test)CHANGELOG/ release notes updated (if applicable)