Skip to content

Preserve .yml filenames in dump_yaml - #7275

Open
sylvesterkaczmarek wants to merge 7 commits into
isaac-sim:developfrom
sylvesterkaczmarek:fix/dump-yaml-yml-extension
Open

Preserve .yml filenames in dump_yaml#7275
sylvesterkaczmarek wants to merge 7 commits into
isaac-sim:developfrom
sylvesterkaczmarek:fix/dump-yaml-yml-extension

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Description

Fixes dump_yaml() changing valid .yml filenames.

The helper currently checks only whether the filename ends with the literal string yaml. Passing a standard YAML filename such as config.yml therefore writes config.yml.yaml instead of the requested path.

The extension check now accepts both .yaml and .yml case-insensitively. Filenames without a YAML extension continue to receive the default .yaml suffix.

Type of change

  • Bug fix

Validation

  • Extended the existing YAML I/O unit tests.
  • Added a regression test verifying config.yml is written unchanged and config.yml.yaml is not created.
  • Existing coverage still verifies extensionless filenames receive .yaml.
  • Added the required isaaclab changelog fragment.

Checklist

  • I have read and understood the contribution guidelines
  • I have added a regression test
  • I have added the required changelog fragment
  • No new dependencies

@sylvesterkaczmarek
sylvesterkaczmarek requested a review from a team August 21, 2026 15:17
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Aug 21, 2026
@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes dump_yaml() so existing .yml, .yaml, and case-variant YAML extensions are preserved, while extensionless filenames still receive .yaml.

  • Replaces the literal yaml suffix check with a case-insensitive .yaml/.yml check.
  • Adds regression coverage for preserving .yml paths and successfully loading the generated file.
  • Adds the corresponding IsaacLab changelog fragment.

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness, security, or quality issues identified.

The changed suffix check preserves standard YAML extensions case-insensitively, retains the existing default suffix for extensionless paths, and is covered by a focused regression test.

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/utils/io/yaml.py Correctly recognizes both standard YAML extensions case-insensitively without changing extensionless-file behavior.
source/isaaclab/test/utils/test_yaml_io.py Adds focused regression coverage proving that .yml is preserved and no double-suffixed file is created.
source/isaaclab/changelog.d/sylvesterkaczmarek-dump-yaml-yml-extension.patch.rst Accurately documents the corrected filename-extension behavior.

Reviews (1): Last reviewed commit: "Format YAML changelog fragment" | Re-trigger Greptile

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isaac Lab Review Bot

The change correctly updates dump_yaml filename normalization so valid .yml, .yaml, and case-varied YAML extensions are preserved while extensionless names still receive .yaml. The regression test and package changelog fragment align with that behavior.

  • Design and architecture: The fix remains localized to the existing leaf utility and introduces no new abstraction or dependency, consistent with the repository requirement to make the smallest effective change.
  • API: The public signature and return behavior are unchanged. The intended observable change is limited to extension handling; names ending in .yml or case-varied YAML extensions are now preserved, while non-extension suffixes such as configyaml receive .yaml. The changelog records this user-visible adjustment.
  • Implementation: The updated suffix check deterministically affects only filename selection before the existing directory creation, conversion, and serialization path. The new test demonstrates the .yml regression by checking the requested file is written, the erroneous .yml.yaml path is absent, and the result can be loaded. Existing coverage retains the extensionless-name behavior, though uppercase variants are covered by the implementation rather than a dedicated test.

No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.

Automated review; human maintainers own approval decisions.

@AntoineRichard AntoineRichard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review disclosure: This review was produced with assistance from multiple AI systems.

Thank you for putting this PR together.

Assessment: Case-insensitive extension check correctly preserves .yml/.yaml and adds .yaml only when absent.

Findings: Invalid .patch.rst filename; uppercase behavior promised by changelog lacks direct regression coverage.

Requested changes: Rename fragment and add one config.YML parameter or narrow the changelog claim.

Changelog filename: Rename the current <slug>.patch.rst fragment to <slug>.rst for this patch-level change. IsaacLab accepts <slug>.rst (patch), <slug>.minor.rst, and <slug>.major.rst; it does not accept a .patch.rst suffix.

Test scope: Add at most one uppercase parameter to the existing focused case, not a new test.

Documentation / AI skills: No additional documentation update is required: changelog is sufficient. No AI-skill update is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants