psk-viewer 0.9.9__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 (40) hide show
  1. psk_viewer-0.9.9/.github/workflows/publish-to-pypi.yml +46 -0
  2. psk_viewer-0.9.9/.gitignore +11 -0
  3. psk_viewer-0.9.9/LICENSE.md +157 -0
  4. psk_viewer-0.9.9/PKG-INFO +155 -0
  5. psk_viewer-0.9.9/README.md +117 -0
  6. psk_viewer-0.9.9/main.py +46 -0
  7. psk_viewer-0.9.9/pyproject.toml +53 -0
  8. psk_viewer-0.9.9/readme.txt +21 -0
  9. psk_viewer-0.9.9/requirements.txt +16 -0
  10. psk_viewer-0.9.9/setup.cfg +4 -0
  11. psk_viewer-0.9.9/setup.py +95 -0
  12. psk_viewer-0.9.9/src/psk_viewer/__init__.py +350 -0
  13. psk_viewer-0.9.9/src/psk_viewer/__main__.py +7 -0
  14. psk_viewer-0.9.9/src/psk_viewer/_version.py +16 -0
  15. psk_viewer-0.9.9/src/psk_viewer/app.py +1641 -0
  16. psk_viewer-0.9.9/src/psk_viewer/averaged fs signal filtered.csv +256 -0
  17. psk_viewer-0.9.9/src/psk_viewer/colorselector.py +47 -0
  18. psk_viewer-0.9.9/src/psk_viewer/data_model.py +261 -0
  19. psk_viewer-0.9.9/src/psk_viewer/detection.py +98 -0
  20. psk_viewer-0.9.9/src/psk_viewer/found_lines_model.py +172 -0
  21. psk_viewer-0.9.9/src/psk_viewer/gui.py +617 -0
  22. psk_viewer-0.9.9/src/psk_viewer/img/main.ico +0 -0
  23. psk_viewer-0.9.9/src/psk_viewer/img/main.svg +14 -0
  24. psk_viewer-0.9.9/src/psk_viewer/open_file_path_entry.py +74 -0
  25. psk_viewer-0.9.9/src/psk_viewer/plot_data_item.py +185 -0
  26. psk_viewer-0.9.9/src/psk_viewer/preferences.py +308 -0
  27. psk_viewer-0.9.9/src/psk_viewer/settings.py +429 -0
  28. psk_viewer-0.9.9/src/psk_viewer/table_view.py +166 -0
  29. psk_viewer-0.9.9/src/psk_viewer/toolbar.py +137 -0
  30. psk_viewer-0.9.9/src/psk_viewer/translations/ru.qm +0 -0
  31. psk_viewer-0.9.9/src/psk_viewer/translations/ru.ts +920 -0
  32. psk_viewer-0.9.9/src/psk_viewer/utils.py +587 -0
  33. psk_viewer-0.9.9/src/psk_viewer/valuelabel.py +113 -0
  34. psk_viewer-0.9.9/src/psk_viewer.egg-info/PKG-INFO +155 -0
  35. psk_viewer-0.9.9/src/psk_viewer.egg-info/SOURCES.txt +38 -0
  36. psk_viewer-0.9.9/src/psk_viewer.egg-info/dependency_links.txt +1 -0
  37. psk_viewer-0.9.9/src/psk_viewer.egg-info/entry_points.txt +2 -0
  38. psk_viewer-0.9.9/src/psk_viewer.egg-info/requires.txt +6 -0
  39. psk_viewer-0.9.9/src/psk_viewer.egg-info/top_level.txt +1 -0
  40. psk_viewer-0.9.9/updater.py +201 -0
@@ -0,0 +1,46 @@
1
+ name: Publish Python distributions to PyPI and TestPyPI
2
+ # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
3
+
4
+ on: push
5
+ jobs:
6
+ build-n-publish:
7
+ name: Build and publish Python distributions to PyPI and TestPyPI
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v4
11
+
12
+ - name: Fetch all history for all tags and branches
13
+ run: |
14
+ git fetch --prune --unshallow
15
+ git fetch --depth=1 origin +refs/tags/*:refs/tags/*
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v4
19
+ with:
20
+ python-version: "3.x"
21
+
22
+ - name: Install pypa/build
23
+ run: >-
24
+ python -m
25
+ pip install
26
+ build
27
+ --user
28
+
29
+ - name: Build a source tarball
30
+ run: >-
31
+ python -m
32
+ build
33
+ --sdist
34
+ --outdir dist/
35
+ .
36
+ - name: Publish distribution to Test PyPI
37
+ uses: pypa/gh-action-pypi-publish@release/v1
38
+ with:
39
+ password: ${{ secrets.TEST_PYPI_API_TOKEN }}
40
+ repository-url: https://test.pypi.org/legacy/
41
+
42
+ - name: Publish distribution to PyPI
43
+ if: startsWith(github.ref, 'refs/tags')
44
+ uses: pypa/gh-action-pypi-publish@release/v1
45
+ with:
46
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,11 @@
1
+ .*
2
+ /.*
3
+ !.gitignore
4
+ !/.github/
5
+ /build/
6
+ /dist/
7
+ /typograph.py
8
+ /deployment/
9
+ /pysidedeploy.spec
10
+ /src/psk_viewer/_version.py
11
+ /src/psk_viewer.egg-info/
@@ -0,0 +1,157 @@
1
+ ### GNU LESSER GENERAL PUBLIC LICENSE
2
+
3
+ Version 3, 29 June 2007
4
+
5
+ Copyright (C) 2007 Free Software Foundation, Inc.
6
+ <https://fsf.org/>
7
+
8
+ Everyone is permitted to copy and distribute verbatim copies of this
9
+ license document, but changing it is not allowed.
10
+
11
+ This version of the GNU Lesser General Public License incorporates the
12
+ terms and conditions of version 3 of the GNU General Public License,
13
+ supplemented by the additional permissions listed below.
14
+
15
+ #### 0. Additional Definitions.
16
+
17
+ As used herein, "this License" refers to version 3 of the GNU Lesser
18
+ General Public License, and the "GNU GPL" refers to version 3 of the
19
+ GNU General Public License.
20
+
21
+ "The Library" refers to a covered work governed by this License, other
22
+ than an Application or a Combined Work as defined below.
23
+
24
+ An "Application" is any work that makes use of an interface provided
25
+ by the Library, but which is not otherwise based on the Library.
26
+ Defining a subclass of a class defined by the Library is deemed a mode
27
+ of using an interface provided by the Library.
28
+
29
+ A "Combined Work" is a work produced by combining or linking an
30
+ Application with the Library. The particular version of the Library
31
+ with which the Combined Work was made is also called the "Linked
32
+ Version".
33
+
34
+ The "Minimal Corresponding Source" for a Combined Work means the
35
+ Corresponding Source for the Combined Work, excluding any source code
36
+ for portions of the Combined Work that, considered in isolation, are
37
+ based on the Application, and not on the Linked Version.
38
+
39
+ The "Corresponding Application Code" for a Combined Work means the
40
+ object code and/or source code for the Application, including any data
41
+ and utility programs needed for reproducing the Combined Work from the
42
+ Application, but excluding the System Libraries of the Combined Work.
43
+
44
+ #### 1. Exception to Section 3 of the GNU GPL.
45
+
46
+ You may convey a covered work under sections 3 and 4 of this License
47
+ without being bound by section 3 of the GNU GPL.
48
+
49
+ #### 2. Conveying Modified Versions.
50
+
51
+ If you modify a copy of the Library, and, in your modifications, a
52
+ facility refers to a function or data to be supplied by an Application
53
+ that uses the facility (other than as an argument passed when the
54
+ facility is invoked), then you may convey a copy of the modified
55
+ version:
56
+
57
+ - a) under this License, provided that you make a good faith effort
58
+ to ensure that, in the event an Application does not supply the
59
+ function or data, the facility still operates, and performs
60
+ whatever part of its purpose remains meaningful, or
61
+ - b) under the GNU GPL, with none of the additional permissions of
62
+ this License applicable to that copy.
63
+
64
+ #### 3. Object Code Incorporating Material from Library Header Files.
65
+
66
+ The object code form of an Application may incorporate material from a
67
+ header file that is part of the Library. You may convey such object
68
+ code under terms of your choice, provided that, if the incorporated
69
+ material is not limited to numerical parameters, data structure
70
+ layouts and accessors, or small macros, inline functions and templates
71
+ (ten or fewer lines in length), you do both of the following:
72
+
73
+ - a) Give prominent notice with each copy of the object code that
74
+ the Library is used in it and that the Library and its use are
75
+ covered by this License.
76
+ - b) Accompany the object code with a copy of the GNU GPL and this
77
+ license document.
78
+
79
+ #### 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that, taken
82
+ together, effectively do not restrict modification of the portions of
83
+ the Library contained in the Combined Work and reverse engineering for
84
+ debugging such modifications, if you also do each of the following:
85
+
86
+ - a) Give prominent notice with each copy of the Combined Work that
87
+ the Library is used in it and that the Library and its use are
88
+ covered by this License.
89
+ - b) Accompany the Combined Work with a copy of the GNU GPL and this
90
+ license document.
91
+ - c) For a Combined Work that displays copyright notices during
92
+ execution, include the copyright notice for the Library among
93
+ these notices, as well as a reference directing the user to the
94
+ copies of the GNU GPL and this license document.
95
+ - d) Do one of the following:
96
+ - 0) Convey the Minimal Corresponding Source under the terms of
97
+ this License, and the Corresponding Application Code in a form
98
+ suitable for, and under terms that permit, the user to
99
+ recombine or relink the Application with a modified version of
100
+ the Linked Version to produce a modified Combined Work, in the
101
+ manner specified by section 6 of the GNU GPL for conveying
102
+ Corresponding Source.
103
+ - 1) Use a suitable shared library mechanism for linking with
104
+ the Library. A suitable mechanism is one that (a) uses at run
105
+ time a copy of the Library already present on the user's
106
+ computer system, and (b) will operate properly with a modified
107
+ version of the Library that is interface-compatible with the
108
+ Linked Version.
109
+ - e) Provide Installation Information, but only if you would
110
+ otherwise be required to provide such information under section 6
111
+ of the GNU GPL, and only to the extent that such information is
112
+ necessary to install and execute a modified version of the
113
+ Combined Work produced by recombining or relinking the Application
114
+ with a modified version of the Linked Version. (If you use option
115
+ 4d0, the Installation Information must accompany the Minimal
116
+ Corresponding Source and Corresponding Application Code. If you
117
+ use option 4d1, you must provide the Installation Information in
118
+ the manner specified by section 6 of the GNU GPL for conveying
119
+ Corresponding Source.)
120
+
121
+ #### 5. Combined Libraries.
122
+
123
+ You may place library facilities that are a work based on the Library
124
+ side by side in a single library together with other library
125
+ facilities that are not Applications and are not covered by this
126
+ License, and convey such a combined library under terms of your
127
+ choice, if you do both of the following:
128
+
129
+ - a) Accompany the combined library with a copy of the same work
130
+ based on the Library, uncombined with any other library
131
+ facilities, conveyed under the terms of this License.
132
+ - b) Give prominent notice with the combined library that part of it
133
+ is a work based on the Library, and explaining where to find the
134
+ accompanying uncombined form of the same work.
135
+
136
+ #### 6. Revised Versions of the GNU Lesser General Public License.
137
+
138
+ The Free Software Foundation may publish revised and/or new versions
139
+ of the GNU Lesser General Public License from time to time. Such new
140
+ versions will be similar in spirit to the present version, but may
141
+ differ in detail to address new problems or concerns.
142
+
143
+ Each version is given a distinguishing version number. If the Library
144
+ as you received it specifies that a certain numbered version of the
145
+ GNU Lesser General Public License "or any later version" applies to
146
+ it, you have the option of following the terms and conditions either
147
+ of that published version or of any later version published by the
148
+ Free Software Foundation. If the Library as you received it does not
149
+ specify a version number of the GNU Lesser General Public License, you
150
+ may choose any version of the GNU Lesser General Public License ever
151
+ published by the Free Software Foundation.
152
+
153
+ If the Library as you received it specifies that a proxy can decide
154
+ whether future versions of the GNU Lesser General Public License shall
155
+ apply, that proxy's public statement of acceptance of any version is
156
+ permanent authorization for you to choose that version for the
157
+ Library.
@@ -0,0 +1,155 @@
1
+ Metadata-Version: 2.1
2
+ Name: psk_viewer
3
+ Version: 0.9.9
4
+ Summary: IPM RAS PSK and FS spectrometer files viewer
5
+ Author-email: StSav012 <stsav012@gmail.com>
6
+ License: LGPL-3.0-only
7
+ Project-URL: Source Code, https://github.com/StSav012/psk_viewer
8
+ Project-URL: Bug Tracker, https://github.com/StSav012/psk_viewer/issues
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Environment :: Win32 (MS Windows)
11
+ Classifier: Environment :: X11 Applications :: Qt
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
14
+ Classifier: Operating System :: Microsoft :: Windows :: Windows 7
15
+ Classifier: Operating System :: Microsoft :: Windows :: Windows 8
16
+ Classifier: Operating System :: Microsoft :: Windows :: Windows 10
17
+ Classifier: Operating System :: Microsoft :: Windows :: Windows 11
18
+ Classifier: Operating System :: POSIX
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Topic :: Scientific/Engineering
24
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
25
+ Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
26
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
27
+ Classifier: Topic :: Scientific/Engineering :: Physics
28
+ Classifier: Typing :: Typed
29
+ Requires-Python: >=3.8
30
+ Description-Content-Type: text/markdown
31
+ License-File: LICENSE.md
32
+ Requires-Dist: qtpy>=2.4.1
33
+ Requires-Dist: qtawesome
34
+ Requires-Dist: PySide6-Essentials>=6.6.2
35
+ Requires-Dist: pandas
36
+ Requires-Dist: pyqtgraph>=0.13.3
37
+ Requires-Dist: scipy
38
+
39
+ # IPM RAS PSK and FS spectrometer files viewer
40
+
41
+ **Required packages:**
42
+ - `pandas`,
43
+ - `pyqtgraph>=0.13.3`,
44
+ - `qtpy>=2.3.1`,
45
+ - `scipy`,
46
+ - any of `PyQt6`, `PySide6`, `PyQt5`, `PySide2`.
47
+
48
+ **Optional packages:**
49
+ - `numexpr`: for accelerating certain numerical operations;
50
+ - `bottleneck`: for accelerating certain types of nan evaluations;
51
+ - `openpyxl`: for saving MS Excel files.
52
+
53
+ They should install at the first application start automatically.
54
+
55
+ **Required Python:** >= 3.8
56
+
57
+ **Notes:**
58
+ - only Python <= 3.8 is available for MS Windows 7, so, there is not much choice for those who use it;
59
+ - `PySide2` requires Python < 3.11;
60
+ there is [a port](https://anaconda.org/conda-forge/pyside2) of `PySide2` on Python 3.11 by `conda-forge`,
61
+ but it's unclear whether it's stable;
62
+ - `PyQt6` and `PySide6` require pretty modern OS, e.g., 64-bit MS Windows 10 21H2 or later;
63
+ - `pyqtgraph<0.13.3` is incompatible with `Qt6>=6.5.0`.
64
+
65
+ ### Getting Python
66
+ Python might already been installed on your system.
67
+ If your system supports repositories, check them first.
68
+ Otherwise, download an appropriate Python distribution (or the source code) from https://www.python.org/downloads/ and install it.
69
+
70
+ It will be convenient to add the Python directory to the `PATH` environment variable to get quick access to the binaries.
71
+
72
+ ### Getting the application
73
+ The source code is available at https://github.com/StSav012/psk_viewer.
74
+
75
+ ###### Use `pip` or another Python package manager
76
+ You can get the code with `pip` (the preferred way):
77
+
78
+ - (optionally) create a virtual environment and activate it,
79
+ - issue
80
+ ```commandline
81
+ pip install psk_viewer
82
+ ```
83
+ in the command line.
84
+
85
+ Then, do
86
+ ```commandline
87
+ pip install -U psk_viewer
88
+ ```
89
+ every time you wish to update the code.
90
+
91
+ ###### Use `git`
92
+ You can get the code with `git`:
93
+
94
+ - navigate to the directory you wish to store the code in,
95
+ - issue
96
+ ```commandline
97
+ git clone https://github.com/StSav012/psk_viewer.git
98
+ ```
99
+ in the command line,
100
+ - find `psk_viewer` directory with the code; feel free to move or rename however you want.
101
+
102
+ Then, do
103
+ ```commandline
104
+ git pull https://github.com/StSav012/psk_viewer.git
105
+ ```
106
+ every time you wish to update the code.
107
+
108
+ ###### Use the official GitHub software
109
+ This way is pretty much like the previous.
110
+
111
+ If you prefer CLI applications, issue
112
+ ```commandline
113
+ gh repo clone StSav012/psk_viewer
114
+ ```
115
+ in the preferred directory.
116
+
117
+ ###### Get a packed archive
118
+ - download the source code archive from https://github.com/StSav012/psk_viewer/archive/master.zip,
119
+ - unpack its content into a directory to your taste.
120
+
121
+ The source code will get updated every time the application starts unless you manually delete `updater.py` file.
122
+
123
+ ### Launching the application
124
+ After the installation via `pip` or another package manager,
125
+ an executable named `psk_viewer` should be available in the environment. That's all.
126
+
127
+ Otherwise, there's more to do.
128
+
129
+ A file called `main.py` should be fed to Python executable.
130
+
131
+ If the file associations set so, the opening of the file should lead to executing the code. Ugly and unsafe.
132
+
133
+ If the Python directory is in `PATH` environment variable, issue something like
134
+ ```commandline
135
+ python main.py
136
+ ```
137
+ Otherwise, use the full path to `python` (or `python3`) executable.
138
+
139
+ Feel free to create an entry to the quick launch or to the desktop to avoid excessive typing.
140
+ The text does not cover this topic anyhow.
141
+
142
+ ### Usage tips
143
+ Parts of the application interface can be moved, re-arranged, and resized.
144
+
145
+ The least evident part of the interface is the toolbar. Its buttons allow you to do the following:
146
+
147
+ - open a data file, either from the FS or the PSK spectrometer, see the selector below the file name;
148
+ - clear everything opened and marked;
149
+ - replace the displayed data with their finite-step second derivative (if appropriate);
150
+ - switch the displayed data between the detector voltage and the absorption values (if appropriate);
151
+ - export the displayed data into a numerical table or as a picture;
152
+ - mark interesting data points, copy the values, save them, or remove the marks;
153
+ - customize colors, lines thickness, and some text formatting.
154
+
155
+ Read the tooltips, they may appear useful.
@@ -0,0 +1,117 @@
1
+ # IPM RAS PSK and FS spectrometer files viewer
2
+
3
+ **Required packages:**
4
+ - `pandas`,
5
+ - `pyqtgraph>=0.13.3`,
6
+ - `qtpy>=2.3.1`,
7
+ - `scipy`,
8
+ - any of `PyQt6`, `PySide6`, `PyQt5`, `PySide2`.
9
+
10
+ **Optional packages:**
11
+ - `numexpr`: for accelerating certain numerical operations;
12
+ - `bottleneck`: for accelerating certain types of nan evaluations;
13
+ - `openpyxl`: for saving MS Excel files.
14
+
15
+ They should install at the first application start automatically.
16
+
17
+ **Required Python:** >= 3.8
18
+
19
+ **Notes:**
20
+ - only Python <= 3.8 is available for MS Windows 7, so, there is not much choice for those who use it;
21
+ - `PySide2` requires Python < 3.11;
22
+ there is [a port](https://anaconda.org/conda-forge/pyside2) of `PySide2` on Python 3.11 by `conda-forge`,
23
+ but it's unclear whether it's stable;
24
+ - `PyQt6` and `PySide6` require pretty modern OS, e.g., 64-bit MS Windows 10 21H2 or later;
25
+ - `pyqtgraph<0.13.3` is incompatible with `Qt6>=6.5.0`.
26
+
27
+ ### Getting Python
28
+ Python might already been installed on your system.
29
+ If your system supports repositories, check them first.
30
+ Otherwise, download an appropriate Python distribution (or the source code) from https://www.python.org/downloads/ and install it.
31
+
32
+ It will be convenient to add the Python directory to the `PATH` environment variable to get quick access to the binaries.
33
+
34
+ ### Getting the application
35
+ The source code is available at https://github.com/StSav012/psk_viewer.
36
+
37
+ ###### Use `pip` or another Python package manager
38
+ You can get the code with `pip` (the preferred way):
39
+
40
+ - (optionally) create a virtual environment and activate it,
41
+ - issue
42
+ ```commandline
43
+ pip install psk_viewer
44
+ ```
45
+ in the command line.
46
+
47
+ Then, do
48
+ ```commandline
49
+ pip install -U psk_viewer
50
+ ```
51
+ every time you wish to update the code.
52
+
53
+ ###### Use `git`
54
+ You can get the code with `git`:
55
+
56
+ - navigate to the directory you wish to store the code in,
57
+ - issue
58
+ ```commandline
59
+ git clone https://github.com/StSav012/psk_viewer.git
60
+ ```
61
+ in the command line,
62
+ - find `psk_viewer` directory with the code; feel free to move or rename however you want.
63
+
64
+ Then, do
65
+ ```commandline
66
+ git pull https://github.com/StSav012/psk_viewer.git
67
+ ```
68
+ every time you wish to update the code.
69
+
70
+ ###### Use the official GitHub software
71
+ This way is pretty much like the previous.
72
+
73
+ If you prefer CLI applications, issue
74
+ ```commandline
75
+ gh repo clone StSav012/psk_viewer
76
+ ```
77
+ in the preferred directory.
78
+
79
+ ###### Get a packed archive
80
+ - download the source code archive from https://github.com/StSav012/psk_viewer/archive/master.zip,
81
+ - unpack its content into a directory to your taste.
82
+
83
+ The source code will get updated every time the application starts unless you manually delete `updater.py` file.
84
+
85
+ ### Launching the application
86
+ After the installation via `pip` or another package manager,
87
+ an executable named `psk_viewer` should be available in the environment. That's all.
88
+
89
+ Otherwise, there's more to do.
90
+
91
+ A file called `main.py` should be fed to Python executable.
92
+
93
+ If the file associations set so, the opening of the file should lead to executing the code. Ugly and unsafe.
94
+
95
+ If the Python directory is in `PATH` environment variable, issue something like
96
+ ```commandline
97
+ python main.py
98
+ ```
99
+ Otherwise, use the full path to `python` (or `python3`) executable.
100
+
101
+ Feel free to create an entry to the quick launch or to the desktop to avoid excessive typing.
102
+ The text does not cover this topic anyhow.
103
+
104
+ ### Usage tips
105
+ Parts of the application interface can be moved, re-arranged, and resized.
106
+
107
+ The least evident part of the interface is the toolbar. Its buttons allow you to do the following:
108
+
109
+ - open a data file, either from the FS or the PSK spectrometer, see the selector below the file name;
110
+ - clear everything opened and marked;
111
+ - replace the displayed data with their finite-step second derivative (if appropriate);
112
+ - switch the displayed data between the detector voltage and the absorption values (if appropriate);
113
+ - export the displayed data into a numerical table or as a picture;
114
+ - mark interesting data points, copy the values, save them, or remove the marks;
115
+ - customize colors, lines thickness, and some text formatting.
116
+
117
+ Read the tooltips, they may appear useful.
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+
7
+ if sys.version_info < (3, 8):
8
+ message = ('The Python version ' + '.'.join(map(str, sys.version_info[:3])) + ' is not supported.\n' +
9
+ 'Use Python 3.8 or newer.')
10
+ try:
11
+ import tkinter
12
+ except ImportError:
13
+ input(message) # wait for the user to see the text
14
+ else:
15
+ print(message, file=sys.stderr)
16
+
17
+ import tkinter.messagebox
18
+
19
+ _root = tkinter.Tk()
20
+ _root.withdraw()
21
+ tkinter.messagebox.showerror(title='Outdated Python', message=message)
22
+ _root.destroy()
23
+
24
+ exit(1)
25
+
26
+ if __name__ == '__main__':
27
+
28
+ try:
29
+ from psk_viewer import main
30
+ except ImportError:
31
+ __author__ = 'StSav012'
32
+ __original_name__ = 'psk_viewer'
33
+
34
+ try:
35
+ from updater import update_with_pip
36
+
37
+ update_with_pip(__original_name__)
38
+
39
+ from psk_viewer import main
40
+ except ImportError:
41
+ from updater import update_with_pip, update_from_github, update_with_git
42
+
43
+ update_with_git() or update_from_github(__author__, __original_name__)
44
+
45
+ from src.psk_viewer import main
46
+ main()
@@ -0,0 +1,53 @@
1
+ [build-system]
2
+ requires = ['setuptools>=45', 'setuptools_scm[toml]>=6.2']
3
+ build-backend = 'setuptools.build_meta'
4
+
5
+ [project]
6
+ name = 'psk_viewer'
7
+ authors = [
8
+ {name = 'StSav012', email = 'stsav012@gmail.com'},
9
+ ]
10
+ description = 'IPM RAS PSK and FS spectrometer files viewer'
11
+ readme = 'README.md'
12
+ license = {text = 'LGPL-3.0-only'}
13
+ requires-python = '>=3.8'
14
+ classifiers = [
15
+ 'Development Status :: 4 - Beta',
16
+ 'Environment :: Win32 (MS Windows)',
17
+ 'Environment :: X11 Applications :: Qt',
18
+ 'Intended Audience :: Science/Research',
19
+ 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
20
+ 'Operating System :: Microsoft :: Windows :: Windows 7',
21
+ 'Operating System :: Microsoft :: Windows :: Windows 8',
22
+ 'Operating System :: Microsoft :: Windows :: Windows 10',
23
+ 'Operating System :: Microsoft :: Windows :: Windows 11',
24
+ 'Operating System :: POSIX',
25
+ 'Programming Language :: Python :: 3.8',
26
+ 'Programming Language :: Python :: 3.9',
27
+ 'Programming Language :: Python :: 3.10',
28
+ 'Programming Language :: Python :: 3.11',
29
+ 'Topic :: Scientific/Engineering',
30
+ 'Topic :: Scientific/Engineering :: Astronomy',
31
+ 'Topic :: Scientific/Engineering :: Atmospheric Science',
32
+ 'Topic :: Scientific/Engineering :: Chemistry',
33
+ 'Topic :: Scientific/Engineering :: Physics',
34
+ 'Typing :: Typed',
35
+ ]
36
+ dynamic = [
37
+ 'version',
38
+ 'dependencies',
39
+ ]
40
+
41
+ [project.gui-scripts]
42
+ psk_viewer = 'psk_viewer:main'
43
+
44
+ [project.urls]
45
+ 'Source Code' = 'https://github.com/StSav012/psk_viewer'
46
+ 'Bug Tracker' = 'https://github.com/StSav012/psk_viewer/issues'
47
+
48
+ [tool.setuptools_scm]
49
+ local_scheme = 'no-local-version'
50
+ write_to = 'src/psk_viewer/_version.py'
51
+
52
+ [tool.setuptools.dynamic]
53
+ version = {attr = 'psk_viewer._version.__version__'}
@@ -0,0 +1,21 @@
1
+ IPM RAS PSK and FS spectrometer files viewer
2
+
3
+ Required packages:
4
+ • pandas,
5
+ • pyqtgraph>=0.13.3,
6
+ • QtPy>=2.3.1,
7
+ • scipy,
8
+ • any of PyQt6 (<6.5.0 if pyqtgraph<0.13.3), PySide6 (<6.5.0 if pyqtgraph<0.13.3), PyQt5, PySide2,
9
+ whichever compatible with the Python and the OS.
10
+
11
+ Optional packages:
12
+ • numexpr: for accelerating certain numerical operations;
13
+ • bottleneck: for accelerating certain types of nan evaluations;
14
+ • openpyxl: for saving MS Excel files.
15
+
16
+ Required Python: >= 3.8
17
+
18
+ For developers. To add a translation, use
19
+ pyside6-lupdate -noobsolete -tr-function-alias translate="_translate" *.py -ts translations/xy.ts
20
+ pyside6-linguist translations/*.ts
21
+ pyside6-lrelease translations/*.ts
@@ -0,0 +1,16 @@
1
+ numpy
2
+ scipy
3
+ pandas
4
+ pyqtgraph>=0.13.3
5
+
6
+ # for the compatibility b/w various Qt versions
7
+ QtPy>=2.3.1
8
+
9
+ # for unified isons
10
+ qtawesome
11
+
12
+ # to save MS Excel files
13
+ openpyxl
14
+
15
+ # to build a package and install it
16
+ setuptools
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+