Commit de307a8
committed
Refactor: Further enhance Python packaging and modularity
This commit implements further refactoring based on feedback to improve the project's structure as a Python library:
- Removed `if __name__ == "__main__"` blocks from `FreeTSE/FreeTSE.py` and `FreeTSE/gui.py` to ensure they act as importable modules without side effects.
- Refactored `FreeTSE/gui.py` to encapsulate its primary functionality within a callable `run_gui_application()` function. This makes the GUI behavior explicitly invokable rather than running on import.
- Updated `FreeTSE/__init__.py` to only export the core `FreeTSE` class by default. The `run_gui_application` function can be imported directly from `FreeTSE.gui` if needed. This change prevents `PySimpleGUIWx` (a GUI dependency) from becoming a core dependency for non-GUI uses of the library.
- Adjusted test imports in `tests/test_freetse_integration.py` to `from FreeTSE import FreeTSE`.
- Confirmed all tests pass after these changes.1 parent 1e72c36 commit de307a8
File tree
24 files changed
+1291
-230
lines changed- FreeTSE
- dat
- test_output
- tests
24 files changed
+1291
-230
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
785 | 785 | | |
786 | 786 | | |
787 | 787 | | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | | - | |
| 788 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
0 commit comments