mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-11 19:56:03 +00:00
chore: use JSON instead of YAML for openapi generation
JSON has a few advantages over YAML in this context: * No extra dependency: Removed ruamel.yaml; using the standard library json module. * Simpler code: No YAML formatting configuration (indent, flow style, string presentation, etc.). JSON serialization is straightforward. * Faster generation: JSON serialization is typically faster and more predictable than YAML formatting. * Native OpenAPI format: JSON is the native OpenAPI format. Many tools prefer JSON, reducing potential compatibility issues. * Better tooling support: JSON is widely supported. Tools like oasdiff, OpenAPI validators, and code generators work well with JSON. * Fewer formatting edge cases: YAML can have edge cases (multiline strings, special characters, quoting, scalars etc). JSON avoids these. All the tools consumming the YAMLs have been updated namely oasdiff for conformance tests, docusaurus config and the genrator. Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
d4aa348b60
commit
44e36ce48d
15 changed files with 71155 additions and 29137 deletions
|
|
@ -67,13 +67,12 @@ dev = [
|
|||
"pytest-cov",
|
||||
"pytest-html",
|
||||
"pytest-json-report",
|
||||
"pytest-socket", # For blocking network access in unit tests
|
||||
"nbval", # For notebook testing
|
||||
"pytest-socket", # For blocking network access in unit tests
|
||||
"nbval", # For notebook testing
|
||||
"black",
|
||||
"ruff",
|
||||
"mypy",
|
||||
"pre-commit",
|
||||
"ruamel.yaml", # needed for openapi generator
|
||||
]
|
||||
# Type checking dependencies - includes type stubs and optional runtime dependencies
|
||||
# needed for complete mypy coverage across all optional features
|
||||
|
|
@ -248,7 +247,9 @@ unfixable = [
|
|||
# Ignore the following errors for the following files
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"tests/**/*.py" = ["DTZ"] # Ignore datetime rules for tests
|
||||
"src/llama_stack/providers/inline/scoring/basic/utils/ifeval_utils.py" = ["RUF001"]
|
||||
"src/llama_stack/providers/inline/scoring/basic/utils/ifeval_utils.py" = [
|
||||
"RUF001",
|
||||
]
|
||||
"src/llama_stack/providers/inline/scoring/basic/scoring_fn/fn_defs/regex_parser_multiple_choice_answer.py" = [
|
||||
"RUF001",
|
||||
"PLE2515",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue