Skip to content

Add uv-managed pyproject.toml + consolidate CI into ci.yml #287

Description

@coretl

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

  • Branch off docs
  • Add pyproject.toml + uv.lock (uv-managed; decide pandai2c handling)
  • Add make lint target (uv run ruff check)
  • Add _lint.yml; fold code.yml + tests.yml into ci.yml
  • Confirm .gitlab-ci.yml left as-is
  • Verify CI green; PR back into docs

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructureDocs build/deploy infrastructuretoolingDocs tooling / autogeneration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions