Skip to content

feat: add module support to JustfileFixture#5

Open
bluefing wants to merge 1 commit intoDataBooth:mainfrom
bluefing:feat/module-support
Open

feat: add module support to JustfileFixture#5
bluefing wants to merge 1 commit intoDataBooth:mainfrom
bluefing:feat/module-support

Conversation

@bluefing
Copy link
Copy Markdown

@bluefing bluefing commented Apr 8, 2026

Adds module-aware recipe resolution to JustfileFixture. Recipes from nested modules are flattened by namepath (e.g. infra::deploy::up), so all existing methods work transparently with full module paths.

Closes #1

Changes

  • _flattened — cached single-pass walk of the dump, returning both recipes and modules
  • _recipes — now returns the flattened dict keyed by namepath (was root-only)
  • _flatten — static recursive walk of the module tree
  • all_modules — property returning discovered module paths
  • Backwards compatible — justfiles without modules work unchanged

Tests

9 tests covering: namepath flattening, privacy across modules, dependencies, parameters, unknown namepath errors, module discovery, private recipe filtering, and standalone _flatten usage.

@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com bot commented Apr 8, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  src/pytest_just/fixture.py  8% smaller
  tests/test_module_fixture.py  0% smaller

@bluefing bluefing force-pushed the feat/module-support branch from 944eeeb to 0e816cb Compare April 8, 2026 12:19
Flattens the nested module tree from just --dump into a flat dict keyed
by recipe namepaths (e.g. module::submodule::recipe). All existing
methods (is_private, dependencies, parameters, etc.) work transparently
with full module paths. Adds all_modules property for module discovery.

Backwards compatible — justfiles without modules work unchanged.
@bluefing bluefing force-pushed the feat/module-support branch from 0e816cb to 46a61b3 Compare April 8, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Module support

1 participant