Skip to content

Update logic - #48

Open
diego-ferrand wants to merge 5 commits into
developmentfrom
UPDATE_LOGIC
Open

diego-ferrand wants to merge 5 commits into
developmentfrom
UPDATE_LOGIC

Conversation

@diego-ferrand

@diego-ferrand diego-ferrand commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

This pull request introduces several improvements and refactorings to platform normalization, update handling, and test coverage for the Perfecto MCP project. The most significant changes include extracting platform normalization logic into a shared module, adding a new HTTP client configuration, refactoring update-related code for better modularity, and enhancing the CLI and test coverage for update flows.

Platform normalization and shared utilities:

  • Extracted platform and architecture normalization logic from build.py and tools_manager.py into a new shared module config/platform_names.py, and updated all relevant usages to import from this module. This ensures consistent platform name handling across packaging, updater, and tests. [1] [2] [3] [4] [5]
  • Added a new module config/http.py providing shared HTTP client defaults and a standardized user agent string for Perfecto MCP, decoupled from any tools-specific dependencies.

Update flow and CLI improvements:

  • Added a --update CLI flag to main.py to trigger the interactive manual updater, and improved the exit banner to prompt users about the update option when running as a frozen binary. [1] [2] [3]
  • Refactored the ASCII banner in main.py into a reusable _banner() function for consistent branding and messaging. [1] [2]
  • Ensured that the update package and its modules are included in the build and packaging process by updating both the PyInstaller build list and the pyproject.toml configuration. [1] [2]

Test improvements and update guidance:

  • Updated tests to use the new platform normalization helpers and the refactored match_recommended_asset function from the update.release module. Added new tests for update guidance messaging, including scenarios for both frozen binaries and source-based installs. [1] [2] [3] [4] [5]

These changes collectively improve maintainability, consistency, and user experience around platform detection and update flows.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants