Skip to content

v0.30.0b1

Pre-release
Pre-release

Choose a tag to compare

@chrisjsewell chrisjsewell released this 12 Jun 15:08
35a9cf2

See https://ubcode.useblocks.com/development/changelog.html#release-0-30-0b1

✨ New Features

  • Markdown (MyST) authoring support

    Projects can now define needs in Markdown (MyST) files alongside reStructuredText.
    The new [parse.parsers.<name>] configuration tables declare the parsers a project uses,
    select the files each parser owns, and route every discovered file to the right one:

    [parse.parsers.rst]
    
    [parse.parsers.md]
    flavour = "myst"
    include = ["docs/**/*.md"]

    Need directives in Markdown files are indexed, validated, and queryable
    just like their reStructuredText counterparts.
    Projects that declare no parsers keep the existing behaviour:
    every file discovered via [source] is parsed as reStructuredText.
    See the parsers and file routing documentation for details.

    ubc build list-documents also gained a --parser flag
    that shows which parser each source document is routed to.

    Note that language-server features for Markdown files in the VS Code extension
    (such as in-editor diagnostics, as already available for reStructuredText)
    are not yet supported, but are planned for a future release.

  • HTML report templates

    ubCode can now render user-authored Jinja templates (*.html.j2)
    against the project's needs index,
    producing a single self-contained HTML file:

    • The new ubc report command renders a template by name
      (or lists the available templates with --list).
    • The new [reports] configuration section sets the templates directory
      and an output size limit.
    • In VS Code, a new Reports view in the ubCode sidebar
      lists the project's templates,
      with in-editor preview and Open in Browser actions;
      render failures are reported in the Problems panel.
    • ubc quickstart now scaffolds a runnable starter template
      demonstrating grouped tables and an inline SVG chart.
    report-preview

    See the reports documentation for more details.

  • Query needs from the command line

    The new ubc query filter command filters the needs of a project
    using Python-style filter expressions,
    printing the results as a human-readable table
    or as JSON (--format json) that pipes cleanly to tools like jq:

    $ ubc query filter 'type == "req" and status == "open"' --field id --field title

    The project is automatically (and incrementally) re-indexed before querying,
    so results are always up to date;
    use --no-cache to bypass the on-disk cache entirely.

  • Variant data for build-variant-aware projects

    Filter expressions can now reference external build-variant data
    via the new needs.variant_data / needs.variant_data_file configuration
    and the var.* namespace,
    e.g. var.platform == "windows" or "arm" in var.archs.
    Need field and link values can also pull values directly from the variant data
    using the new <{ var.* }> reference syntax:

    .. req:: Example
       :id: REQ_001
       :platform: <{ var.platform }>

    See the variant builds
    and variant data documentation for more details.

    These features mirror the upcoming additions to
    sphinx-needs
    (currently on its master branch, to be released soon).
    The if directive
    is not yet handled, but support is hoped to land soon.

    Relatedly, ubc diff gained a --config option
    for comparing a project against itself under a configuration override,
    e.g. ubc diff -c "needs.variant_data_file = 'variants2.json'".

  • Native Rust ubc CLI

    The standalone ubc binary is now the native Rust implementation of the CLI,
    replacing the previous Python-based bundle,
    with faster startup and indexing.
    The command surface, output, and exit codes match the Python implementation.