syncmoss 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. {syncmoss-0.2.0 → syncmoss-0.2.1}/.gitignore +10 -0
  2. {syncmoss-0.2.0/syncmoss.egg-info → syncmoss-0.2.1}/PKG-INFO +1 -1
  3. {syncmoss-0.2.0 → syncmoss-0.2.1}/bundle/MacOS.spec +47 -17
  4. {syncmoss-0.2.0 → syncmoss-0.2.1}/bundle/Windows.spec +32 -12
  5. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/main.py +1 -1
  6. syncmoss-0.2.1/syncmoss/minimi_lib.py +676 -0
  7. syncmoss-0.2.1/syncmoss/parameters/INSexp.txt +1 -0
  8. syncmoss-0.2.1/syncmoss/parameters/INSint.txt +1 -0
  9. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/spectrum_plotter.py +1 -1
  10. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/syncmoss_main.py +1 -1
  11. {syncmoss-0.2.0 → syncmoss-0.2.1/syncmoss.egg-info}/PKG-INFO +1 -1
  12. {syncmoss-0.2.0 → syncmoss-0.2.1}/tests/syncmoss_test.py +0 -33
  13. syncmoss-0.2.0/syncmoss/minimi_lib.py +0 -607
  14. syncmoss-0.2.0/syncmoss/parameters/INSexp.txt +0 -1
  15. syncmoss-0.2.0/syncmoss/parameters/INSint.txt +0 -1
  16. {syncmoss-0.2.0 → syncmoss-0.2.1}/.github/workflows/_MacOS.yml +0 -0
  17. {syncmoss-0.2.0 → syncmoss-0.2.1}/.github/workflows/_PyPI.yml +0 -0
  18. {syncmoss-0.2.0 → syncmoss-0.2.1}/.github/workflows/_TagRelease.yml +0 -0
  19. {syncmoss-0.2.0 → syncmoss-0.2.1}/.github/workflows/_Tests.yml +0 -0
  20. {syncmoss-0.2.0 → syncmoss-0.2.1}/.github/workflows/_UploadRelease.yml +0 -0
  21. {syncmoss-0.2.0 → syncmoss-0.2.1}/.github/workflows/_Version.yml +0 -0
  22. {syncmoss-0.2.0 → syncmoss-0.2.1}/.github/workflows/_Wheels.yml +0 -0
  23. {syncmoss-0.2.0 → syncmoss-0.2.1}/.github/workflows/_WindowsExe.yml +0 -0
  24. {syncmoss-0.2.0 → syncmoss-0.2.1}/.github/workflows/release.yml +0 -0
  25. {syncmoss-0.2.0 → syncmoss-0.2.1}/.vscode/settings.json +0 -0
  26. {syncmoss-0.2.0 → syncmoss-0.2.1}/COPYING.txt +0 -0
  27. {syncmoss-0.2.0 → syncmoss-0.2.1}/LICENSE +0 -0
  28. {syncmoss-0.2.0 → syncmoss-0.2.1}/Lib_test/test.mdl +0 -0
  29. {syncmoss-0.2.0 → syncmoss-0.2.1}/NOTICE.txt +0 -0
  30. {syncmoss-0.2.0 → syncmoss-0.2.1}/README.md +0 -0
  31. {syncmoss-0.2.0 → syncmoss-0.2.1}/bundle/bundle.py +0 -0
  32. {syncmoss-0.2.0 → syncmoss-0.2.1}/bundle/macos_bundle.py +0 -0
  33. {syncmoss-0.2.0 → syncmoss-0.2.1}/pyproject.toml +0 -0
  34. {syncmoss-0.2.0 → syncmoss-0.2.1}/requirements.txt +0 -0
  35. {syncmoss-0.2.0 → syncmoss-0.2.1}/setup.cfg +0 -0
  36. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/Calibration.dat +0 -0
  37. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/Calibration.py +0 -0
  38. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/Hamiltonian_helper.py +0 -0
  39. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/Library/Hematite mineral test.mdl +0 -0
  40. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/Library/Magnetite mineral bulk test.mdl +0 -0
  41. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/Library/Wustite mineral test.mdl +0 -0
  42. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/Library/alfa iron test.mdl +0 -0
  43. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/Library_io.py +0 -0
  44. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/Library_window.py +0 -0
  45. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/constants.py +0 -0
  46. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/fitting_io.py +0 -0
  47. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/icons/CheckBox.png +0 -0
  48. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/icons/CheckBox_.png +0 -0
  49. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/icons/CheckBox_L.png +0 -0
  50. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/icons/CheckBox_L2.png +0 -0
  51. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/icons/DU.png +0 -0
  52. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/icons/Switch.png +0 -0
  53. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/icons/UD.png +0 -0
  54. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/icons/icon_r.ico +0 -0
  55. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/instrumental_io.py +0 -0
  56. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/model_io.py +0 -0
  57. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/models.py +0 -0
  58. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/models_positions.py +0 -0
  59. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/parameters/ABSorber3.txt +0 -0
  60. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/parameters/Be.txt +0 -0
  61. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/parameters/GCMS.txt +0 -0
  62. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/parameters/INS_APS.txt +0 -0
  63. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/parameters/KB.txt +0 -0
  64. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/parameters/NFS.txt +0 -0
  65. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/parameters_table.py +0 -0
  66. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/results_table.py +0 -0
  67. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/spectrum_io.py +0 -0
  68. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/support_math.py +0 -0
  69. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/test_graf.txt +0 -0
  70. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/test_param.txt +0 -0
  71. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/theme_dark.json +0 -0
  72. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss/theme_light.json +0 -0
  73. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss.egg-info/SOURCES.txt +0 -0
  74. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss.egg-info/dependency_links.txt +0 -0
  75. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss.egg-info/entry_points.txt +0 -0
  76. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss.egg-info/requires.txt +0 -0
  77. {syncmoss-0.2.0 → syncmoss-0.2.1}/syncmoss.egg-info/top_level.txt +0 -0
  78. {syncmoss-0.2.0 → syncmoss-0.2.1}/tests/conftest.py +0 -0
  79. {syncmoss-0.2.0 → syncmoss-0.2.1}/tests/test_gui_smoke.py +0 -0
  80. {syncmoss-0.2.0 → syncmoss-0.2.1}/tests/test_library_io.py +0 -0
  81. {syncmoss-0.2.0 → syncmoss-0.2.1}/tests/test_model_io.py +0 -0
  82. {syncmoss-0.2.0 → syncmoss-0.2.1}/tests/test_support_math.py +0 -0
@@ -139,3 +139,13 @@ bundle/Windows/
139
139
  syncmoss/*.mdl
140
140
  syncmoss/*.png
141
141
  syncmoss/*.svg
142
+
143
+ # Deprecated original minimiser, kept locally for reference / equivalence checks
144
+ # (the active implementation is now the optimized minimi_lib.py).
145
+ syncmoss/minimi_lib_old.py
146
+
147
+ # minimi_lib optimization: local-only test tooling and notes (depend on the
148
+ # git-ignored minimi_lib_old.py; kept out of the tracked repo).
149
+ verify_minimi.py
150
+ bench_coldstart.py
151
+ minimi_optimization_notes.txt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: syncmoss
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: SYNCmoss — Mössbauer spectroscopy analysis application
5
5
  Author: Sergey Yaroslavtsev
6
6
  License: MIT
@@ -2,30 +2,49 @@
2
2
  from PyInstaller.utils.hooks import collect_data_files, collect_submodules
3
3
  import os
4
4
 
5
- # Hidden imports
6
- hiddenimports = collect_submodules('scipy')
7
- hiddenimports += collect_submodules('PySide6')
8
- hiddenimports += collect_submodules('numba')
5
+ # ── Hidden imports ──────────────────────────────────────────────
6
+ # numba/llvmlite/scipy do a lot of dynamic importing, so collect their submodules
7
+ # (this keeps core modules like scipy._cyutility that the hooks miss). The big
8
+ # unused scipy subpackages are pruned again via scipy_excludes below; numba's own
9
+ # test-suite is filtered out (not needed at runtime, and it emits a wall of
10
+ # "hidden import not found" warnings for its CUDA tests).
11
+ hiddenimports = collect_submodules('numba', filter=lambda name: 'tests' not in name)
9
12
  hiddenimports += collect_submodules('llvmlite')
13
+ hiddenimports += collect_submodules('scipy')
14
+ # Only the Qt modules SYNCmoss actually uses. We deliberately do NOT
15
+ # collect_submodules('PySide6'): that drags in the QtQuick / QtQml / Qt3D /
16
+ # WebEngine frameworks (100+ MB) the app never uses. The PySide6 PyInstaller
17
+ # hook bundles the Qt frameworks/plugins matching just these imports. This
18
+ # matters most on macOS, where the build is universal2 (two architectures) and
19
+ # UPX is not applied.
20
+ hiddenimports += ['PySide6.QtCore', 'PySide6.QtGui', 'PySide6.QtWidgets']
10
21
  # GUI smoke driver lives in tests/syncmoss_test.py; bundling it lets the frozen
11
22
  # binary self-test via `SYNCmoss --test` (see syncmoss/main.py).
12
23
  hiddenimports += ['syncmoss_test']
13
24
 
14
- scipy_data = collect_data_files('scipy')
25
+ # llvmlite carries native data/bitcode that must be collected.
15
26
  llvmlite_data = collect_data_files('llvmlite')
27
+ # On macOS, missing platform input context plugins can lead to non-editable
28
+ # QLineEdit/QTable widgets in frozen apps. Bundle these explicitly.
29
+ qt_plugin_data = collect_data_files(
30
+ 'PySide6',
31
+ includes=[
32
+ 'Qt/plugins/platforms/*',
33
+ 'Qt/plugins/platforminputcontexts/*',
34
+ 'Qt/plugins/styles/*',
35
+ ],
36
+ )
16
37
 
17
38
  syncmoss_dir = os.path.abspath(os.path.join(SPECPATH, '..', 'syncmoss'))
18
39
  project_dir = os.path.abspath(os.path.join(SPECPATH, '..'))
19
40
  tests_dir = os.path.abspath(os.path.join(SPECPATH, '..', 'tests'))
20
41
 
21
- datas = scipy_data + llvmlite_data
42
+ # Application resources (icons/, parameters/, themes, etc.) are copied into the
43
+ # app bundle by macos_bundle.py after the build.
44
+ datas = llvmlite_data + qt_plugin_data
22
45
 
23
- # SYNCmoss only uses PySide6.QtWidgets / QtGui / QtCore. Excluding the large,
24
- # unused Qt frameworks (WebEngine, Quick/QML, 3D, Multimedia, Charts, ...) keeps
25
- # excludes win over collect_submodules above, so they are pruned from the bundle.
26
- # This matters most on macOS, where the build is universal2 (two architectures)
27
- # and UPX compression is not applied. The CI "--test" smoke run guards against
28
- # accidentally excluding something the app actually needs.
46
+ # Unused-Qt Python module excludes (belt-and-suspenders, since PySide6 is no
47
+ # longer force-collected). The CI "--test" smoke run guards against over-excluding.
29
48
  qt_excludes = [
30
49
  'PySide6.QtWebEngineCore', 'PySide6.QtWebEngineWidgets', 'PySide6.QtWebEngineQuick',
31
50
  'PySide6.QtWebChannel', 'PySide6.QtWebSockets', 'PySide6.QtWebView',
@@ -42,6 +61,15 @@ qt_excludes = [
42
61
  'PySide6.QtUiTools', 'PySide6.QtNetworkAuth', 'PySide6.QtRemoteObjects',
43
62
  'PySide6.QtTextToSpeech', 'PySide6.QtScxml', 'PySide6.QtStateMachine',
44
63
  ]
64
+ # scipy is only used for scipy.linalg.eig; exclude the big unused subpackages.
65
+ # (linalg, _lib, special and sparse are kept: scipy.linalg's import chain may
66
+ # touch special/sparse.)
67
+ scipy_excludes = [
68
+ 'scipy.stats', 'scipy.optimize', 'scipy.spatial', 'scipy.interpolate',
69
+ 'scipy.integrate', 'scipy.fft', 'scipy.fftpack', 'scipy.ndimage',
70
+ 'scipy.signal', 'scipy.io', 'scipy.cluster', 'scipy.odr',
71
+ 'scipy.datasets', 'scipy.misc',
72
+ ]
45
73
  # pytest is only used by the source test-suite; it must not be pulled into the
46
74
  # frozen binary (the smoke driver imports it lazily / guarded).
47
75
  other_excludes = ['tkinter', 'PyQt5', 'PyQt6', 'PySide2', 'pytest', '_pytest', 'pluggy']
@@ -53,7 +81,9 @@ a = Analysis(
53
81
  pathex=[project_dir, tests_dir],
54
82
  hooksconfig={
55
83
  'matplotlib': {
56
- 'backends': 'all',
84
+ # Only the backends SYNCmoss uses (Qt for the GUI, Agg/SVG/PDF for
85
+ # saving). 'all' pulls every backend incl. the tk one.
86
+ 'backends': ['Agg', 'QtAgg', 'SVG', 'PDF'],
57
87
  },
58
88
  },
59
89
  binaries=[],
@@ -61,7 +91,7 @@ a = Analysis(
61
91
  hiddenimports=hiddenimports,
62
92
  hookspath=[],
63
93
  runtime_hooks=[],
64
- excludes=qt_excludes + other_excludes,
94
+ excludes=qt_excludes + scipy_excludes + other_excludes,
65
95
  cipher=block_cipher,
66
96
  noarchive=False,
67
97
  )
@@ -76,9 +106,9 @@ exe_gui = EXE(
76
106
  name='SYNCmoss',
77
107
  debug=False,
78
108
  bootloader_ignore_signals=False,
79
- strip=True,
109
+ strip=False,
80
110
  upx=False,
81
- console=True,
111
+ console=False,
82
112
  )
83
113
 
84
114
  coll = COLLECT(
@@ -86,7 +116,7 @@ coll = COLLECT(
86
116
  a.binaries,
87
117
  a.zipfiles,
88
118
  a.datas,
89
- strip=True,
119
+ strip=False,
90
120
  upx=False,
91
121
  upx_exclude=[],
92
122
  name='SYNCmoss',
@@ -3,26 +3,35 @@ from PyInstaller.utils.hooks import collect_data_files, collect_submodules
3
3
  import os
4
4
 
5
5
  # ── Hidden imports ──────────────────────────────────────────────
6
- hiddenimports = collect_submodules('scipy')
7
- hiddenimports += collect_submodules('PySide6')
8
- # Ensure numba and llvmlite submodules are included in the frozen app
9
- hiddenimports += collect_submodules('numba')
6
+ # numba/llvmlite/scipy do a lot of dynamic importing, so collect their submodules
7
+ # (this keeps core modules like scipy._cyutility that the hooks miss). The big
8
+ # unused scipy subpackages are pruned again via scipy_excludes below; numba's own
9
+ # test-suite is filtered out (not needed at runtime, and it emits a wall of
10
+ # "hidden import not found" warnings for its CUDA tests).
11
+ hiddenimports = collect_submodules('numba', filter=lambda name: 'tests' not in name)
10
12
  hiddenimports += collect_submodules('llvmlite')
13
+ hiddenimports += collect_submodules('scipy')
14
+ # Only the Qt modules SYNCmoss actually uses. We deliberately do NOT
15
+ # collect_submodules('PySide6'): that drags in the QtQuick / QtQml / Qt3D /
16
+ # WebEngine frameworks (100+ MB) the app never uses. The PySide6 PyInstaller
17
+ # hook bundles the Qt frameworks/plugins matching just these imports.
18
+ hiddenimports += ['PySide6.QtCore', 'PySide6.QtGui', 'PySide6.QtWidgets']
11
19
  # GUI smoke driver lives in tests/syncmoss_test.py; bundling it lets the frozen
12
20
  # binary self-test via `SYNCmoss --test` (see syncmoss/main.py).
13
21
  hiddenimports += ['syncmoss_test']
14
- scipy_data = collect_data_files('scipy')
15
- # llvmlite carries native data/bitcode that should be collected
22
+
23
+ # scipy is only needed for scipy.linalg.eig (the import-time "dummy" in
24
+ # models.py); scipy_excludes below drops the big unused subpackages.
25
+ # llvmlite carries native data/bitcode that must be collected.
16
26
  llvmlite_data = collect_data_files('llvmlite')
17
27
 
18
28
  syncmoss_dir = os.path.abspath(os.path.join(SPECPATH, '..', 'syncmoss'))
19
29
  project_dir = os.path.abspath(os.path.join(SPECPATH, '..'))
20
30
  tests_dir = os.path.abspath(os.path.join(SPECPATH, '..', 'tests'))
21
31
 
22
- # Only Python library data (scipy, etc.) goes through PyInstaller.
23
- # Application resources (icons/, parameters/, themes, etc.) are copied
24
- # next to the .exe by bundle.py after the build.
25
- datas = scipy_data + llvmlite_data
32
+ # Application resources (icons/, parameters/, themes, etc.) are copied next to
33
+ # the .exe by bundle.py after the build.
34
+ datas = llvmlite_data
26
35
 
27
36
  # SYNCmoss only uses PySide6.QtWidgets / QtGui / QtCore. Excluding the large,
28
37
  # unused Qt frameworks keeps the bundle small; excludes win over the
@@ -44,6 +53,15 @@ qt_excludes = [
44
53
  'PySide6.QtUiTools', 'PySide6.QtNetworkAuth', 'PySide6.QtRemoteObjects',
45
54
  'PySide6.QtTextToSpeech', 'PySide6.QtScxml', 'PySide6.QtStateMachine',
46
55
  ]
56
+ # scipy is only used for scipy.linalg.eig; exclude the big unused subpackages.
57
+ # (linalg, _lib, special and sparse are kept: scipy.linalg's import chain may
58
+ # touch special/sparse.)
59
+ scipy_excludes = [
60
+ 'scipy.stats', 'scipy.optimize', 'scipy.spatial', 'scipy.interpolate',
61
+ 'scipy.integrate', 'scipy.fft', 'scipy.fftpack', 'scipy.ndimage',
62
+ 'scipy.signal', 'scipy.io', 'scipy.cluster', 'scipy.odr',
63
+ 'scipy.datasets', 'scipy.misc',
64
+ ]
47
65
  # pytest is only used by the source test-suite; it must not be pulled into the
48
66
  # frozen binary (the smoke driver imports it lazily / guarded).
49
67
  other_excludes = ['tkinter', 'PyQt5', 'PyQt6', 'PySide2', 'pytest', '_pytest', 'pluggy']
@@ -55,7 +73,9 @@ a = Analysis(
55
73
  pathex=[project_dir, tests_dir],
56
74
  hooksconfig={
57
75
  'matplotlib': {
58
- 'backends': 'all',
76
+ # Only the backends SYNCmoss uses (Qt for the GUI, Agg/SVG/PDF for
77
+ # saving). 'all' pulls every backend incl. the tk one.
78
+ 'backends': ['Agg', 'QtAgg', 'SVG', 'PDF'],
59
79
  },
60
80
  },
61
81
  binaries=[],
@@ -63,7 +83,7 @@ a = Analysis(
63
83
  hiddenimports=hiddenimports,
64
84
  hookspath=[],
65
85
  runtime_hooks=[],
66
- excludes=qt_excludes + other_excludes,
86
+ excludes=qt_excludes + scipy_excludes + other_excludes,
67
87
  cipher=block_cipher,
68
88
  noarchive=False,
69
89
  )
@@ -3,7 +3,7 @@ import sys
3
3
  import multiprocessing as mp
4
4
  from PySide6.QtWidgets import QApplication
5
5
  from syncmoss.syncmoss_main import PhysicsApp
6
- __VERSION__ = "0.2.0"
6
+ __VERSION__ = "0.2.1"
7
7
 
8
8
 
9
9
  def _run_gui_smoke():