-
Notifications
You must be signed in to change notification settings - Fork 200
feat: define public generation invocation contract #854
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
Open
andreatnvidia
wants to merge
8
commits into
main
Choose a base branch
from
andreatnvidia/feat/public-generation-contract
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2841525
feat: define public generation contract
andreatnvidia 63040a9
fix: complete public generation contract
andreatnvidia 4c9c794
docs: clarify public invocation limits
andreatnvidia a5cac7e
fix: handle mixed-case config extensions
andreatnvidia b0a55c7
Merge branch 'main' into andreatnvidia/feat/public-generation-contract
andreatnvidia cf0f0bd
fix: complete generation contract edge cases
andreatnvidia 40daaa9
test: make inline config regression self-contained
andreatnvidia 1945750
fix: classify malformed config paths
andreatnvidia 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
38 changes: 38 additions & 0 deletions
38
packages/data-designer-config/tests/config/test_public_contract.py
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,38 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from pathlib import Path | ||
|
|
||
| import pytest | ||
|
|
||
| import data_designer.config.errors as config_errors | ||
| from data_designer.config import ( | ||
| DataDesignerConfigBuilder, | ||
| InvalidConfigError, | ||
| InvalidFileFormatError, | ||
| InvalidFilePathError, | ||
| ) | ||
|
|
||
|
|
||
| def test_invalid_config_error_is_publicly_exported() -> None: | ||
| assert InvalidConfigError is config_errors.InvalidConfigError | ||
|
|
||
|
|
||
| def test_builder_file_errors_are_publicly_exported() -> None: | ||
| assert InvalidFileFormatError is config_errors.InvalidFileFormatError | ||
| assert InvalidFilePathError is config_errors.InvalidFilePathError | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("filename", ["missing.yaml", "missing.json"]) | ||
| def test_from_config_normalizes_missing_file_error(tmp_path: Path, filename: str) -> None: | ||
| with pytest.raises(InvalidFilePathError) as exc_info: | ||
| DataDesignerConfigBuilder.from_config(str(tmp_path / filename)) | ||
|
|
||
| assert isinstance(exc_info.value.__cause__, FileNotFoundError) | ||
|
|
||
|
|
||
| def test_from_config_normalizes_malformed_config_error() -> None: | ||
| with pytest.raises(InvalidFileFormatError): | ||
| DataDesignerConfigBuilder.from_config("data_designer: [") |
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
Oops, something went wrong.
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.