Skip to content

Conversation

bartgol
Copy link
Collaborator

@bartgol bartgol commented Apr 25, 2025

This PR

  • extracts the yaml file parsing into its own module
  • uses the parsing module to provide a utility that prints the machine env setup cmd to screen

Closes #3

@bartgol bartgol added the enhancement New feature or request label Apr 25, 2025
@bartgol bartgol requested review from jgfouca and mahf708 April 25, 2025 18:47
@bartgol bartgol self-assigned this Apr 25, 2025
jgfouca
jgfouca previously approved these changes Apr 25, 2025
@mahf708 mahf708 requested a review from Copilot April 25, 2025 19:16
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new executable utility ("get-mach-env") to print the machine environment setup command and extracts YAML file parsing into its independent module.

  • Extracts YAML file parsing functions into cacts/parse_config.py
  • Implements the get-mach-env executable in cacts/get_mach_env.py and updates the project’s entry points
  • Removes legacy parsing routines from cacts/cacts.py in favor of the new module

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pyproject.toml Adds script entry point for get-mach-env
cacts/parse_config.py Introduces new YAML parsing functions for project, machine, and builds
cacts/get_mach_env.py Implements the new utility executable to print machine env setup
cacts/cacts.py Removes old parse_config_file function and integrates new module functions
cacts/init.py Exposes get_mach_env() via the package’s main entry point
Comments suppressed due to low confidence (1)

cacts/parse_config.py:65

  • The variable 'configs' is not defined. It is likely intended to refer to content['configurations'] from the loaded YAML content.
for name in configs.keys():

mahf708
mahf708 previously approved these changes Apr 25, 2025
@bartgol bartgol dismissed stale reviews from mahf708 and jgfouca via cdb90ee April 25, 2025 20:01
@mahf708 mahf708 enabled auto-merge (rebase) April 25, 2025 20:27
@mahf708 mahf708 merged commit 4cf4c85 into main Apr 25, 2025
8 checks passed
@mahf708 mahf708 deleted the bartgol/expose-yaml-parsing-and-add-get-env branch April 25, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make parsing of yaml config file callable from any py code
3 participants