← Back to issue list

refactor(parts): move yaml utils out of lifecycle

View original Github issue

Metadata

Project
snapcraft
Number
#4338
Type
pull request
State
merged
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

Merged into main after approval and passing CI. Relocated four YAML utility functions from the lifecycle module to yaml_utils. No functional changes. Prepares codebase for related work.

Suggested action:

No scores available.

Issue body

- [X] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [X] Have you successfully run `make lint`? - [X] Have you successfully run `pytest tests/unit`? ----- Move 4 `snapcraft.yaml` utility functions out of `lifecycle` module into the `yaml_utils` module. No functional changes. I've been wanting to do this for some time. Working on #4318 is an excuse to get it done since it requires importing these functions. (CRAFT-1972)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged into main after approval and passing CI. Relocated four YAML utility functions from the lifecycle module to yaml_utils. No functional changes. Prepares codebase for related work.
qwen3.6-35b-a3b-mtp-q6 Merged a refactoring moving four YAML utility functions from lifecycle to yaml_utils. No functional changes. Prepares codebase for related work. Codecov reported 100% diff coverage.
qwen3.6-35b-a3b-mtp-q6 Merged refactoring moving four YAML utility functions from the lifecycle module to yaml_utils. No functional changes. Prepares codebase for related work. Diff coverage reached 100%.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#4342 refactor(parts): separate yaml parsing from base errors snapcraft merged Merged into main after passing CI and receiving two approvals. The refactor separates YAML parsing from base errors to allow base validation without raising exceptions. No functional changes were made, and coverage increased by 0.01%.
76%
#2781 yaml_utils: move _load_yaml from project for re-use (and add tests) snapcraft merged Merged. Moved _load_yaml to yaml_utils as load_yaml_file, added tests, and improved error handling to raise YamlValidationError. Approved, passed CI, and changed 3 files. Logic will be reused for snapcraft config files.
73%