Repository navigation
Add a justfile for build & test automation
#33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
07927fe
First pass at adding a Justfile
dagardner-nv b1935f1
Update github CI workflows to use Just
dagardner-nv d25b167
Update documentation to use just
dagardner-nv d140bc1
Expose no_uv on the recipe level
dagardner-nv ba53f9c
Track fern dependency with npm
dagardner-nv 40ecf6a
Set -euo pipefail to ensure failed bash commands don't silently fail
dagardner-nv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| set shell := ["bash", "-eu", "-o", "pipefail", "-c"] | ||
|
|
||
| export REPO_ROOT := justfile_directory() | ||
|
|
||
| # Skip dependency synchronization when the project environment is already fully synced. | ||
| no_uv := "false" | ||
|
dagardner-nv marked this conversation as resolved.
Resolved
|
||
|
|
||
| # Remove local Rust and Python build and test artifacts. | ||
| clean: | ||
| #!/usr/bin/env bash | ||
| shopt -s globstar nullglob | ||
| cargo clean | ||
| rm -rf \ | ||
| .coverage \ | ||
| .pytest_cache \ | ||
| python/.pytest_cache \ | ||
| **/__pycache__ \ | ||
| **/*.egg-info \ | ||
| **/*.so \ | ||
| **/coverage.xml \ | ||
| **/dist \ | ||
| target/ | ||
|
|
||
| # Build the Rust workspace using the locked dependency set. | ||
| build-rust: | ||
| cargo build --workspace --locked | ||
| cargo install --path crates/fabric-cli --locked --force | ||
|
|
||
| # Build and install the Python package and native extension in the project environment. | ||
| build-python: | ||
| #!/usr/bin/env bash | ||
| if [[ "{{ no_uv }}" == "true" ]]; then | ||
| uv pip install --python .venv/bin/python --no-deps --reinstall --editable . | ||
| else | ||
| uv sync --no-default-groups --reinstall-package nemo-fabric | ||
| fi | ||
|
|
||
| # Build all supported language packages. | ||
| build-all: build-rust build-python | ||
|
|
||
| # Generate the Python and Rust API references and validate the Fern configuration. | ||
| docs: | ||
| #!/usr/bin/env bash | ||
| if [[ "{{ no_uv }}" != "true" ]]; then | ||
| uv sync --extra docs | ||
| fi | ||
| PATH="{{ REPO_ROOT }}/.venv/bin:$PATH" bash scripts/generate_api_docs.sh | ||
| uv run --no-sync python scripts/docs/generate_rust_library_reference.py | ||
| npx --yes fern-api@5.37.10 check | ||
|
|
||
| # Run the Python test suite with the same optional integrations used by CI. | ||
| test-python: | ||
| #!/usr/bin/env bash | ||
| if [[ "{{ no_uv }}" != "true" ]]; then | ||
| uv sync --group test --no-group dev --extra harbor --extra hermes --extra relay | ||
| fi | ||
| uv run --no-sync pytest | ||
|
dagardner-nv marked this conversation as resolved.
Resolved
|
||
|
|
||
| # Run the Rust workspace test suite using the locked dependency set. | ||
| test-rust: | ||
| cargo test --workspace --locked | ||
|
|
||
| # Run all Rust and Python tests. | ||
| test-all: test-rust test-python | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.