Skip to content

feat: Upgrade to Python3 & PyQt5#26

Open
000conor000 wants to merge 15 commits intoDenvi:masterfrom
000conor000:development
Open

feat: Upgrade to Python3 & PyQt5#26
000conor000 wants to merge 15 commits intoDenvi:masterfrom
000conor000:development

Conversation

@000conor000
Copy link

@000conor000 000conor000 commented Dec 28, 2025

Hello,

There was quite a large version gap for the dependencies in the application so quite a lot of extensive changes were needed to bring it in-line with current releases so claude has been used to perform the most of this large-scale work, this is still a work in progress at the moment and still needs extensive testing, it also is pulling in your 13b6f change, the below changes are what have been made:

Python 3 & PyQt5 Migration

  • Upgraded all code from Python 2 to Python 3.10+
  • Migrated from PyQt4 to PyQt5
  • Fixed Shapely 2.0 API compatibility (LineString.coords is now read-only)
  • Fixed integer division operators (/ → // where needed)
  • Updated deprecated assertEquals to assertEqual for Python 3.12+

Test Suite Fixes

  • Fixed Qt threading issues in FlatCAMWorkerStack with proper signal disconnection and thread cleanup
  • Added cleanup() method to FlatCAMApp for safe test shutdown
  • Fixed FlatCAMRTree.nearest() to properly raise StopIteration
  • Fixed dictionary mutation during iteration in test_pool_memory.py
  • Resolved circular import in tests/test_tclCommands/init.py
  • Created conftest.py for proper test imports
  • 48 tests now passing

Build System

  • Created comprehensive Makefile with targets:
    • make install - Create venv and install dependencies
    • make run - Run the application
    • make test - Run test suite
    • make test-coverage - Run tests with coverage report
    • make setup-ubuntu - Install system dependencies (Ubuntu/Debian)
    • make setup-macos - Install system dependencies (macOS)
    • make clean - Remove venv and cached files
  • Consolidated setup_ubuntu.sh and upgrade_geos.sh into Makefile targets

CI/CD Pipeline

  • test.yml - Runs pytest on all PRs (Python 3.10, 3.11, 3.12)
  • security.yml - Trivy vulnerability scanner for dependencies and config files
  • malware-scan.yml - ClamAV malware scanning on PRs
  • release.yml - Automatic releases based on Conventional Commits

Documentation

  • Rewrote README.md with:
    • Product description and key concepts
    • Workflow diagrams (Gerber → Geometry → CNC Job → G-Code)
    • Supported file formats table
    • Step-by-step installation instructions
    • Project structure overview
    • Contributing guidelines with Conventional Commits

Repository Cleanup

  • Removed ~450KB of unnecessary files:
    • FlatCAM_GTK/ (abandoned GTK port)
    • descartes/ (now installed via pip)
    • sandbox/ (development experiments)
    • bugs/ (old bug reports)
    • Legacy shell scripts
    • pycache and .pyc files
  • Updated .gitignore with comprehensive patterns

Test Plan

  • All 48 unit tests pass with make test
  • Application launches with make run
  • Dependencies install correctly with make install
  • GitHub Actions workflows validated

Breaking Changes

  • Requires Python 3.10+ (was Python 2.7)
  • Requires PyQt5 (was PyQt4)

@metalinspired
Copy link

@000conor000 Seems that similar work has been done on the official repository Beta branch

@iuvi7
Copy link

iuvi7 commented Mar 18, 2026

@000conor000 Is it possible to ask fully complete .msi installer for Win and .deb or AppImage\Flatpack version of FlatCAM?

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.

4 participants