test_contributed_discovery

A contributing package’s tiles compose without anyone naming them.

Two things had to be true for contribution to work and neither was:

  • the tiles must ARRIVE. base.yaml selects one option from the group dau-core, so a package shipping dau-core/<theirs>.yaml adds an option that is never composed — no error, no warning. Hydra refuses the additive form for a single-select group, and override would replace our palette with theirs.

  • the tiles must be FOUND once composed, which is dau_core.registry’s half (see test_contributed_cores.py).

This covers the first. Contributions live in their own group, and its options are selected together AS A LIST — the form that admits more than one. A bare +group=option selects exactly one, so two installed vendors would silently mean one vendor, which is the same class of failure as vanishing entirely.

Attributes

_TILE

Functions

contrib_dir(tmp_path)

A searchpath directory holding contributed tile options.

test_options_are_discovered_not_named(contrib_dir) → None

test_no_contributions_installed_is_silent(tmp_path) → None

The common case must cost nothing and say nothing.

test_every_contributor_composes_not_just_the_first(...) → None

The list form is the whole point: selecting one option per group would

test_our_own_palette_survives_contribution(contrib_dir) → None

test_an_explicit_selection_is_not_overridden(contrib_dir) → None

A caller who named the contributions it wants means it.

test_contributed_tiles_reach_the_registry(contrib_dir) → None

The two halves together: composed AND findable, with the seam intact.

test_discovery_inside_an_existing_initialization_leaves_it_standing(...) → None

The regression that broke two downstream suites.

test_discovery_never_registers_anything(contrib_dir) → None

Initializing hydra runs the searchpath plugin, which LOADS provider

test_an_unreadable_searchpath_does_not_take_down_composition(...) → None

Discovery is best-effort. A directory hydra cannot read must cost the

Module Contents

test_contributed_discovery._TILE = Multiline-String
Show Value
"""{name}:
  _target_: dau_core.cores.CoreDefinition
  name: {name}
  kind: operator
  module: {module}
  source: {module}.sv
  source_package: {package}.hdl
  description: a contributed tile
  contract_kind: row-stream
  record_words: 1
  ingest:
    _target_: dau_core.cores.IngestRate
    rows: 1
    per_cycles: 1
"""
test_contributed_discovery.contrib_dir(tmp_path)

A searchpath directory holding contributed tile options.

test_contributed_discovery.test_options_are_discovered_not_named(contrib_dir) → None
test_contributed_discovery.test_no_contributions_installed_is_silent(tmp_path) → None

The common case must cost nothing and say nothing.

test_contributed_discovery.test_every_contributor_composes_not_just_the_first(contrib_dir) → None

The list form is the whole point: selecting one option per group would make a second installed vendor silently disappear.

test_contributed_discovery.test_our_own_palette_survives_contribution(contrib_dir) → None
test_contributed_discovery.test_an_explicit_selection_is_not_overridden(contrib_dir) → None

A caller who named the contributions it wants means it.

test_contributed_discovery.test_contributed_tiles_reach_the_registry(contrib_dir) → None

The two halves together: composed AND findable, with the seam intact.

test_contributed_discovery.test_discovery_inside_an_existing_initialization_leaves_it_standing(contrib_dir) → None

The regression that broke two downstream suites.

Hydra’s global state is process-wide. A first version of discovery initialized its own instance and cleared it in a finally, which tore down whatever the CALLER was inside – dau-sim and dau-polars then asserted is_initialized() against nothing. Discovery must reuse an initialization it did not create, and must leave it exactly as found.

test_contributed_discovery.test_discovery_never_registers_anything(contrib_dir) → None

Initializing hydra runs the searchpath plugin, which LOADS provider configs into the root registry. Asking what is installed must not change what is installed, or the composition that follows fails adding dau-core a second time.

test_contributed_discovery.test_an_unreadable_searchpath_does_not_take_down_composition(tmp_path) → None

Discovery is best-effort. A directory hydra cannot read must cost the contributions, not the compose that would otherwise have worked.