NeXpy 2.0.0b9__tar.gz → 2.0.2__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 (139) hide show
  1. nexpy-2.0.2/.github/workflows/ci.yml +41 -0
  2. nexpy-2.0.2/.github/workflows/sphinx.yml +31 -0
  3. {nexpy-2.0.0b9 → nexpy-2.0.2}/.gitignore +6 -1
  4. nexpy-2.0.2/.pre-commit-config.yaml +15 -0
  5. {nexpy-2.0.0b9 → nexpy-2.0.2}/PKG-INFO +64 -12
  6. {nexpy-2.0.0b9 → nexpy-2.0.2}/README.md +47 -5
  7. nexpy-2.0.2/README.rst +193 -0
  8. {nexpy-2.0.0b9 → nexpy-2.0.2}/conda-recipe/meta.yaml +6 -8
  9. nexpy-2.0.2/docs/Makefile +20 -0
  10. nexpy-2.0.2/docs/requirements.txt +3 -0
  11. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/conf.py +69 -65
  12. nexpy-2.0.2/docs/source/images/manage-plugins.png +0 -0
  13. nexpy-2.0.2/docs/source/images/options-tab.png +0 -0
  14. nexpy-2.0.2/docs/source/images/projection-tab.png +0 -0
  15. nexpy-2.0.2/docs/source/images/rotation-plot.png +0 -0
  16. nexpy-2.0.2/docs/source/images/validation-panel.png +0 -0
  17. nexpy-2.0.2/docs/source/index.rst +65 -0
  18. nexpy-2.0.2/docs/source/pythongui.rst +1545 -0
  19. nexpy-2.0.2/docs/source/pythonshell.rst +1361 -0
  20. {nexpy-2.0.0b9 → nexpy-2.0.2}/pyproject.toml +23 -5
  21. nexpy-2.0.2/scripts/sync_copyright.py +48 -0
  22. nexpy-2.0.2/scripts/update_copyright.py +33 -0
  23. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/NeXpy.egg-info/PKG-INFO +64 -12
  24. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/NeXpy.egg-info/SOURCES.txt +43 -32
  25. nexpy-2.0.2/src/NeXpy.egg-info/dependency_links.txt +1 -0
  26. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/NeXpy.egg-info/requires.txt +18 -4
  27. nexpy-2.0.2/src/NeXpy.egg-info/scm_file_list.json +112 -0
  28. nexpy-2.0.2/src/NeXpy.egg-info/scm_version.json +8 -0
  29. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/__init__.py +1 -1
  30. nexpy-2.0.2/src/nexpy/_version.py +24 -0
  31. nexpy-2.0.2/src/nexpy/examples/plugins/README.rst +46 -0
  32. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/consoleapp.py +18 -6
  33. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/datadialogs.py +1 -1
  34. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/dialogs.py +108 -52
  35. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/fitdialogs.py +5 -106
  36. nexpy-2.0.2/src/nexpy/gui/importdialog.py +144 -0
  37. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/mainwindow.py +82 -82
  38. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/plotview.py +128 -31
  39. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/pyqt.py +6 -6
  40. nexpy-2.0.2/src/nexpy/gui/resources/tree-link.svg +6 -0
  41. nexpy-2.0.2/src/nexpy/gui/resources/tree-lock.svg +5 -0
  42. nexpy-2.0.2/src/nexpy/gui/resources/tree-modified.svg +5 -0
  43. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/scripteditor.py +5 -4
  44. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/treeview.py +95 -54
  45. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/utils.py +61 -51
  46. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/widgets.py +320 -124
  47. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/nexpygui.py +10 -5
  48. nexpy-2.0.2/src/nexpy/readers/readnpy.py +57 -0
  49. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/readers/readspec.py +6 -10
  50. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/readers/readstack.py +7 -10
  51. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/readers/readtiff.py +7 -11
  52. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/readers/readtxt.py +124 -64
  53. nexpy-2.0.2/tests/test_imports.py +25 -0
  54. nexpy-2.0.0b9/.github/workflows/ci.yml +0 -25
  55. nexpy-2.0.0b9/README.rst +0 -167
  56. nexpy-2.0.0b9/doc/Makefile +0 -156
  57. nexpy-2.0.0b9/doc/source/images/options-tab.png +0 -0
  58. nexpy-2.0.0b9/doc/source/images/projection-tab.png +0 -0
  59. nexpy-2.0.0b9/doc/source/index.rst +0 -36
  60. nexpy-2.0.0b9/doc/source/pythongui.rst +0 -1423
  61. nexpy-2.0.0b9/doc/source/pythonshell.rst +0 -1202
  62. nexpy-2.0.0b9/src/nexpy/_version.py +0 -34
  63. nexpy-2.0.0b9/src/nexpy/examples/plugins/README.rst +0 -42
  64. nexpy-2.0.0b9/src/nexpy/gui/importdialog.py +0 -58
  65. nexpy-2.0.0b9/src/nexpy/gui/resources/link-icon.png +0 -0
  66. nexpy-2.0.0b9/src/nexpy/gui/resources/lock-icon.png +0 -0
  67. nexpy-2.0.0b9/src/nexpy/gui/resources/lock-red-icon.png +0 -0
  68. nexpy-2.0.0b9/src/nexpy/readers/readnpy.py +0 -49
  69. nexpy-2.0.0b9/tests/test_imports.py +0 -33
  70. {nexpy-2.0.0b9 → nexpy-2.0.2}/.gitattributes +0 -0
  71. {nexpy-2.0.0b9 → nexpy-2.0.2}/.github/dependabot.yaml +0 -0
  72. {nexpy-2.0.0b9 → nexpy-2.0.2}/COPYING +0 -0
  73. {nexpy-2.0.0b9 → nexpy-2.0.2}/conda-recipe/bld.bat +0 -0
  74. {nexpy-2.0.0b9 → nexpy-2.0.2}/conda-recipe/build.sh +0 -0
  75. /nexpy-2.0.0b9/src/NeXpy.egg-info/dependency_links.txt → /nexpy-2.0.2/docs/.nojekyll +0 -0
  76. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/make.bat +0 -0
  77. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/_static/__ignore__.txt +0 -0
  78. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/examples.rst +0 -0
  79. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/favicon.ico +0 -0
  80. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/images/axis-limits-bar.png +0 -0
  81. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/images/customize-panel.png +0 -0
  82. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/images/limits-panel.png +0 -0
  83. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/images/nexpy-fits.png +0 -0
  84. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/images/nexpy-gui.png +0 -0
  85. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/images/nexpy-logo.png +0 -0
  86. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/images/projection-panel.png +0 -0
  87. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/images/scan-panel.png +0 -0
  88. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/images/signal-tab.png +0 -0
  89. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/images/simple-plot.png +0 -0
  90. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/images/skewed-axis.png +0 -0
  91. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/images/x-tab.png +0 -0
  92. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/images/y-tab.png +0 -0
  93. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/images/z-tab.png +0 -0
  94. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/images/z-toolbar.png +0 -0
  95. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/includeme.rst +0 -0
  96. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/readers.rst +0 -0
  97. {nexpy-2.0.0b9/doc → nexpy-2.0.2/docs}/source/treeapi.rst +0 -0
  98. {nexpy-2.0.0b9 → nexpy-2.0.2}/setup.cfg +0 -0
  99. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/NeXpy.egg-info/entry_points.txt +0 -0
  100. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/NeXpy.egg-info/pbr.json +0 -0
  101. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/NeXpy.egg-info/top_level.txt +0 -0
  102. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/examples/README.rst +0 -0
  103. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/examples/chopper.nxs +0 -0
  104. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/examples/example.nxs +0 -0
  105. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/examples/plugins/chopper_plugin/chopper/__init__.py +0 -0
  106. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/examples/plugins/chopper_plugin/chopper/__init__.pyc +0 -0
  107. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/examples/plugins/chopper_plugin/chopper/convert_qe.py +0 -0
  108. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/examples/plugins/chopper_plugin/chopper/convert_qe.pyc +0 -0
  109. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/examples/plugins/chopper_plugin/chopper/get_ei.py +0 -0
  110. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/examples/plugins/chopper_plugin/chopper/get_ei.pyc +0 -0
  111. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/examples/plugins/chopper_plugin/pyproject.toml +0 -0
  112. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/examples/scripts/README.rst +0 -0
  113. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/examples/scripts/chopper_plot.py +0 -0
  114. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/examples/scripts/example.py +0 -0
  115. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/__init__.py +0 -0
  116. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/NeXpy.png +0 -0
  117. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/NeXpy.svg +0 -0
  118. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/back.png +0 -0
  119. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/backward-icon.png +0 -0
  120. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/customize.png +0 -0
  121. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/equal.png +0 -0
  122. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/export-data.png +0 -0
  123. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/export-figure.png +0 -0
  124. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/filesave.png +0 -0
  125. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/forward-icon.png +0 -0
  126. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/forward.png +0 -0
  127. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/hand.png +0 -0
  128. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/home.png +0 -0
  129. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/modify-style.png +0 -0
  130. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/move.png +0 -0
  131. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/pause-icon.png +0 -0
  132. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/refresh-icon.png +0 -0
  133. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/unlock-icon.png +0 -0
  134. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/unlock-red-icon.png +0 -0
  135. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/gui/resources/zoom_to_rect.png +0 -0
  136. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/models/bose.py +0 -0
  137. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/models/critexp.py +0 -0
  138. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/models/op.py +0 -0
  139. {nexpy-2.0.0b9 → nexpy-2.0.2}/src/nexpy/models/pdfdecay.py +0 -0
@@ -0,0 +1,41 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ${{ matrix.os }}
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ # Full Python coverage with PyQt5 and PyQt6 on Linux
18
+ python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
19
+ qt: [pyqt5, pyqt6]
20
+ os: [ubuntu-latest]
21
+ include:
22
+ # Spot-check PySide6 on Linux
23
+ - {python: "3.12", qt: pyside6, os: ubuntu-latest}
24
+ # Spot-check PyQt5 on macOS (Windows has wheel issues)
25
+ - {python: "3.12", qt: pyqt5, os: macos-latest}
26
+ # Spot-check PyQt6 on macOS and Windows
27
+ - {python: "3.12", qt: pyqt6, os: macos-latest}
28
+ - {python: "3.12", qt: pyqt6, os: windows-latest}
29
+
30
+ steps:
31
+ - uses: actions/checkout@v7
32
+ - uses: astral-sh/setup-uv@v7
33
+
34
+ - name: Install Linux display dependencies
35
+ if: runner.os == 'Linux'
36
+ run: sudo apt-get update && sudo apt-get install -y libegl1
37
+
38
+ - name: Run tests
39
+ env:
40
+ QT_QPA_PLATFORM: offscreen
41
+ run: uv run --python ${{ matrix.python }} --extra ${{ matrix.qt }} pytest
@@ -0,0 +1,31 @@
1
+ name: "Sphinx: Render Documentation"
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - 'docs'
8
+ pull_request:
9
+ branches:
10
+ - 'docs'
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ contents: write
17
+ steps:
18
+ - uses: actions/checkout@v7
19
+ - name: Build HTML
20
+ uses: ammaraskar/sphinx-action@master
21
+ - name: Upload artifacts
22
+ uses: actions/upload-artifact@v7
23
+ with:
24
+ name: html-docs
25
+ path: docs/build/html/
26
+ - name: Deploy to GitHub Pages
27
+ uses: peaceiris/actions-gh-pages@v4
28
+ if: ${{github.ref == 'refs/heads/docs'}}
29
+ with:
30
+ github_token: ${{ secrets.GITHUB_TOKEN }}
31
+ publish_dir: docs/build/html
@@ -63,4 +63,9 @@ src/nexpy/_version.py
63
63
 
64
64
  # miscellaneous system files
65
65
  .directoryhash
66
-
66
+
67
+ # uv
68
+ uv.lock
69
+
70
+ # Claude
71
+ .claude
@@ -0,0 +1,15 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.15.6
4
+ hooks:
5
+ - id: ruff-check
6
+ args: [--fix]
7
+
8
+ - repo: local
9
+ hooks:
10
+ - id: update-copyright
11
+ name: Update Copyright Year
12
+ entry: python scripts/update_copyright.py
13
+ language: python
14
+ files: \.py$
15
+ pass_filenames: true
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: NeXpy
3
- Version: 2.0.0b9
3
+ Version: 2.0.2
4
4
  Summary: Python GUI to analyze NeXus data
5
5
  Author-email: Raymond Osborn <rayosborn@mac.com>
6
6
  License: Licensing Terms for NeXpy
@@ -65,30 +65,32 @@ Project-URL: Issues, https://github.com/nexpy/nexpy/issues
65
65
  Project-URL: Documentation, https://nexpy.github.io/nexpy
66
66
  Project-URL: Changelog, https://github.com/nexpy/nexpy/releases
67
67
  Keywords: neutron scattering,x-ray scattering,data analysis,visualization
68
- Classifier: Development Status :: 4 - Beta
68
+ Classifier: Development Status :: 5 - Production/Stable
69
69
  Classifier: License :: OSI Approved :: BSD License
70
70
  Classifier: Intended Audience :: Developers
71
71
  Classifier: Intended Audience :: Science/Research
72
72
  Classifier: Topic :: Scientific/Engineering
73
+ Classifier: Topic :: Scientific/Engineering :: Visualization
73
74
  Classifier: Programming Language :: Python :: 3
74
75
  Classifier: Programming Language :: Python :: 3.9
75
76
  Classifier: Programming Language :: Python :: 3.10
76
77
  Classifier: Programming Language :: Python :: 3.11
77
78
  Classifier: Programming Language :: Python :: 3.12
78
79
  Classifier: Programming Language :: Python :: 3.13
79
- Classifier: Topic :: Scientific/Engineering
80
- Classifier: Topic :: Scientific/Engineering :: Visualization
80
+ Classifier: Programming Language :: Python :: 3.14
81
81
  Requires-Python: >=3.9
82
82
  Description-Content-Type: text/markdown
83
83
  License-File: COPYING
84
84
  Requires-Dist: ansi2html
85
+ Requires-Dist: darkdetect
86
+ Requires-Dist: dateparser
85
87
  Requires-Dist: fabio
86
88
  Requires-Dist: h5py
87
89
  Requires-Dist: ipython
88
90
  Requires-Dist: lmfit
89
91
  Requires-Dist: matplotlib
90
92
  Requires-Dist: mplcursors
91
- Requires-Dist: nexusformat>=2.0.0b6
93
+ Requires-Dist: nexusformat>=2.0.3
92
94
  Requires-Dist: numpy
93
95
  Requires-Dist: packaging
94
96
  Requires-Dist: pillow
@@ -99,10 +101,18 @@ Requires-Dist: qtpy
99
101
  Requires-Dist: scipy
100
102
  Requires-Dist: importlib_metadata; python_version < "3.10"
101
103
  Requires-Dist: importlib_resources; python_version < "3.10"
102
- Provides-Extra: testing
103
- Requires-Dist: pytest; extra == "testing"
104
104
  Provides-Extra: spec
105
105
  Requires-Dist: spec2nexus; extra == "spec"
106
+ Provides-Extra: pyqt5
107
+ Requires-Dist: pyqt5>=5.12; extra == "pyqt5"
108
+ Provides-Extra: pyqt6
109
+ Requires-Dist: pyqt6>=6.2; extra == "pyqt6"
110
+ Provides-Extra: pyside2
111
+ Requires-Dist: pyside2>=5.12; extra == "pyside2"
112
+ Provides-Extra: pyside6
113
+ Requires-Dist: pyside6>=6.2; extra == "pyside6"
114
+ Provides-Extra: qt
115
+ Requires-Dist: nexpy[pyqt5]; extra == "qt"
106
116
  Dynamic: license-file
107
117
 
108
118
  Introduction
@@ -117,24 +127,65 @@ See the [NeXpy documentation](http://nexpy.github.io/nexpy) for more details.
117
127
 
118
128
  Installing and Running
119
129
  ======================
120
- Released versions of NeXpy can be installed using either
130
+ Released versions of NeXpy can be installed into an existing environment using
121
131
 
122
132
  ```
123
133
  $ pip install nexpy
124
134
  ```
125
135
 
126
- or::
136
+ or
127
137
 
128
138
  ```
129
139
  $ conda install -c conda-forge nexpy
130
140
  ```
131
141
 
142
+ NeXpy will only run if a PyQt library (PyQt5, PyQt6, PySide2 or PySide6) is
143
+ also installed. With *pip* (but not *conda*), a Qt binding can also be
144
+ installed as an optional extra package
145
+
146
+ ```
147
+ $ pip install nexpy[qt]
148
+ ```
149
+
150
+ The `[qt]` extra installs PyQt5 as the Qt binding. If you prefer a different
151
+ binding, you can use `[pyqt6]`, `[pyside2]`, or `[pyside6]` instead.
152
+
153
+ NeXpy can be installed in an isolated environment using
154
+
155
+ ```
156
+ $ uv tool install nexpy[qt]
157
+ ```
158
+
159
+ or
160
+
161
+ ```
162
+ $ pipx install nexpy[qt]
163
+ ```
164
+
132
165
  The source code can be downloaded from the NeXpy Git repository:
133
166
 
134
167
  ```
135
168
  $ git clone https://github.com/nexpy/nexpy.git
136
169
  ```
137
170
 
171
+ Once installed, NeXpy can be run from the command line:
172
+
173
+ ```
174
+ $ nexpy -h
175
+ usage: nexpy [-h] [-v] [-r] [-f] [filenames ...]
176
+
177
+ Launch NeXpy
178
+
179
+ positional arguments:
180
+ filenames NeXus file(s) to open on launch (optional)
181
+
182
+ options:
183
+ -h, --help show this help message and exit
184
+ -v, --version show program's version number and exit
185
+ -r, --restore open files from previous session
186
+ -f, --faulthandler enable faulthandler for system crashes
187
+ ```
188
+
138
189
  Prerequisites
139
190
  =============
140
191
  Python Command-Line API
@@ -161,9 +212,10 @@ open file is available if [IPython](https://ipython.org/) is installed.
161
212
 
162
213
  NeXpy GUI
163
214
  ---------
164
- The GUI is built using PyQt. The
165
- [qtpy package](https://github.com/spyder-ide/qtpy) is used to import whatever
166
- PyQt library is installed, whether PyQt5, PyQt6, PySide2, or PySide6.
215
+ The GUI is built using Qt. The
216
+ [qtpy package](https://github.com/spyder-ide/qtpy) is used to import whatever
217
+ Qt binding is installed. One of PyQt5, PyQt6, PySide2, or PySide6 must be
218
+ installed separately (see installation instructions above).
167
219
 
168
220
  The GUI embeds an [IPython shell](http://ipython.org/) and
169
221
  [Matplotlib plotting pane](http://matplotlib.sourceforge.net), within a Qt
@@ -10,24 +10,65 @@ See the [NeXpy documentation](http://nexpy.github.io/nexpy) for more details.
10
10
 
11
11
  Installing and Running
12
12
  ======================
13
- Released versions of NeXpy can be installed using either
13
+ Released versions of NeXpy can be installed into an existing environment using
14
14
 
15
15
  ```
16
16
  $ pip install nexpy
17
17
  ```
18
18
 
19
- or::
19
+ or
20
20
 
21
21
  ```
22
22
  $ conda install -c conda-forge nexpy
23
23
  ```
24
24
 
25
+ NeXpy will only run if a PyQt library (PyQt5, PyQt6, PySide2 or PySide6) is
26
+ also installed. With *pip* (but not *conda*), a Qt binding can also be
27
+ installed as an optional extra package
28
+
29
+ ```
30
+ $ pip install nexpy[qt]
31
+ ```
32
+
33
+ The `[qt]` extra installs PyQt5 as the Qt binding. If you prefer a different
34
+ binding, you can use `[pyqt6]`, `[pyside2]`, or `[pyside6]` instead.
35
+
36
+ NeXpy can be installed in an isolated environment using
37
+
38
+ ```
39
+ $ uv tool install nexpy[qt]
40
+ ```
41
+
42
+ or
43
+
44
+ ```
45
+ $ pipx install nexpy[qt]
46
+ ```
47
+
25
48
  The source code can be downloaded from the NeXpy Git repository:
26
49
 
27
50
  ```
28
51
  $ git clone https://github.com/nexpy/nexpy.git
29
52
  ```
30
53
 
54
+ Once installed, NeXpy can be run from the command line:
55
+
56
+ ```
57
+ $ nexpy -h
58
+ usage: nexpy [-h] [-v] [-r] [-f] [filenames ...]
59
+
60
+ Launch NeXpy
61
+
62
+ positional arguments:
63
+ filenames NeXus file(s) to open on launch (optional)
64
+
65
+ options:
66
+ -h, --help show this help message and exit
67
+ -v, --version show program's version number and exit
68
+ -r, --restore open files from previous session
69
+ -f, --faulthandler enable faulthandler for system crashes
70
+ ```
71
+
31
72
  Prerequisites
32
73
  =============
33
74
  Python Command-Line API
@@ -54,9 +95,10 @@ open file is available if [IPython](https://ipython.org/) is installed.
54
95
 
55
96
  NeXpy GUI
56
97
  ---------
57
- The GUI is built using PyQt. The
58
- [qtpy package](https://github.com/spyder-ide/qtpy) is used to import whatever
59
- PyQt library is installed, whether PyQt5, PyQt6, PySide2, or PySide6.
98
+ The GUI is built using Qt. The
99
+ [qtpy package](https://github.com/spyder-ide/qtpy) is used to import whatever
100
+ Qt binding is installed. One of PyQt5, PyQt6, PySide2, or PySide6 must be
101
+ installed separately (see installation instructions above).
60
102
 
61
103
  The GUI embeds an [IPython shell](http://ipython.org/) and
62
104
  [Matplotlib plotting pane](http://matplotlib.sourceforge.net), within a Qt
nexpy-2.0.2/README.rst ADDED
@@ -0,0 +1,193 @@
1
+ Installation
2
+ ============
3
+ Released versions of NeXpy are available on `PyPI
4
+ <https://pypi.python.org/pypi/NeXpy/>`__ and `conda-forge
5
+ <https://anaconda.org/conda-forge/nexpy>`__.
6
+
7
+ NeXpy can be installed into an existing environment using 'pip'::
8
+
9
+ $ pip install nexpy
10
+
11
+ or 'conda'::
12
+
13
+ $ conda install -c conda-forge nexpy
14
+
15
+ .. note:: You can add conda-forge to your default channels so that it is
16
+ automatically searched when installing. Just type
17
+ ``conda config --add channels conda-forge``.
18
+
19
+ NeXpy will only run if a PyQt library (PyQt5, PyQt6, PySide2 or PySide6) is
20
+ also installed. With 'pip' (but not 'conda'), a Qt binding can also be
21
+ installed as an optional extra package::
22
+
23
+ $ pip install nexpy[qt]
24
+
25
+ The ``[qt]`` extra installs PyQt5 as the Qt binding. If you prefer a different
26
+ binding, you can use ``[pyqt6]``, ``[pyside2]``, or ``[pyside6]`` instead.
27
+
28
+ NeXpy can be installed in an isolated environment using `uv
29
+ <https://docs.astral.sh/uv/>`__::
30
+
31
+ $ uv tool install nexpy[qt]
32
+
33
+ or `pipx <https://pipx.pypa.io/>`__::
34
+
35
+ $ pipx install nexpy[qt]
36
+
37
+ If you have the `Python Setup Tools
38
+ <https://pypi.python.org/pypi/setuptools>`__, you can install the
39
+ package from the source code either by downloading one of the `Github
40
+ releases <https://github.com/nexpy/nexpy/releases>`__ or by cloning the
41
+ latest development version in the `NeXpy Git repository
42
+ <https://github.com/nexpy/nexpy>`__::
43
+
44
+ $ git clone https://github.com/nexpy/nexpy.git
45
+
46
+ Then use standard Python tools to build and/or install a distribution
47
+ from within the source directory::
48
+
49
+ $ python -m build # build a distribution
50
+ $ python -m pip install . # install the package
51
+
52
+ The Python API for reading and writing NeXus files is in a separate
53
+ package, `nexusformat <https://github.com/nexpy/nexusformat>`__, which
54
+ is also available on `PyPI <https://pypi.python.org/pypi/nexusformat>`__
55
+ and `conda-forge <https://anaconda.org/conda-forge/nexusformat>`__.
56
+
57
+ If the NeXpy GUI is not required, the package may be used in any Python
58
+ shell. It may be installed using::
59
+
60
+ $ pip install nexusformat
61
+
62
+ or::
63
+
64
+ $ conda install -c conda-forge nexusformat
65
+
66
+ The package can also be installed from the source code either by
67
+ downloading one of the `Github releases
68
+ <https://github.com/nexpy/nexusformat/releases>`__ or by cloning the
69
+ latest development version in the `NeXpy Git repository
70
+ <https://github.com/nexpy/nexusformat>`__::
71
+
72
+ $ git clone https://github.com/nexpy/nexusformat.git
73
+
74
+ Required Libraries
75
+ ==================
76
+ Python Command-Line API
77
+ -----------------------
78
+ NeXpy provides a GUI interface to the `nexusformat API
79
+ <https://github.com/nexpy/nexusformat>`__, which uses `h5py
80
+ <http://h5py.org>`__ to read and write HDF5 files that implement the
81
+ `NeXus data format standard <https://www.nexusformat.org>`__. It does
82
+ not use the NeXus C API, which means that the current version cannot
83
+ read and write legacy HDF4 or XML NeXus files. One of the `NeXus
84
+ conversion utilities <https://manual.nexusformat.org/utilities.html>`__
85
+ should be used to convert such files to HDF5.
86
+
87
+ If you only intend to utilize the Python API from the command-line, the
88
+ only other required libraries are `NumPy <https://numpy.org>`__ and
89
+ `SciPy <http://scipy.org>`__. Autocompletion of group and field paths
90
+ within an open file is available if `IPython <https://ipython.org/>`__
91
+ is installed.
92
+
93
+ ================= =================================================
94
+ Library URL
95
+ ================= =================================================
96
+ nexusformat https://github.com/nexpy/nexusformat/
97
+ h5py https://www.h5py.org
98
+ numpy https://numpy.org/
99
+ scipy https://scipy.org/
100
+ packaging https://packaging.pypa.io/
101
+ dateutil https://dateutil.readthedocs.io/
102
+ colored https://dslackw.gitlab.io/colored/
103
+ pygments https://pygments.org/
104
+ ================= =================================================
105
+
106
+ NeXpy GUI
107
+ ---------
108
+ The GUI is built using the PyQt. The `qtpy package
109
+ <https://github.com/spyder-ide/qtpy>`__ is used to import whatever PyQt
110
+ library is installed, whether PyQt5, PyQt6, PySide2, or PySide6.
111
+
112
+ NeXpy embeds an `IPython shell <http://ipython.org/>`__ and `Matplotlib
113
+ plotting pane <http://matplotlib.sourceforge.net>`__, within a Qt GUI
114
+ based on the Jupyter QtConsole with an in-process kernel.
115
+
116
+ Least-squares fitting of 1D data uses the `LMFIT package
117
+ <https://lmfit.github.io/lmfit-py/>`__.
118
+
119
+ ================= =================================================
120
+ Library URL
121
+ ================= =================================================
122
+ IPython https://ipython.org/
123
+ qtconsole https://qtconsole.readthedocs.io/
124
+ qtpy https://github.com/spyder-ide/qtpy
125
+ matplotlib https://matplotlib.org/
126
+ lmfit https://lmfit.github.io/lmfit-py/
127
+ fabio https://github.com/silx-kit/fabio
128
+ pillow https://pillow.readthedocs.io/
129
+ pylatexenc https://pylatexenc.readthedocs.io/
130
+ ansi2html https://pypi.python.org/pypi/ansi2html/
131
+ mplcursors https://mplcursors.readthedocs.io/
132
+ ================= =================================================
133
+
134
+ Additional Packages
135
+ -------------------
136
+ Importers may require additional libraries to read the imported files in
137
+ their native format, *e.g.*, `spec2nexus
138
+ <http://spec2nexus.readthedocs.org/>`__ for reading SPEC files.
139
+
140
+ From v0.9.1, a new 2D smoothing option is available in the list of
141
+ interpolations in the signal tab if `astropy <http://www.astropy.org>`__
142
+ is installed. It is labelled 'convolve' and provides, by default, a
143
+ 2-pixel Gaussian smoothing of the data. The number of pixels can be
144
+ changed in the shell by setting ``plotview.smooth``.
145
+
146
+ ================= =================================================
147
+ Library URL
148
+ ================= =================================================
149
+ spec2nexus http://spec2nexus.readthedocs.org/
150
+ astropy http://www.astropy.org/
151
+ ================= =================================================
152
+
153
+ .. note:: NeXpy should still run without these additional packages, but
154
+ invoking the relevant menu items may trigger a warning.
155
+
156
+ Running the GUI
157
+ ---------------
158
+ To run from the installed location, add the $prefix/bin directory to
159
+ your path if you installed outside the python installation, and then
160
+ run::
161
+
162
+ $ nexpy [-r]
163
+
164
+ The -r option restores all files loaded in the previous session.
165
+
166
+ Semantic Versioning
167
+ -------------------
168
+ NeXpy uses `Semantic Versioning <http://semver.org/spec/v2.0.0.html>`__.
169
+
170
+ User Support
171
+ ------------
172
+ Consult the `NeXpy documentation <http://nexpy.github.io/nexpy/>`__ for
173
+ details of both the Python command-line API and how to use the NeXpy
174
+ GUI. If you have any general questions concerning the use of NeXpy,
175
+ please address them to the `NeXus Mailing List
176
+ <http://download.nexusformat.org/doc/html/mailinglist.html>`__. If you
177
+ discover any bugs, please submit a `Github issue
178
+ <https://github.com/nexpy/nexpy/issues>`__, preferably with relevant
179
+ tracebacks.
180
+
181
+ Acknowledgements
182
+ ----------------
183
+ The `NeXus format <http://www.nexusformat.org>`__ for neutron, x-ray and
184
+ muon data is developed by an international collaboration under the
185
+ supervision of the `NeXus International Advisory Committee
186
+ <https://www.nexusformat.org/NIAC.html>`__. The Python tree API used in
187
+ NeXpy was originally developed by Paul Kienzle, who also wrote the
188
+ standard Python interface to the NeXus C-API. The original version of
189
+ NeXpy was initially developed by Boyana Norris, Jason Sarich, and Daniel
190
+ Lowell, and Ray Osborn using wxPython, and formed the inspiration for
191
+ the current PyQt version. Validation of NeXus files was developed by
192
+ Kaitlyn Marlor and Justin Wozniak. I am grateful to Tom Schoonjans for
193
+ installing the packages on conda-forge.
@@ -1,10 +1,10 @@
1
1
  package:
2
2
  name: nexpy
3
- version: "2.0.0"
3
+ version: "2.0.2"
4
4
 
5
5
  source:
6
6
  git_url: https://github.com/nexpy/nexpy.git
7
- git_tag: v2.0.0
7
+ git_tag: v2.0.2
8
8
 
9
9
  build:
10
10
  entry_points:
@@ -21,13 +21,15 @@ requirements:
21
21
  run:
22
22
  - python >= 3.9
23
23
  - ansi2html
24
+ - darkdetect
25
+ - dateparser
24
26
  - fabio
25
27
  - h5py
26
28
  - ipython
27
29
  - lmfit
28
30
  - matplotlib
29
31
  - mplcursors
30
- - nexusformat >= 2.0.0b3
32
+ - nexusformat >= 2.0.3
31
33
  - numpy
32
34
  - packaging
33
35
  - pillow
@@ -40,12 +42,8 @@ requirements:
40
42
  test:
41
43
  imports:
42
44
  - nexpy
43
- - nexpy.api
44
- - nexpy.api.frills
45
- - nexpy.api.frills.models
46
- - nexpy.definitions
47
45
  - nexpy.gui
48
- - nexpy.plugins
46
+ - nexpy.models
49
47
  - nexpy.readers
50
48
 
51
49
  commands:
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = source
9
+ BUILDDIR = build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,3 @@
1
+ furo==2025.12.19
2
+ nexusformat
3
+ nexpy