Skip to content

Conversation

@AN0DA
Copy link
Owner

@AN0DA AN0DA commented Oct 10, 2025

Pipx Support and Workflow Streamlining

📝 Description

This pull request enhances Printerm to support pipx installations and streamlines the CI/CD workflows for improved efficiency and maintainability.

🔧 Changes

Core Functionality

  • Added pipx support: Implemented detection for pipx installations in both CLI and GUI interfaces
  • Smart update mechanism: Automatically uses pipx update when running via pipx, falling back to pip otherwise
  • Cross-platform compatibility: Enhanced update logic to work seamlessly across different installation methods

CI/CD Improvements

  • Streamlined Docker builds: Optimized the Docker build workflow with better caching, provenance tracking, and security scanning
  • Simplified release triggers: Removed redundant steps in the release workflow for faster and more reliable deployments
  • Enhanced security: Added SBOM generation and vulnerability scanning to Docker builds

🧪 Testing

  • Verified pipx detection works correctly in various environments
  • Tested update functionality for both pip and pipx installations
  • Confirmed Docker builds complete successfully with new optimizations
  • Validated release workflow triggers properly

📋 Checklist

  • Code follows project style guidelines
  • Tests pass for all changes
  • Documentation updated where necessary
  • CI/CD pipelines pass
  • Backward compatibility maintained

AN0DA added 2 commits October 10, 2025 22:48
- Added a function to check if the application is running via pipx.
- Updated the update command logic to handle pipx installations appropriately.
- Improved user feedback during the update process.
- Removed push event triggers from build-docker workflow.
- Updated release handling to trigger Docker build on new releases.
- Simplified image tagging logic for better clarity and efficiency.
Copilot AI review requested due to automatic review settings October 10, 2025 20:54
Copy link

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 adds pipx installation support to Printerm and streamlines CI/CD workflows. The main purpose is to enable automatic detection of pipx installations and use the appropriate update mechanism (pipx vs pip) accordingly.

Key changes:

  • Added pipx detection logic to both CLI and GUI interfaces for smart update mechanism selection
  • Simplified Docker build workflow to trigger only on releases instead of main branch pushes
  • Removed redundant Docker build step from release workflow

Reviewed Changes

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

File Description
printerm/interfaces/gui/widgets/main_window.py Added pipx detection function and conditional update logic in GUI update dialog
printerm/interfaces/cli.py Added pipx detection function and conditional update logic in CLI update command
.github/workflows/release.yaml Removed Docker build job to simplify release workflow
.github/workflows/build-docker.yml Simplified triggers to only build on releases and workflow dispatch

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

- Consolidated the is_running_via_pipx function into the utils.py file
  for better organization and reusability across the application.
- Removed duplicate function definitions from cli.py and main_window.py.
@AN0DA AN0DA merged commit 678bdd0 into main Oct 10, 2025
6 checks passed
@AN0DA AN0DA deleted the pipx-update branch October 10, 2025 21:08
@github-actions
Copy link

🎉 This PR is included in version 1.3.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants