refactor: move docs/requirements.txt into pyproject.toml [docs] extra…#191
refactor: move docs/requirements.txt into pyproject.toml [docs] extra…#191jonathanhhb wants to merge 3 commits into
Conversation
…#180) Brings laser-generic in line with peer projects (laser-core, laser-measles), which already expose docs deps as a [project.optional-dependencies] extra. Changes: - pyproject.toml: add `docs` extra containing the 14 mkdocs-ecosystem packages from the old requirements.txt, plus `matplotlib` (needed for notebook execution during docs build; not otherwise a runtime dep). Runtime deps (numpy, scipy, pandas, laser-core) are not duplicated because they're already in the main `dependencies` list. - Three workflows (mkdocs-ghp.yml, mkdocs-pr.yml, release-publish.yml): replace the three-line `pip install -e .` + `pip install mkdocs ...` + `pip install -r docs/requirements.txt` block with a single `pip install --index-url <IDM Artifactory> -e ".[docs]"`. The IDM index URL is preserved from the requirements.txt header (--index-url, not --extra-index-url, since the original file made IDM the sole source). - docs/requirements.txt: deleted. CHANGELOG.md still mentions docs/requirements.txt in a historical entry; that's intentional — historical changelog entries stay accurate to what shipped at the time. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Note on the workflow filename: On origin/main, the PR-build workflow is mkdocs-pr.yml. The mkdocs-pr-notebooks.yml version (path-gated with notebook execution) only exists on your ci/pr-notebook-execution branch and isn't yet on main. So this refactor PR updates mkdocs-pr.yml. When you merge ci/pr-notebook-execution, that PR's workflow rename will need to either come after this refactor (and pick up [docs]) or be reconciled at merge time. Worth flagging in the PR description so the order-of-operations is clear. |
There was a problem hiding this comment.
Pull request overview
Refactors documentation dependency management by moving docs/requirements.txt into a docs optional-dependency extra in pyproject.toml, and updates CI workflows to install docs dependencies via pip install -e ".[docs]".
Changes:
- Added a
docsextra under[project.optional-dependencies]containing the MkDocs ecosystem dependencies (plusmatplotlib). - Updated MkDocs build/deploy workflows to install with
-e ".[docs]"instead of installing fromdocs/requirements.txt. - Removed
docs/requirements.txt.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Adds docs optional-dependency extra for documentation build dependencies. |
.github/workflows/release-publish.yml |
Switches docs install step to use -e ".[docs]" from the IDM index. |
.github/workflows/mkdocs-pr.yml |
Switches docs install step to use -e ".[docs]" (but currently contains a YAML indentation bug). |
.github/workflows/mkdocs-ghp.yml |
Switches docs install step to use -e ".[docs]" from the IDM index. |
docs/requirements.txt |
Deleted; docs deps are now sourced from pyproject.toml. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…180) The tox docs env still referenced the deleted docs/requirements.txt, which broke the GitHub Actions tox -e docs job: docs: failed with Could not open requirements file /home/runner/work/laser-generic/laser-generic/docs/requirements.txt Replace `deps = -r{toxinidir}/docs/requirements.txt` with `extras = docs` so tox installs the project with the new [docs] extra declared in pyproject.toml. Add `setenv = PIP_INDEX_URL=...` to preserve the IDM Artifactory index that was previously declared at the top of requirements.txt — necessary so PIP_INDEX_URL flows through even though tox 4's per-env passenv doesn't always inherit. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
… (#180)
Brings laser-generic in line with peer projects (laser-core, laser-measles), which already expose docs deps as a [project.optional-dependencies] extra.
Changes:
docsextra containing the 14 mkdocs-ecosystem packages from the old requirements.txt, plusmatplotlib(needed for notebook execution during docs build; not otherwise a runtime dep). Runtime deps (numpy, scipy, pandas, laser-core) are not duplicated because they're already in the maindependencieslist.pip install -e .+pip install mkdocs ...pip install -r docs/requirements.txtblock with a singlepip install --index-url <IDM Artifactory> -e ".[docs]". The IDM index URL is preserved from the requirements.txt header (--index-url, not --extra-index-url, since the original file made IDM the sole source).CHANGELOG.md still mentions docs/requirements.txt in a historical entry; that's intentional — historical changelog entries stay accurate to what shipped at the time.