Skip to content

Dev/nl/add bmc config#81

Merged
liunick-msft merged 9 commits intomainfrom
dev/nl/addBMCConfig
Oct 10, 2025
Merged

Dev/nl/add bmc config#81
liunick-msft merged 9 commits intomainfrom
dev/nl/addBMCConfig

Conversation

@liunick-msft
Copy link
Contributor

This pull request improves the build and execution robustness of the switch configuration generator tool, with a focus on better packaging of the BMC converter module, enhanced path resolution for templates, and improved Unicode handling for Windows consoles. It also adds stricter error reporting and safer printing throughout the main execution flow.

Packaging and module inclusion improvements:

  • Updated the PyInstaller version to 6.11.* and added explicit inclusion of the convertors.convertors_bmc_switch_json module in the build steps for both Windows and Linux, ensuring the BMC converter is always packaged. Also excluded unnecessary modules (tkinter, matplotlib, PIL) to reduce executable size. [1] [2] [3]
  • Added a workflow test step to verify that the BMC converter module can be imported after build, catching packaging issues early.
  • Imported the BMC converter at the top level in convertors_lab_switch_json.py to help PyInstaller detect and bundle it.

Path resolution and error handling:

  • Improved template path resolution in convertors_bmc_switch_json.py to handle both script and bundled (PyInstaller) execution, with clearer error messages if templates are missing.
  • Enhanced error reporting in BMC conversion, including full tracebacks for easier debugging of import or runtime errors.

Unicode and console output robustness:

  • Added UTF-8 console configuration for Windows and introduced a safe_print function to handle Unicode output gracefully, preventing crashes or garbled text in the console. All user-facing output in main.py now uses safe_print. [1] [2] [3] [4] [5] [6] [7] [8]

These changes collectively improve the reliability of both the build process and runtime experience for users, especially on Windows and in packaged environments.

@liunick-msft liunick-msft merged commit 680cf4a into main Oct 10, 2025
6 checks passed
@liunick-msft liunick-msft deleted the dev/nl/addBMCConfig branch October 10, 2025 20:33
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.

1 participant