cli¶
CLI application definition for junix.
Build
¶
Bases: Application
Build flake attributes and produce JUnit XML.
Source code in src/junix/cli.py
Check
¶
Bases: Application
Evaluate and build all checks of a flake.
Source code in src/junix/cli.py
Junix
¶
Bases: Application
Turn Nix build logs into JUnit XML reports for your CI.
Source code in src/junix/cli.py
Translate
¶
Bases: Application
Read @nix JSON lines from stdin and produce JUnit XML.
Source code in src/junix/cli.py
_plumbum_async_main(main_method)
¶
Wrap an async main() so plumbum can call it synchronously.
Plumbum 2's Application.run calls inst.main() synchronously. This decorator bridges that gap by running the coroutine inside asyncio.run().
Important: does not use functools.wraps because plumbum 2 introspects self.main with inspect.getfullargspec() and get_type_hints(). wraps would copy the original's annotations but the wrapper has args, *kwargs, causing a mismatch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
main_method
|
Callable[..., Awaitable[int]]
|
The async main() coroutine function to wrap. |
required |
Returns:
| Type | Description |
|---|---|
Callable[..., int]
|
A sync wrapper function that runs the coroutine via asyncio.run(). |