Goal
Add a minimal pyproject.toml to track the repo's Python dependencies under uv, and consolidate the GitHub Actions CI into a single ci.yml. Work happens on a branch off docs and merges back into docs.
The FPGA repo has the real Python test harness (cocotb-based), so this is the heaviest of the three.
pyproject.toml (tooling + deps, no packaging)
[project] with name, requires-python = ">=3.11", and runtime dependencies. Detected third-party imports: cocotb, cocotb_tools, jinja2, matplotlib, numpy, pandas, pytest (plus the in-tree pandai2c package — decide whether to declare it as a path dep or leave in-tree).
[dependency-groups].dev = pytest, ruff, pre-commit.
[tool.ruff] and [tool.pytest.ini_options] config blocks.
- Managed by uv; commit
uv.lock.
- Explicitly NOT doing: no
[build-system]/packaging, no setuptools_scm, no src/ layout, no project.scripts, no pyright/type-checking, no tox. Diverges from python-copier-template-example on these points by design.
CI consolidation
- Fold
code.yml (Code CI) and tests.yml (Tests CI) into the single existing ci.yml, as jobs calling the reusable _*.yml workflows (_make_boot, _make_packages, _cocotb_test, _test_hdl, _test_matrix, _test_python_autogen, _release, etc.). Docs (_docs.yml/_publish.yml) stays as-is.
make stays the runner for docs / tests / synthesis — CI just orchestrates.
- Add a ruff lint job only, driven through a new
make lint target (uv run ruff check) and a reusable _lint.yml.
- Leave
.gitlab-ci.yml untouched — the heavy FPGA synthesis runs on Diamond's GitLab runners (Vivado licenses, /dls_sw) and cannot move to GitHub Actions.
Docs
- Keep
npx for mystmd (pinned via MYSTMD_VERSION in CONFIG). The PyPI mystmd package still downloads the Node app + book-theme at runtime, so pip-via-uv would not remove the Node dependency — it only adds a second version pin. mystmd stays out of pyproject.toml.
Checklist
Goal
Add a minimal
pyproject.tomlto track the repo's Python dependencies under uv, and consolidate the GitHub Actions CI into a singleci.yml. Work happens on a branch offdocsand merges back intodocs.The FPGA repo has the real Python test harness (cocotb-based), so this is the heaviest of the three.
pyproject.toml (tooling + deps, no packaging)
[project]withname,requires-python = ">=3.11", and runtimedependencies. Detected third-party imports:cocotb,cocotb_tools,jinja2,matplotlib,numpy,pandas,pytest(plus the in-treepandai2cpackage — decide whether to declare it as a path dep or leave in-tree).[dependency-groups].dev=pytest,ruff,pre-commit.[tool.ruff]and[tool.pytest.ini_options]config blocks.uv.lock.[build-system]/packaging, nosetuptools_scm, nosrc/layout, noproject.scripts, no pyright/type-checking, no tox. Diverges frompython-copier-template-exampleon these points by design.CI consolidation
code.yml(Code CI) andtests.yml(Tests CI) into the single existingci.yml, as jobs calling the reusable_*.ymlworkflows (_make_boot,_make_packages,_cocotb_test,_test_hdl,_test_matrix,_test_python_autogen,_release, etc.). Docs (_docs.yml/_publish.yml) stays as-is.makestays the runner for docs / tests / synthesis — CI just orchestrates.make linttarget (uv run ruff check) and a reusable_lint.yml..gitlab-ci.ymluntouched — the heavy FPGA synthesis runs on Diamond's GitLab runners (Vivado licenses,/dls_sw) and cannot move to GitHub Actions.Docs
npxfor mystmd (pinned viaMYSTMD_VERSIONinCONFIG). The PyPImystmdpackage still downloads the Node app + book-theme at runtime, so pip-via-uv would not remove the Node dependency — it only adds a second version pin. mystmd stays out ofpyproject.toml.Checklist
docspyproject.toml+uv.lock(uv-managed; decidepandai2chandling)make linttarget (uv run ruff check)_lint.yml; foldcode.yml+tests.ymlintoci.yml.gitlab-ci.ymlleft as-isdocs