Skip to content
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

fprime-util wrapped tools (fpp-*, visualize, etc) Do Not Get Passed Settings.ini Environment #3081

Open
LeStarch opened this issue Dec 18, 2024 · 1 comment

Comments

@LeStarch
Copy link
Collaborator

F´ Version
Affected Component

Feature Description

The environment should be passed to all calls. This should be done with the following steps:

  1. Build a helper that can run wrapped utilities
  2. Feed the helper settings.ini and environment.
  3. Factor settings.ini one level higher than builder
@matt392code
Copy link
Contributor

Suggested changes:

# Proposed helper structure
class UtilityWrapper:
    def __init__(self, settings_path):
        self.settings = self.load_settings(settings_path)
        self.env = self.prepare_environment()

    def load_settings(self, path):
        # Load and parse settings.ini
        # Return processed settings

    def prepare_environment(self):
        # Merge settings with current environment
        # Handle any special cases
        return enhanced_environment

    def run_tool(self, tool_name, args):
        # Execute tool with proper environment

Implementation Steps:

Create utility wrapper helper
Move settings.ini processing up hierarchy
Ensure environment passes through all calls

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

No branches or pull requests

2 participants