eemkit 0.4.2__tar.gz → 0.5.0__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.
- {eemkit-0.4.2 → eemkit-0.5.0}/CHANGELOG.md +30 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/CITATION.cff +2 -2
- {eemkit-0.4.2 → eemkit-0.5.0}/PKG-INFO +25 -6
- {eemkit-0.4.2 → eemkit-0.5.0}/README.md +24 -5
- eemkit-0.5.0/docs/download.md +82 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/gui.md +21 -1
- eemkit-0.5.0/docs/img/logo-256.png +0 -0
- eemkit-0.5.0/docs/img/logo.svg +10 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/index.md +3 -0
- eemkit-0.5.0/src/eemkit/__init__.py +91 -0
- eemkit-0.5.0/src/eemkit/gui/__init__.py +74 -0
- eemkit-0.5.0/src/eemkit/gui/icons/eemkit-128.png +0 -0
- eemkit-0.5.0/src/eemkit/gui/icons/eemkit-16.png +0 -0
- eemkit-0.5.0/src/eemkit/gui/icons/eemkit-24.png +0 -0
- eemkit-0.5.0/src/eemkit/gui/icons/eemkit-256.png +0 -0
- eemkit-0.5.0/src/eemkit/gui/icons/eemkit-32.png +0 -0
- eemkit-0.5.0/src/eemkit/gui/icons/eemkit-48.png +0 -0
- eemkit-0.5.0/src/eemkit/gui/icons/eemkit-64.png +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/gui/main_window.py +3 -1
- eemkit-0.5.0/src/eemkit/gui/splash.py +92 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_gui.py +27 -0
- eemkit-0.5.0/tests/test_package.py +30 -0
- eemkit-0.4.2/src/eemkit/__init__.py +0 -51
- eemkit-0.4.2/src/eemkit/gui/__init__.py +0 -30
- {eemkit-0.4.2 → eemkit-0.5.0}/.gitignore +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/LICENSE +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/absorbance.md +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/api.md +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/app-guide.md +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/campaigns.md +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/cli.md +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/corrections.md +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/data_model.md +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/img/app/0_readme_parafac_app.png +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/img/app/1_project.png +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/img/app/2_corrections.png +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/img/app/3_indices.png +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/img/app/4a_parafac_ranks.png +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/img/app/4b_parafac_outliers.png +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/img/app/4c_parafac_final.png +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/img/app/4d_parafac_by_model.png +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/img/app/5a_rivers_time.png +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/img/app/5b_rivers_composition.png +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/img/app/5c_rivers_tests.png +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/img/app/6_export.png +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/indices.md +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/instruments.md +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/parafac.md +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/plotting.md +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/docs/quickstart.md +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/pyproject.toml +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/__main__.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/absorbance.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/campaigns.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/cli.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/core/__init__.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/core/dataset.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/core/grid.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/core/history.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/corrections/__init__.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/corrections/_common.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/corrections/blank.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/corrections/crop.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/corrections/dilution.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/corrections/inner_filter.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/corrections/instrument.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/corrections/raman.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/corrections/scatter.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/corrections/spectral.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/corrections/zap.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/errors.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/gui/__main__.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/gui/campaigns_tab.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/gui/common.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/gui/corrections_tab.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/gui/export_tab.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/gui/indices_tab.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/gui/parafac_tab.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/gui/project_tab.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/gui/state.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/gui/theme.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/indices.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/io/__init__.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/io/_cary_csv.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/io/cary60.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/io/cary_eclipse.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/io/discover.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/io/instruments.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/io/loader.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/io/pairing.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/parafac/__init__.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/parafac/_cp.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/parafac/channels.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/parafac/compare.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/parafac/diagnostics.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/parafac/export.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/parafac/model.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/parafac/outliers.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/parafac/validation.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/pipeline.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/plot.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/src/eemkit/report.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/conftest.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/data/eemR/README.md +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/data/eemR/aqualog/sample4.dat +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/data/eemR/eemR_DESCRIPTION.txt +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/data/eemR/fluoromax4/f1.dat +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/data/eemR/fluoromax4/f2.dat +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/data/eemR/fluoromax4/f3.dat +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/data/eemR/hitachi-f7000-fl/hitachi1.TXT +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/data/eemR/hitachi-f7000-fl/hitachi2.TXT +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/data/eemR/shimadzu/shimadzu.TXT +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_absorbance.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_campaigns.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_cary60.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_cary_eclipse.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_channels.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_cli.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_corrections.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_dataset.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_dilution_zap.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_grid.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_indices.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_instruments.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_outliers_report.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_pairing.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_parafac.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_parafac_compare.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_pipeline.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_plot.py +0 -0
- {eemkit-0.4.2 → eemkit-0.5.0}/tests/test_real_data.py +0 -0
|
@@ -3,6 +3,36 @@
|
|
|
3
3
|
All notable changes are listed here. Versions follow
|
|
4
4
|
[semantic versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## 0.5.0 (2026-11-26)
|
|
7
|
+
|
|
8
|
+
The application for macOS and Linux, and a logo. Results do not change.
|
|
9
|
+
|
|
10
|
+
* **Stand-alone application for Windows, macOS and Linux.** Each release now
|
|
11
|
+
has, besides the Windows zip, a build for Apple-silicon Macs
|
|
12
|
+
(`eemkit-vX.Y.Z-macos-arm64.zip`, with `eemkit.app`) and for Linux x86-64
|
|
13
|
+
(`eemkit-vX.Y.Z-linux-x86_64.tar.gz`, glibc 2.35 or newer, with
|
|
14
|
+
`install-desktop-entry.sh` to add it to the applications menu). Every build
|
|
15
|
+
is checked to start before it is attached to the release. The builds are
|
|
16
|
+
not signed: the [download guide](https://lowcostsensor.github.io/eemkit/download/)
|
|
17
|
+
explains how to open them the first time (SmartScreen on Windows, Gatekeeper
|
|
18
|
+
on macOS) and which Qt system libraries Linux may need.
|
|
19
|
+
* **Logo and application icon.** eemkit has a logo, the contour plot of a
|
|
20
|
+
fluorescence peak. It is the icon of the window, the taskbar (also when
|
|
21
|
+
started with `python -m eemkit.gui`), `eemkit.exe` and `eemkit.app`, and the
|
|
22
|
+
logo of the documentation. `packaging/icons/make_icons.py` draws it and
|
|
23
|
+
writes the `.ico`, `.icns` and PNG files.
|
|
24
|
+
* **Start-up screen.** While the application loads (a few seconds), a window
|
|
25
|
+
shows the logo, the version and the institutions that support eemkit:
|
|
26
|
+
Università degli Studi di Siena, Università degli Studi di Palermo and
|
|
27
|
+
National Biodiversity Future Center (Italy); they are also named in
|
|
28
|
+
*Help > About*. `EEMKIT_NO_SPLASH=1` starts without it.
|
|
29
|
+
* `import eemkit` no longer loads every subpackage at once: `eemkit.pipeline`,
|
|
30
|
+
`eemkit.stack` and the other names of the package load on first use (so the
|
|
31
|
+
start-up screen appears before numpy, pandas, xarray and scipy are loaded).
|
|
32
|
+
Code that uses them does not change.
|
|
33
|
+
* The release workflow checks that the release tag matches the version of the
|
|
34
|
+
package and can be run by hand to build the applications without a release.
|
|
35
|
+
|
|
6
36
|
## 0.4.2 (2026-11-25)
|
|
7
37
|
|
|
8
38
|
One fix in the application. Results do not change.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: eemkit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Excitation-emission matrix (EEM) processing and PARAFAC modelling of dissolved organic matter fluorescence
|
|
5
5
|
Project-URL: Homepage, https://github.com/LowCostSensor/eemkit
|
|
6
6
|
Project-URL: Documentation, https://lowcostsensor.github.io/eemkit/
|
|
@@ -42,7 +42,7 @@ Provides-Extra: plot
|
|
|
42
42
|
Requires-Dist: matplotlib>=3.8; extra == 'plot'
|
|
43
43
|
Description-Content-Type: text/markdown
|
|
44
44
|
|
|
45
|
-
# eemkit
|
|
45
|
+
# <img src="https://raw.githubusercontent.com/LowCostSensor/eemkit/main/docs/img/logo-256.png" alt="" width="48" align="left"> eemkit
|
|
46
46
|
|
|
47
47
|
[](https://github.com/LowCostSensor/eemkit/actions/workflows/tests.yml)
|
|
48
48
|
[](https://lowcostsensor.github.io/eemkit/)
|
|
@@ -106,7 +106,28 @@ step recorded so that an analysis can be repeated exactly.
|
|
|
106
106
|
full processing history; one settings file drives both scripts and the
|
|
107
107
|
application.
|
|
108
108
|
|
|
109
|
-
##
|
|
109
|
+
## Download the application (no Python needed)
|
|
110
|
+
|
|
111
|
+
Each [release](https://github.com/LowCostSensor/eemkit/releases/latest) has a
|
|
112
|
+
stand-alone build of the desktop application; download the file for your
|
|
113
|
+
system from the *Assets* list:
|
|
114
|
+
|
|
115
|
+
| System | File | Start |
|
|
116
|
+
|---|---|---|
|
|
117
|
+
| Windows 10 or 11, 64-bit | `eemkit-vX.Y.Z-windows.zip` | Unzip, double-click `eemkit.exe` |
|
|
118
|
+
| macOS, Apple silicon (M1 or later) | `eemkit-vX.Y.Z-macos-arm64.zip` | Unzip, move `eemkit.app` to *Applications* |
|
|
119
|
+
| Linux, x86-64 (glibc 2.35 or newer) | `eemkit-vX.Y.Z-linux-x86_64.tar.gz` | `tar -xzf`, run `eemkit/eemkit` |
|
|
120
|
+
|
|
121
|
+
The builds are not signed. **Windows** may show *Windows protected your PC*:
|
|
122
|
+
click *More info*, then *Run anyway*. **macOS** blocks the first start
|
|
123
|
+
(Gatekeeper): right-click `eemkit.app` and choose *Open*; on macOS 15 and later
|
|
124
|
+
open it once, then click *Open Anyway* in *System Settings > Privacy &
|
|
125
|
+
Security*. **Linux** needs a few Qt system libraries that desktops usually have
|
|
126
|
+
(on Debian or Ubuntu, if it does not start:
|
|
127
|
+
`sudo apt install libxcb-cursor0 libxkbcommon-x11-0 libegl1`). Details are in
|
|
128
|
+
the [download guide](https://lowcostsensor.github.io/eemkit/download/).
|
|
129
|
+
|
|
130
|
+
## Install with Python
|
|
110
131
|
|
|
111
132
|
You need Python 3.11 or later (on Windows, tick *Add python.exe to PATH* when
|
|
112
133
|
installing it). The `[gui]` part adds the desktop application and the
|
|
@@ -123,9 +144,7 @@ python -m eemkit.gui
|
|
|
123
144
|
```
|
|
124
145
|
|
|
125
146
|
For the library alone, leave out `[gui]` (or use `[plot]` for figures
|
|
126
|
-
without the application).
|
|
127
|
-
which needs no Python, is attached to each
|
|
128
|
-
[release](https://github.com/LowCostSensor/eemkit/releases).
|
|
147
|
+
without the application).
|
|
129
148
|
|
|
130
149
|
To update to the latest release:
|
|
131
150
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# eemkit
|
|
1
|
+
# <img src="https://raw.githubusercontent.com/LowCostSensor/eemkit/main/docs/img/logo-256.png" alt="" width="48" align="left"> eemkit
|
|
2
2
|
|
|
3
3
|
[](https://github.com/LowCostSensor/eemkit/actions/workflows/tests.yml)
|
|
4
4
|
[](https://lowcostsensor.github.io/eemkit/)
|
|
@@ -62,7 +62,28 @@ step recorded so that an analysis can be repeated exactly.
|
|
|
62
62
|
full processing history; one settings file drives both scripts and the
|
|
63
63
|
application.
|
|
64
64
|
|
|
65
|
-
##
|
|
65
|
+
## Download the application (no Python needed)
|
|
66
|
+
|
|
67
|
+
Each [release](https://github.com/LowCostSensor/eemkit/releases/latest) has a
|
|
68
|
+
stand-alone build of the desktop application; download the file for your
|
|
69
|
+
system from the *Assets* list:
|
|
70
|
+
|
|
71
|
+
| System | File | Start |
|
|
72
|
+
|---|---|---|
|
|
73
|
+
| Windows 10 or 11, 64-bit | `eemkit-vX.Y.Z-windows.zip` | Unzip, double-click `eemkit.exe` |
|
|
74
|
+
| macOS, Apple silicon (M1 or later) | `eemkit-vX.Y.Z-macos-arm64.zip` | Unzip, move `eemkit.app` to *Applications* |
|
|
75
|
+
| Linux, x86-64 (glibc 2.35 or newer) | `eemkit-vX.Y.Z-linux-x86_64.tar.gz` | `tar -xzf`, run `eemkit/eemkit` |
|
|
76
|
+
|
|
77
|
+
The builds are not signed. **Windows** may show *Windows protected your PC*:
|
|
78
|
+
click *More info*, then *Run anyway*. **macOS** blocks the first start
|
|
79
|
+
(Gatekeeper): right-click `eemkit.app` and choose *Open*; on macOS 15 and later
|
|
80
|
+
open it once, then click *Open Anyway* in *System Settings > Privacy &
|
|
81
|
+
Security*. **Linux** needs a few Qt system libraries that desktops usually have
|
|
82
|
+
(on Debian or Ubuntu, if it does not start:
|
|
83
|
+
`sudo apt install libxcb-cursor0 libxkbcommon-x11-0 libegl1`). Details are in
|
|
84
|
+
the [download guide](https://lowcostsensor.github.io/eemkit/download/).
|
|
85
|
+
|
|
86
|
+
## Install with Python
|
|
66
87
|
|
|
67
88
|
You need Python 3.11 or later (on Windows, tick *Add python.exe to PATH* when
|
|
68
89
|
installing it). The `[gui]` part adds the desktop application and the
|
|
@@ -79,9 +100,7 @@ python -m eemkit.gui
|
|
|
79
100
|
```
|
|
80
101
|
|
|
81
102
|
For the library alone, leave out `[gui]` (or use `[plot]` for figures
|
|
82
|
-
without the application).
|
|
83
|
-
which needs no Python, is attached to each
|
|
84
|
-
[release](https://github.com/LowCostSensor/eemkit/releases).
|
|
103
|
+
without the application).
|
|
85
104
|
|
|
86
105
|
To update to the latest release:
|
|
87
106
|
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Download the application
|
|
2
|
+
|
|
3
|
+
Each [release](https://github.com/LowCostSensor/eemkit/releases/latest) has a
|
|
4
|
+
stand-alone build of the desktop application for Windows, macOS and Linux. It
|
|
5
|
+
needs no Python: download the file for your system from the *Assets* list of
|
|
6
|
+
the release, unpack it and start the application. (To use eemkit from Python
|
|
7
|
+
scripts as well, install it with pip instead: see the
|
|
8
|
+
[quick start](quickstart.md) and [installation](gui.md).)
|
|
9
|
+
|
|
10
|
+
| System | File | Start |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| Windows 10 or 11, 64-bit | `eemkit-vX.Y.Z-windows.zip` | Unzip, then double-click `eemkit.exe` in the `eemkit` folder |
|
|
13
|
+
| macOS on Apple silicon (M1 or later) | `eemkit-vX.Y.Z-macos-arm64.zip` | Unzip, move `eemkit.app` to *Applications*, open it as below |
|
|
14
|
+
| Linux, x86-64 | `eemkit-vX.Y.Z-linux-x86_64.tar.gz` | `tar -xzf eemkit-*.tar.gz`, then `eemkit/eemkit` |
|
|
15
|
+
|
|
16
|
+
Each build is about 150–200 MB unpacked. Keep the files together: on Windows
|
|
17
|
+
and Linux the program (`eemkit.exe`, `eemkit`) needs the `_internal` folder
|
|
18
|
+
next to it. The licence texts of eemkit and of every bundled library
|
|
19
|
+
(`LICENSE.txt`, `LGPL-3.0.txt`, `THIRD-PARTY-NOTICES.txt`) are in the same
|
|
20
|
+
folder, or in `eemkit.app/Contents/Resources/licenses` on macOS.
|
|
21
|
+
|
|
22
|
+
To update, download the build of the new release and replace the old folder
|
|
23
|
+
(or `eemkit.app`). Projects and settings are not stored in it.
|
|
24
|
+
|
|
25
|
+
## Windows
|
|
26
|
+
|
|
27
|
+
The application is not signed with a code-signing certificate, so the first
|
|
28
|
+
time Windows may show *Windows protected your PC* (SmartScreen). Click
|
|
29
|
+
*More info*, then *Run anyway*. To have it in the Start menu, right-click
|
|
30
|
+
`eemkit.exe` and choose *Pin to Start* (or create a shortcut).
|
|
31
|
+
|
|
32
|
+
## macOS
|
|
33
|
+
|
|
34
|
+
The application is not signed with an Apple Developer ID nor notarised, so
|
|
35
|
+
Gatekeeper blocks it the first time ("Apple could not verify that eemkit is
|
|
36
|
+
free of malware", or "the developer cannot be verified"):
|
|
37
|
+
|
|
38
|
+
* **macOS 14 (Sonoma) and earlier:** in *Applications*, right-click (or
|
|
39
|
+
Control-click) `eemkit.app`, choose *Open*, then *Open* again in the dialog.
|
|
40
|
+
* **macOS 15 (Sequoia) and later:** double-click `eemkit.app` once and close the
|
|
41
|
+
message; then go to *System Settings > Privacy & Security*, scroll to
|
|
42
|
+
*Security*, click *Open Anyway* next to the message about eemkit, and confirm
|
|
43
|
+
with your password.
|
|
44
|
+
|
|
45
|
+
macOS remembers the choice: later the application opens with a double-click.
|
|
46
|
+
Alternatively, in Terminal:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
xattr -dr com.apple.quarantine /Applications/eemkit.app
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The build is for Apple silicon Macs (M1 and later). On an Intel Mac install
|
|
53
|
+
eemkit with pip (`python -m pip install "eemkit[gui]"`, then
|
|
54
|
+
`python -m eemkit.gui`).
|
|
55
|
+
|
|
56
|
+
## Linux
|
|
57
|
+
|
|
58
|
+
The build is made on Ubuntu 22.04 and runs on distributions with glibc 2.35 or
|
|
59
|
+
newer (Ubuntu 22.04, Debian 12, Fedora 36, or later). Qt needs a few system
|
|
60
|
+
libraries that a desktop installation usually has; if the application does not
|
|
61
|
+
start, install them:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Debian, Ubuntu and derivatives
|
|
65
|
+
sudo apt install libxcb-cursor0 libxkbcommon-x11-0 libxcb-icccm4 libxcb-keysyms1 libxcb-shape0 libegl1
|
|
66
|
+
# Fedora
|
|
67
|
+
sudo dnf install xcb-util-cursor libxkbcommon-x11 xcb-util-wm xcb-util-keysyms
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`QT_DEBUG_PLUGINS=1 eemkit/eemkit` names the library that is missing. To add
|
|
71
|
+
eemkit to the applications menu (with its icon), run once, from the unpacked
|
|
72
|
+
folder:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
eemkit/install-desktop-entry.sh
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## If the application closes at start-up
|
|
79
|
+
|
|
80
|
+
The reason is written to `eemkit-crash.log` in the temporary folder
|
|
81
|
+
(`%TEMP%` on Windows, `$TMPDIR` on macOS, `/tmp` on Linux). Please attach it to
|
|
82
|
+
an [issue](https://github.com/LowCostSensor/eemkit/issues).
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
# Desktop application
|
|
2
2
|
|
|
3
|
+
A stand-alone build for Windows, macOS and Linux, which needs no Python, can
|
|
4
|
+
be [downloaded](download.md) from each release. With Python:
|
|
5
|
+
|
|
3
6
|
```bash
|
|
4
7
|
python -m pip install "eemkit[gui]"
|
|
5
8
|
python -m eemkit.gui # optionally followed by a project.toml
|
|
6
9
|
```
|
|
7
10
|
|
|
8
11
|
The `eemkit-gui` command does the same as `python -m eemkit.gui` when Python's
|
|
9
|
-
`Scripts` folder is on the PATH.
|
|
12
|
+
`Scripts` folder is on the PATH. While it loads, a start-up screen shows the
|
|
13
|
+
logo, the version and the institutions that support eemkit (Università degli
|
|
14
|
+
Studi di Siena, Università degli Studi di Palermo, National Biodiversity
|
|
15
|
+
Future Center, Italy); set the environment variable `EEMKIT_NO_SPLASH=1` to
|
|
16
|
+
start without it.
|
|
10
17
|
|
|
11
18
|
The application is a front end to `eemkit.pipeline`: it does no processing
|
|
12
19
|
of its own. Its project file is the pipeline's settings TOML, so an analysis
|
|
@@ -90,3 +97,16 @@ on the PATH. On Windows use a short `--distpath` (Qt plugin paths exceed the
|
|
|
90
97
|
260-character limit in deep folders). The Windows build is about 160 MB. If the
|
|
91
98
|
application closes at start-up, the reason is written to `eemkit-crash.log`
|
|
92
99
|
in the temporary folder.
|
|
100
|
+
|
|
101
|
+
Build on each system for that system. The result is `dist/eemkit` (with
|
|
102
|
+
`eemkit.exe` or `eemkit`) on Windows and Linux, and `dist/eemkit.app` on macOS
|
|
103
|
+
(signed ad hoc, without an Apple identity). The release workflow
|
|
104
|
+
(`.github/workflows/release.yml`) does the same on GitHub for Windows, macOS
|
|
105
|
+
on Apple silicon and Linux, checks that each build starts, and attaches the
|
|
106
|
+
archives to the release; run it by hand from the *Actions* tab to build them
|
|
107
|
+
without a release.
|
|
108
|
+
|
|
109
|
+
The icons (`eemkit.ico`, `eemkit.icns`, PNGs) are in `packaging/icons`, made
|
|
110
|
+
from the logo by `python packaging/icons/make_icons.py` (needs Pillow), which
|
|
111
|
+
also writes the window icons in `src/eemkit/gui/icons` and the logo in
|
|
112
|
+
`docs/img`.
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
2
|
+
<title>eemkit</title>
|
|
3
|
+
<rect width="64" height="64" rx="14" fill="#14243d"/>
|
|
4
|
+
<g transform="rotate(-35 32 32)">
|
|
5
|
+
<ellipse cx="32" cy="32" rx="26" ry="15" fill="#2a6fb8"/>
|
|
6
|
+
<ellipse cx="34" cy="32" rx="18" ry="10.5" fill="#22a39a"/>
|
|
7
|
+
<ellipse cx="36" cy="32" rx="10.5" ry="6.5" fill="#9bd645"/>
|
|
8
|
+
<ellipse cx="37" cy="32" rx="4.5" ry="3" fill="#fde34a"/>
|
|
9
|
+
</g>
|
|
10
|
+
</svg>
|
|
@@ -7,6 +7,9 @@ step recorded so that an analysis can be repeated exactly.
|
|
|
7
7
|
|
|
8
8
|

|
|
9
9
|
|
|
10
|
+
The desktop application can be [downloaded](download.md) for Windows, macOS
|
|
11
|
+
and Linux and needs no Python.
|
|
12
|
+
|
|
10
13
|
## Principles
|
|
11
14
|
|
|
12
15
|
* **Nothing silent.** Samples, blanks and absorbance spectra are paired in an
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"""eemkit: EEM processing and PARAFAC modelling of dissolved organic matter fluorescence."""
|
|
2
|
+
|
|
3
|
+
__version__ = "0.5.0"
|
|
4
|
+
|
|
5
|
+
import importlib
|
|
6
|
+
from typing import TYPE_CHECKING
|
|
7
|
+
|
|
8
|
+
from eemkit.errors import (
|
|
9
|
+
Cancelled,
|
|
10
|
+
CorrectionError,
|
|
11
|
+
EEMKitError,
|
|
12
|
+
EEMKitWarning,
|
|
13
|
+
FileFormatError,
|
|
14
|
+
GridError,
|
|
15
|
+
PairingError,
|
|
16
|
+
SettingsError,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
#: Subpackages and functions available as ``eemkit.<name>``. They are imported on
|
|
20
|
+
#: first use (PEP 562), so that ``import eemkit.gui`` can show the start-up screen
|
|
21
|
+
#: before numpy, pandas, xarray and scipy are loaded.
|
|
22
|
+
_SUBMODULES = ("corrections", "indices", "parafac", "pipeline")
|
|
23
|
+
_FUNCTIONS = {
|
|
24
|
+
"stack": "eemkit.core.dataset",
|
|
25
|
+
"infer_common_grid": "eemkit.core.grid",
|
|
26
|
+
"regular_grid": "eemkit.core.grid",
|
|
27
|
+
"resample": "eemkit.core.grid",
|
|
28
|
+
"get_history": "eemkit.core.history",
|
|
29
|
+
"mean_cycles": "eemkit.io.cary60",
|
|
30
|
+
"read_cary60": "eemkit.io.cary60",
|
|
31
|
+
"read_cary_eclipse": "eemkit.io.cary_eclipse",
|
|
32
|
+
"scan_folder": "eemkit.io.discover",
|
|
33
|
+
"suggest_pairing": "eemkit.io.discover",
|
|
34
|
+
"load_dataset": "eemkit.io.loader",
|
|
35
|
+
"read_pairing": "eemkit.io.pairing",
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def __getattr__(name: str):
|
|
40
|
+
if name in _SUBMODULES:
|
|
41
|
+
value = importlib.import_module(f"eemkit.{name}")
|
|
42
|
+
elif name in _FUNCTIONS:
|
|
43
|
+
value = getattr(importlib.import_module(_FUNCTIONS[name]), name)
|
|
44
|
+
else:
|
|
45
|
+
raise AttributeError(f"module 'eemkit' has no attribute {name!r}")
|
|
46
|
+
globals()[name] = value
|
|
47
|
+
return value
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def __dir__() -> list[str]:
|
|
51
|
+
return sorted(set(globals()) | set(__all__))
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
if TYPE_CHECKING: # the same names, for type checkers and editors
|
|
55
|
+
from eemkit import corrections, indices, parafac, pipeline
|
|
56
|
+
from eemkit.core.dataset import stack
|
|
57
|
+
from eemkit.core.grid import infer_common_grid, regular_grid, resample
|
|
58
|
+
from eemkit.core.history import get_history
|
|
59
|
+
from eemkit.io.cary60 import mean_cycles, read_cary60
|
|
60
|
+
from eemkit.io.cary_eclipse import read_cary_eclipse
|
|
61
|
+
from eemkit.io.discover import scan_folder, suggest_pairing
|
|
62
|
+
from eemkit.io.loader import load_dataset
|
|
63
|
+
from eemkit.io.pairing import read_pairing
|
|
64
|
+
|
|
65
|
+
__all__ = [
|
|
66
|
+
"Cancelled",
|
|
67
|
+
"CorrectionError",
|
|
68
|
+
"EEMKitError",
|
|
69
|
+
"EEMKitWarning",
|
|
70
|
+
"FileFormatError",
|
|
71
|
+
"GridError",
|
|
72
|
+
"PairingError",
|
|
73
|
+
"SettingsError",
|
|
74
|
+
"__version__",
|
|
75
|
+
"corrections",
|
|
76
|
+
"get_history",
|
|
77
|
+
"indices",
|
|
78
|
+
"infer_common_grid",
|
|
79
|
+
"load_dataset",
|
|
80
|
+
"mean_cycles",
|
|
81
|
+
"parafac",
|
|
82
|
+
"pipeline",
|
|
83
|
+
"read_cary60",
|
|
84
|
+
"read_cary_eclipse",
|
|
85
|
+
"read_pairing",
|
|
86
|
+
"regular_grid",
|
|
87
|
+
"resample",
|
|
88
|
+
"scan_folder",
|
|
89
|
+
"stack",
|
|
90
|
+
"suggest_pairing",
|
|
91
|
+
]
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""Desktop application for eemkit (requires ``pip install eemkit[gui]``).
|
|
2
|
+
|
|
3
|
+
Start it with ``eemkit-gui [project.toml]`` or ``python -m eemkit.gui``.
|
|
4
|
+
The application is a front end to :mod:`eemkit.pipeline`: all processing
|
|
5
|
+
is done by the library, and the project file it saves is the same settings
|
|
6
|
+
TOML that scripts can run.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import os
|
|
12
|
+
import sys
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
#: PNG renderings of the logo (made by packaging/icons/make_icons.py).
|
|
16
|
+
ICON_DIR = Path(__file__).resolve().parent / "icons"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def app_icon():
|
|
20
|
+
"""The eemkit logo as a QIcon, with one image per size so that small icons stay sharp."""
|
|
21
|
+
from PySide6.QtGui import QIcon
|
|
22
|
+
|
|
23
|
+
icon = QIcon()
|
|
24
|
+
for png in sorted(ICON_DIR.glob("eemkit-*.png")):
|
|
25
|
+
icon.addFile(str(png))
|
|
26
|
+
return icon
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _windows_taskbar_id() -> None:
|
|
30
|
+
"""Give the process its own taskbar identity on Windows.
|
|
31
|
+
|
|
32
|
+
Started with ``python -m eemkit.gui``, the window would otherwise be grouped
|
|
33
|
+
under python.exe and show the Python icon in the taskbar.
|
|
34
|
+
"""
|
|
35
|
+
if sys.platform == "win32":
|
|
36
|
+
try:
|
|
37
|
+
import ctypes
|
|
38
|
+
|
|
39
|
+
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID("eemkit.gui")
|
|
40
|
+
except (AttributeError, OSError): # pragma: no cover
|
|
41
|
+
pass
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def main(argv: list[str] | None = None) -> int:
|
|
45
|
+
try:
|
|
46
|
+
from PySide6.QtWidgets import QApplication
|
|
47
|
+
except ImportError as exc: # pragma: no cover
|
|
48
|
+
print(f"The eemkit desktop application needs PySide6 (pip install eemkit[gui]): {exc}",
|
|
49
|
+
file=sys.stderr)
|
|
50
|
+
return 1
|
|
51
|
+
from eemkit.gui import theme
|
|
52
|
+
|
|
53
|
+
argv = sys.argv if argv is None else argv
|
|
54
|
+
_windows_taskbar_id()
|
|
55
|
+
app = QApplication.instance() or QApplication(argv)
|
|
56
|
+
app.setApplicationName("eemkit")
|
|
57
|
+
app.setDesktopFileName("eemkit") # Linux (Wayland): matches eemkit.desktop
|
|
58
|
+
icon = app_icon()
|
|
59
|
+
app.setWindowIcon(icon)
|
|
60
|
+
splash = None
|
|
61
|
+
if not os.environ.get("EEMKIT_NO_SPLASH"):
|
|
62
|
+
from eemkit.gui import splash as start_screen
|
|
63
|
+
|
|
64
|
+
splash = start_screen.show_splash()
|
|
65
|
+
# The main window loads numpy, pandas, xarray, scipy and matplotlib: the slow part.
|
|
66
|
+
from eemkit.gui.main_window import MainWindow
|
|
67
|
+
|
|
68
|
+
theme.apply_theme(app, theme.saved_theme())
|
|
69
|
+
window = MainWindow(argv[1] if len(argv) > 1 else None)
|
|
70
|
+
window.setWindowIcon(icon)
|
|
71
|
+
window.show()
|
|
72
|
+
if splash is not None:
|
|
73
|
+
start_screen.close_splash(splash, window)
|
|
74
|
+
return app.exec()
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -28,6 +28,7 @@ from eemkit.gui.export_tab import ExportTab
|
|
|
28
28
|
from eemkit.gui.indices_tab import IndicesTab
|
|
29
29
|
from eemkit.gui.parafac_tab import ParafacTab
|
|
30
30
|
from eemkit.gui.project_tab import ProjectTab
|
|
31
|
+
from eemkit.gui.splash import POWERED_BY
|
|
31
32
|
from eemkit.gui.state import Project
|
|
32
33
|
from eemkit.pipeline import versions
|
|
33
34
|
|
|
@@ -47,7 +48,8 @@ Every result can be reproduced from the saved project file with
|
|
|
47
48
|
<code>eemkit.pipeline</code>.<br><br>
|
|
48
49
|
Methods: inner filter, Kothawala et al. 2013; Raman units, Lawaetz & Stedmon 2009;
|
|
49
50
|
PARAFAC and split-half validation, Murphy et al. 2013; core consistency,
|
|
50
|
-
Bro & Kiers 2003, computed as the N-way toolbox (Andersson & Bro 2000)
|
|
51
|
+
Bro & Kiers 2003, computed as the N-way toolbox (Andersson & Bro 2000).<br><br>
|
|
52
|
+
Powered by {', '.join(POWERED_BY[:-1])} and {POWERED_BY[-1]}."""
|
|
51
53
|
|
|
52
54
|
#: Choices of the View > EEM colours menu (names of eemkit.plot.COLORMAPS).
|
|
53
55
|
EEM_COLOURS = {"eclipse": "Cary Eclipse (violet, blue, green, yellow, red)",
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"""The start-up screen: the logo, the version and the institutions behind eemkit.
|
|
2
|
+
|
|
3
|
+
It is shown while the main window loads the scientific libraries (a few
|
|
4
|
+
seconds), and for at least :data:`MIN_SECONDS` so that it does not flash.
|
|
5
|
+
Set ``EEMKIT_NO_SPLASH=1`` to start without it.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import time
|
|
11
|
+
|
|
12
|
+
from PySide6.QtCore import QRectF, Qt, QTimer
|
|
13
|
+
from PySide6.QtGui import QColor, QFont, QGuiApplication, QPainter, QPen, QPixmap
|
|
14
|
+
from PySide6.QtWidgets import QApplication, QSplashScreen, QWidget
|
|
15
|
+
|
|
16
|
+
from eemkit import __version__
|
|
17
|
+
from eemkit.gui import ICON_DIR
|
|
18
|
+
|
|
19
|
+
POWERED_BY = ("Università degli Studi di Siena",
|
|
20
|
+
"Università degli Studi di Palermo",
|
|
21
|
+
"National Biodiversity Future Center (Italy)")
|
|
22
|
+
TAGLINE = "EEM processing and PARAFAC modelling\nof dissolved organic matter fluorescence"
|
|
23
|
+
WIDTH, HEIGHT = 560, 330
|
|
24
|
+
MIN_SECONDS = 1.5
|
|
25
|
+
COLOURS = {"bg": "#ffffff", "border": "#d6dbe1", "title": "#14243d", "text": "#1d232b",
|
|
26
|
+
"muted": "#5b6573", "accent": "#1f5fa8"}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _font(base: QFont, pixels: int, bold: bool = False) -> QFont:
|
|
30
|
+
f = QFont(base)
|
|
31
|
+
f.setPixelSize(pixels)
|
|
32
|
+
f.setBold(bold)
|
|
33
|
+
return f
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def splash_pixmap(ratio: float = 1.0) -> QPixmap:
|
|
37
|
+
"""The start-up image, ``WIDTH`` x ``HEIGHT`` logical pixels at device pixel ratio ``ratio``."""
|
|
38
|
+
pm = QPixmap(round(WIDTH * ratio), round(HEIGHT * ratio))
|
|
39
|
+
pm.setDevicePixelRatio(ratio)
|
|
40
|
+
pm.fill(QColor(COLOURS["bg"]))
|
|
41
|
+
base = QApplication.font()
|
|
42
|
+
p = QPainter(pm)
|
|
43
|
+
p.setRenderHints(QPainter.Antialiasing | QPainter.SmoothPixmapTransform
|
|
44
|
+
| QPainter.TextAntialiasing)
|
|
45
|
+
p.setPen(QPen(QColor(COLOURS["border"]), 1))
|
|
46
|
+
p.drawRect(QRectF(0.5, 0.5, WIDTH - 1, HEIGHT - 1))
|
|
47
|
+
|
|
48
|
+
logo = QPixmap(str(ICON_DIR / "eemkit-256.png"))
|
|
49
|
+
p.drawPixmap(QRectF(40, 44, 132, 132), logo, QRectF(logo.rect()))
|
|
50
|
+
|
|
51
|
+
left = 200
|
|
52
|
+
p.setPen(QColor(COLOURS["title"]))
|
|
53
|
+
p.setFont(_font(base, 44, bold=True))
|
|
54
|
+
p.drawText(QRectF(left, 46, WIDTH - left - 30, 56), Qt.AlignLeft | Qt.AlignVCenter, "eemkit")
|
|
55
|
+
p.setPen(QColor(COLOURS["accent"]))
|
|
56
|
+
p.setFont(_font(base, 14))
|
|
57
|
+
p.drawText(QRectF(left + 2, 102, WIDTH - left - 30, 20), Qt.AlignLeft, f"Version {__version__}")
|
|
58
|
+
p.setPen(QColor(COLOURS["text"]))
|
|
59
|
+
p.setFont(_font(base, 14))
|
|
60
|
+
p.drawText(QRectF(left + 2, 130, WIDTH - left - 30, 44), Qt.AlignLeft | Qt.TextWordWrap,
|
|
61
|
+
TAGLINE)
|
|
62
|
+
|
|
63
|
+
p.setPen(QPen(QColor(COLOURS["border"]), 1))
|
|
64
|
+
p.drawLine(40, 204, WIDTH - 40, 204)
|
|
65
|
+
p.setPen(QColor(COLOURS["muted"]))
|
|
66
|
+
p.setFont(_font(base, 12))
|
|
67
|
+
p.drawText(QRectF(40, 216, WIDTH - 80, 18), Qt.AlignLeft, "Powered by")
|
|
68
|
+
p.setPen(QColor(COLOURS["text"]))
|
|
69
|
+
p.setFont(_font(base, 15, bold=True))
|
|
70
|
+
for i, name in enumerate(POWERED_BY):
|
|
71
|
+
p.drawText(QRectF(40, 238 + 24 * i, WIDTH - 80, 22), Qt.AlignLeft | Qt.AlignVCenter, name)
|
|
72
|
+
p.end()
|
|
73
|
+
return pm
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def show_splash() -> QSplashScreen:
|
|
77
|
+
"""Show the start-up screen now (before the slow imports) and return it."""
|
|
78
|
+
screen = QGuiApplication.primaryScreen()
|
|
79
|
+
ratio = screen.devicePixelRatio() if screen is not None else 1.0
|
|
80
|
+
# On top of the main window, which may appear before MIN_SECONDS have passed.
|
|
81
|
+
splash = QSplashScreen(splash_pixmap(ratio), Qt.WindowStaysOnTopHint)
|
|
82
|
+
splash.shown_at = time.monotonic()
|
|
83
|
+
splash.show()
|
|
84
|
+
splash.showMessage("Starting…", Qt.AlignRight | Qt.AlignBottom, QColor(COLOURS["muted"]))
|
|
85
|
+
QApplication.processEvents()
|
|
86
|
+
return splash
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def close_splash(splash: QSplashScreen, window: QWidget) -> None:
|
|
90
|
+
"""Close the start-up screen once ``window`` is shown, after at least ``MIN_SECONDS``."""
|
|
91
|
+
left = MIN_SECONDS - (time.monotonic() - splash.shown_at)
|
|
92
|
+
QTimer.singleShot(max(0, round(left * 1000)), lambda: splash.finish(window))
|
|
@@ -272,3 +272,30 @@ def test_output_inside_data_folder_is_refused(window, tmp_path):
|
|
|
272
272
|
p.set_path_setting("data_root", tmp_path / "data")
|
|
273
273
|
assert p.in_data_root(tmp_path / "data" / "out")
|
|
274
274
|
assert not p.in_data_root(tmp_path / "out")
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
def test_app_icon(qtbot):
|
|
278
|
+
from eemkit.gui import app_icon
|
|
279
|
+
|
|
280
|
+
icon = app_icon()
|
|
281
|
+
assert not icon.isNull()
|
|
282
|
+
sizes = {s.width() for s in icon.availableSizes()}
|
|
283
|
+
assert {16, 32, 256} <= sizes
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
def test_splash_screen(qtbot, monkeypatch):
|
|
287
|
+
from PySide6.QtWidgets import QWidget
|
|
288
|
+
|
|
289
|
+
from eemkit.gui import splash
|
|
290
|
+
|
|
291
|
+
pm = splash.splash_pixmap(2.0)
|
|
292
|
+
assert not pm.isNull()
|
|
293
|
+
assert (pm.width(), pm.height()) == (2 * splash.WIDTH, 2 * splash.HEIGHT)
|
|
294
|
+
monkeypatch.setattr(splash, "MIN_SECONDS", 0)
|
|
295
|
+
screen = splash.show_splash()
|
|
296
|
+
assert screen.isVisible()
|
|
297
|
+
window = QWidget()
|
|
298
|
+
qtbot.addWidget(window)
|
|
299
|
+
window.show()
|
|
300
|
+
splash.close_splash(screen, window)
|
|
301
|
+
qtbot.waitUntil(lambda: not screen.isVisible(), timeout=5000)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""The package namespace: names load on first use, and import eemkit stays light."""
|
|
2
|
+
|
|
3
|
+
import subprocess
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
import eemkit
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def test_public_names_resolve():
|
|
10
|
+
for name in eemkit.__all__:
|
|
11
|
+
assert getattr(eemkit, name) is not None
|
|
12
|
+
assert eemkit.stack.__module__ == "eemkit.core.dataset"
|
|
13
|
+
assert "pipeline" in dir(eemkit)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def test_unknown_name():
|
|
17
|
+
try:
|
|
18
|
+
eemkit.no_such_name # noqa: B018
|
|
19
|
+
except AttributeError as exc:
|
|
20
|
+
assert "no_such_name" in str(exc)
|
|
21
|
+
else:
|
|
22
|
+
raise AssertionError("expected AttributeError")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def test_gui_package_import_is_light():
|
|
26
|
+
"""The application shows its start-up screen before the scientific libraries load."""
|
|
27
|
+
code = ("import sys, eemkit, eemkit.gui; "
|
|
28
|
+
"print(sorted(m for m in ('numpy', 'pandas', 'xarray', 'scipy') if m in sys.modules))")
|
|
29
|
+
out = subprocess.run([sys.executable, "-c", code], capture_output=True, text=True, check=True)
|
|
30
|
+
assert out.stdout.strip() == "[]"
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"""eemkit: EEM processing and PARAFAC modelling of dissolved organic matter fluorescence."""
|
|
2
|
-
|
|
3
|
-
__version__ = "0.4.2"
|
|
4
|
-
|
|
5
|
-
from eemkit import corrections, indices, parafac, pipeline
|
|
6
|
-
from eemkit.core.dataset import stack
|
|
7
|
-
from eemkit.core.grid import infer_common_grid, regular_grid, resample
|
|
8
|
-
from eemkit.core.history import get_history
|
|
9
|
-
from eemkit.errors import (
|
|
10
|
-
Cancelled,
|
|
11
|
-
CorrectionError,
|
|
12
|
-
EEMKitError,
|
|
13
|
-
EEMKitWarning,
|
|
14
|
-
FileFormatError,
|
|
15
|
-
GridError,
|
|
16
|
-
PairingError,
|
|
17
|
-
SettingsError,
|
|
18
|
-
)
|
|
19
|
-
from eemkit.io.cary60 import mean_cycles, read_cary60
|
|
20
|
-
from eemkit.io.cary_eclipse import read_cary_eclipse
|
|
21
|
-
from eemkit.io.discover import scan_folder, suggest_pairing
|
|
22
|
-
from eemkit.io.loader import load_dataset
|
|
23
|
-
from eemkit.io.pairing import read_pairing
|
|
24
|
-
|
|
25
|
-
__all__ = [
|
|
26
|
-
"Cancelled",
|
|
27
|
-
"CorrectionError",
|
|
28
|
-
"EEMKitError",
|
|
29
|
-
"EEMKitWarning",
|
|
30
|
-
"FileFormatError",
|
|
31
|
-
"GridError",
|
|
32
|
-
"PairingError",
|
|
33
|
-
"SettingsError",
|
|
34
|
-
"__version__",
|
|
35
|
-
"corrections",
|
|
36
|
-
"get_history",
|
|
37
|
-
"indices",
|
|
38
|
-
"infer_common_grid",
|
|
39
|
-
"load_dataset",
|
|
40
|
-
"mean_cycles",
|
|
41
|
-
"parafac",
|
|
42
|
-
"pipeline",
|
|
43
|
-
"read_cary60",
|
|
44
|
-
"read_cary_eclipse",
|
|
45
|
-
"read_pairing",
|
|
46
|
-
"regular_grid",
|
|
47
|
-
"resample",
|
|
48
|
-
"scan_folder",
|
|
49
|
-
"stack",
|
|
50
|
-
"suggest_pairing",
|
|
51
|
-
]
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"""Desktop application for eemkit (requires ``pip install eemkit[gui]``).
|
|
2
|
-
|
|
3
|
-
Start it with ``eemkit-gui [project.toml]`` or ``python -m eemkit.gui``.
|
|
4
|
-
The application is a front end to :mod:`eemkit.pipeline`: all processing
|
|
5
|
-
is done by the library, and the project file it saves is the same settings
|
|
6
|
-
TOML that scripts can run.
|
|
7
|
-
"""
|
|
8
|
-
|
|
9
|
-
from __future__ import annotations
|
|
10
|
-
|
|
11
|
-
import sys
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def main(argv: list[str] | None = None) -> int:
|
|
15
|
-
try:
|
|
16
|
-
from PySide6.QtWidgets import QApplication
|
|
17
|
-
except ImportError as exc: # pragma: no cover
|
|
18
|
-
print(f"The eemkit desktop application needs PySide6 (pip install eemkit[gui]): {exc}",
|
|
19
|
-
file=sys.stderr)
|
|
20
|
-
return 1
|
|
21
|
-
from eemkit.gui import theme
|
|
22
|
-
from eemkit.gui.main_window import MainWindow
|
|
23
|
-
|
|
24
|
-
argv = sys.argv if argv is None else argv
|
|
25
|
-
app = QApplication.instance() or QApplication(argv)
|
|
26
|
-
app.setApplicationName("eemkit")
|
|
27
|
-
theme.apply_theme(app, theme.saved_theme())
|
|
28
|
-
window = MainWindow(argv[1] if len(argv) > 1 else None)
|
|
29
|
-
window.show()
|
|
30
|
-
return app.exec()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|