v0.30.0b1
Pre-releaseSee 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-documentsalso gained a--parserflag
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 reportcommand renders a template by name
(or lists the available templates with--list). - The new
[reports]configuration section sets the templatesdirectory
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 quickstartnow scaffolds a runnable starter template
demonstrating grouped tables and an inline SVG chart.
See the reports documentation for more details.
- The new
-
Query needs from the command line
The new
ubc query filtercommand 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 likejq:$ ubc query filter 'type == "req" and status == "open"' --field id --field titleThe project is automatically (and incrementally) re-indexed before querying,
so results are always up to date;
use--no-cacheto bypass the on-disk cache entirely. -
Variant data for build-variant-aware projects
Filter expressions can now reference external build-variant data
via the newneeds.variant_data/needs.variant_data_fileconfiguration
and thevar.*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).
Theifdirective
is not yet handled, but support is hoped to land soon.Relatedly,
ubc diffgained a--configoption
for comparing a project against itself under a configuration override,
e.g.ubc diff -c "needs.variant_data_file = 'variants2.json'". -
Native Rust
ubcCLIThe standalone
ubcbinary 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.