NeXpy 2.0.1__tar.gz → 2.0.3__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.
- {nexpy-2.0.1 → nexpy-2.0.3}/.github/workflows/ci.yml +2 -2
- {nexpy-2.0.1 → nexpy-2.0.3}/.github/workflows/sphinx.yml +2 -2
- {nexpy-2.0.1 → nexpy-2.0.3}/.gitignore +3 -0
- nexpy-2.0.3/.pre-commit-config.yaml +15 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/PKG-INFO +4 -2
- {nexpy-2.0.1 → nexpy-2.0.3}/conda-recipe/meta.yaml +5 -3
- {nexpy-2.0.1 → nexpy-2.0.3}/pyproject.toml +12 -1
- nexpy-2.0.3/scripts/sync_copyright.py +48 -0
- nexpy-2.0.3/scripts/update_copyright.py +33 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/NeXpy.egg-info/PKG-INFO +4 -2
- {nexpy-2.0.1 → nexpy-2.0.3}/src/NeXpy.egg-info/SOURCES.txt +8 -3
- {nexpy-2.0.1 → nexpy-2.0.3}/src/NeXpy.egg-info/requires.txt +3 -1
- nexpy-2.0.3/src/NeXpy.egg-info/scm_file_list.json +112 -0
- nexpy-2.0.3/src/NeXpy.egg-info/scm_version.json +8 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/__init__.py +1 -1
- nexpy-2.0.3/src/nexpy/_version.py +24 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/consoleapp.py +6 -3
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/datadialogs.py +1 -1
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/dialogs.py +97 -49
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/fitdialogs.py +4 -4
- nexpy-2.0.3/src/nexpy/gui/importdialog.py +144 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/mainwindow.py +42 -28
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/plotview.py +127 -30
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/pyqt.py +2 -2
- nexpy-2.0.3/src/nexpy/gui/resources/tree-link.svg +6 -0
- nexpy-2.0.3/src/nexpy/gui/resources/tree-lock.svg +5 -0
- nexpy-2.0.3/src/nexpy/gui/resources/tree-modified.svg +5 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/scripteditor.py +5 -4
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/treeview.py +99 -53
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/utils.py +55 -15
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/widgets.py +269 -76
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/nexpygui.py +3 -3
- nexpy-2.0.3/src/nexpy/readers/readnpy.py +57 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/readers/readspec.py +6 -10
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/readers/readstack.py +7 -10
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/readers/readtiff.py +7 -11
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/readers/readtxt.py +124 -64
- nexpy-2.0.1/src/nexpy/_version.py +0 -34
- nexpy-2.0.1/src/nexpy/gui/importdialog.py +0 -58
- nexpy-2.0.1/src/nexpy/gui/resources/link-icon.png +0 -0
- nexpy-2.0.1/src/nexpy/gui/resources/lock-icon.png +0 -0
- nexpy-2.0.1/src/nexpy/gui/resources/lock-red-icon.png +0 -0
- nexpy-2.0.1/src/nexpy/readers/readnpy.py +0 -49
- {nexpy-2.0.1 → nexpy-2.0.3}/.gitattributes +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/.github/dependabot.yaml +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/COPYING +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/README.md +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/README.rst +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/conda-recipe/bld.bat +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/conda-recipe/build.sh +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/.nojekyll +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/Makefile +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/make.bat +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/requirements.txt +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/_static/__ignore__.txt +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/conf.py +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/examples.rst +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/favicon.ico +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/axis-limits-bar.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/customize-panel.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/limits-panel.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/manage-plugins.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/nexpy-fits.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/nexpy-gui.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/nexpy-logo.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/options-tab.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/projection-panel.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/projection-tab.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/rotation-plot.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/scan-panel.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/signal-tab.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/simple-plot.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/skewed-axis.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/validation-panel.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/x-tab.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/y-tab.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/z-tab.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/images/z-toolbar.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/includeme.rst +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/index.rst +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/pythongui.rst +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/pythonshell.rst +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/readers.rst +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/docs/source/treeapi.rst +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/setup.cfg +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/NeXpy.egg-info/dependency_links.txt +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/NeXpy.egg-info/entry_points.txt +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/NeXpy.egg-info/pbr.json +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/NeXpy.egg-info/top_level.txt +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/examples/README.rst +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/examples/chopper.nxs +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/examples/example.nxs +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/examples/plugins/README.rst +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/examples/plugins/chopper_plugin/chopper/__init__.py +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/examples/plugins/chopper_plugin/chopper/__init__.pyc +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/examples/plugins/chopper_plugin/chopper/convert_qe.py +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/examples/plugins/chopper_plugin/chopper/convert_qe.pyc +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/examples/plugins/chopper_plugin/chopper/get_ei.py +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/examples/plugins/chopper_plugin/chopper/get_ei.pyc +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/examples/plugins/chopper_plugin/pyproject.toml +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/examples/scripts/README.rst +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/examples/scripts/chopper_plot.py +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/examples/scripts/example.py +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/__init__.py +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/NeXpy.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/NeXpy.svg +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/back.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/backward-icon.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/customize.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/equal.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/export-data.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/export-figure.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/filesave.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/forward-icon.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/forward.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/hand.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/home.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/modify-style.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/move.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/pause-icon.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/refresh-icon.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/unlock-icon.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/unlock-red-icon.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/gui/resources/zoom_to_rect.png +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/models/bose.py +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/models/critexp.py +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/models/op.py +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/src/nexpy/models/pdfdecay.py +0 -0
- {nexpy-2.0.1 → nexpy-2.0.3}/tests/test_imports.py +0 -0
|
@@ -28,8 +28,8 @@ jobs:
|
|
|
28
28
|
- {python: "3.12", qt: pyqt6, os: windows-latest}
|
|
29
29
|
|
|
30
30
|
steps:
|
|
31
|
-
- uses: actions/checkout@
|
|
32
|
-
- uses: astral-sh/setup-uv@
|
|
31
|
+
- uses: actions/checkout@v7
|
|
32
|
+
- uses: astral-sh/setup-uv@v7
|
|
33
33
|
|
|
34
34
|
- name: Install Linux display dependencies
|
|
35
35
|
if: runner.os == 'Linux'
|
|
@@ -15,11 +15,11 @@ jobs:
|
|
|
15
15
|
permissions:
|
|
16
16
|
contents: write
|
|
17
17
|
steps:
|
|
18
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@v7
|
|
19
19
|
- name: Build HTML
|
|
20
20
|
uses: ammaraskar/sphinx-action@master
|
|
21
21
|
- name: Upload artifacts
|
|
22
|
-
uses: actions/upload-artifact@
|
|
22
|
+
uses: actions/upload-artifact@v7
|
|
23
23
|
with:
|
|
24
24
|
name: html-docs
|
|
25
25
|
path: docs/build/html/
|
|
@@ -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.
|
|
3
|
+
Version: 2.0.3
|
|
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
|
|
@@ -82,13 +82,15 @@ 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.
|
|
93
|
+
Requires-Dist: nexusformat>=2.0.3
|
|
92
94
|
Requires-Dist: numpy
|
|
93
95
|
Requires-Dist: packaging
|
|
94
96
|
Requires-Dist: pillow
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
package:
|
|
2
2
|
name: nexpy
|
|
3
|
-
version: "2.0.
|
|
3
|
+
version: "2.0.3"
|
|
4
4
|
|
|
5
5
|
source:
|
|
6
6
|
git_url: https://github.com/nexpy/nexpy.git
|
|
7
|
-
git_tag: v2.0.
|
|
7
|
+
git_tag: v2.0.3
|
|
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.
|
|
32
|
+
- nexusformat >= 2.0.3
|
|
31
33
|
- numpy
|
|
32
34
|
- packaging
|
|
33
35
|
- pillow
|
|
@@ -34,13 +34,15 @@ keywords = [
|
|
|
34
34
|
requires-python = ">=3.9"
|
|
35
35
|
dependencies = [
|
|
36
36
|
"ansi2html",
|
|
37
|
+
"darkdetect",
|
|
38
|
+
"dateparser",
|
|
37
39
|
"fabio",
|
|
38
40
|
"h5py",
|
|
39
41
|
"ipython",
|
|
40
42
|
"lmfit",
|
|
41
43
|
"matplotlib",
|
|
42
44
|
"mplcursors",
|
|
43
|
-
"nexusformat >= 2.0.
|
|
45
|
+
"nexusformat >= 2.0.3",
|
|
44
46
|
"numpy",
|
|
45
47
|
"packaging",
|
|
46
48
|
"pillow",
|
|
@@ -80,3 +82,12 @@ version_file = "src/nexpy/_version.py"
|
|
|
80
82
|
[tool.setuptools.package-data]
|
|
81
83
|
"nexpy.gui.resources" = ["*.*"]
|
|
82
84
|
"nexpy.examples" = ["*.*", "*/*.*", "*/*/*.*", "*/*/*/*.*"]
|
|
85
|
+
|
|
86
|
+
[tool.ruff]
|
|
87
|
+
line-length = 80
|
|
88
|
+
target-version = "py39"
|
|
89
|
+
exclude = ["src/nexusformat/notebooks", "src/examples/scripts"]
|
|
90
|
+
|
|
91
|
+
[tool.ruff.lint]
|
|
92
|
+
select = ["F", "W", "E"]
|
|
93
|
+
ignore = ["F403", "F405", "E721"]
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import re
|
|
2
|
+
import sys
|
|
3
|
+
import subprocess
|
|
4
|
+
|
|
5
|
+
CLEANUP_REGEX = re.compile(r"(#\s*Copyright\s*\(c\)\s*)([^,]+)(,.*)")
|
|
6
|
+
|
|
7
|
+
def get_git_years(filepath):
|
|
8
|
+
try:
|
|
9
|
+
cmd = ["git", "log", "--follow", "--format=%ad", "--date=format:%Y",
|
|
10
|
+
"--", filepath]
|
|
11
|
+
output = subprocess.check_output(
|
|
12
|
+
cmd, stderr=subprocess.STDOUT).decode('utf-8').strip()
|
|
13
|
+
if not output:
|
|
14
|
+
return None, None
|
|
15
|
+
|
|
16
|
+
history = output.splitlines()
|
|
17
|
+
return str(history[-1]), str(history[0])
|
|
18
|
+
except Exception:
|
|
19
|
+
return None, None
|
|
20
|
+
|
|
21
|
+
def sync_file(filepath):
|
|
22
|
+
first, last = get_git_years(filepath)
|
|
23
|
+
if not first:
|
|
24
|
+
return
|
|
25
|
+
|
|
26
|
+
with open(filepath, 'r', encoding='utf-8') as f:
|
|
27
|
+
lines = f.readlines()
|
|
28
|
+
|
|
29
|
+
new_lines = []
|
|
30
|
+
for line in lines:
|
|
31
|
+
match = CLEANUP_REGEX.search(line)
|
|
32
|
+
if match:
|
|
33
|
+
prefix = match.group(1)
|
|
34
|
+
suffix = match.group(3)
|
|
35
|
+
|
|
36
|
+
date_part = f"{first}-{last}" if first != last else f"{first}"
|
|
37
|
+
new_line = f"{prefix}{date_part}{suffix}\n"
|
|
38
|
+
new_lines.append(new_line)
|
|
39
|
+
else:
|
|
40
|
+
new_lines.append(line)
|
|
41
|
+
|
|
42
|
+
with open(filepath, 'w', encoding='utf-8') as f:
|
|
43
|
+
f.writelines(new_lines)
|
|
44
|
+
print(f"Cleaned and Synced: {filepath} ({first}-{last})")
|
|
45
|
+
|
|
46
|
+
if __name__ == "__main__":
|
|
47
|
+
for arg in sys.argv[1:]:
|
|
48
|
+
sync_file(arg)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import re
|
|
2
|
+
import sys
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
|
|
5
|
+
# Current year
|
|
6
|
+
CURRENT_YEAR = str(datetime.now().year)
|
|
7
|
+
COPYRIGHT_REGEX = re.compile(r"(#\s*Copyright\s*\(c\)\s*)(\d{4})(-\d{4})?(.*)")
|
|
8
|
+
|
|
9
|
+
def update_file(filepath):
|
|
10
|
+
with open(filepath, 'r', encoding='utf-8') as f:
|
|
11
|
+
content = f.read()
|
|
12
|
+
|
|
13
|
+
def replace_year(match):
|
|
14
|
+
prefix = match.group(1)
|
|
15
|
+
start_year = match.group(2)
|
|
16
|
+
suffix = match.group(4)
|
|
17
|
+
|
|
18
|
+
if start_year == CURRENT_YEAR:
|
|
19
|
+
return f"{prefix}{start_year}{suffix}"
|
|
20
|
+
|
|
21
|
+
return f"{prefix}{start_year}-{CURRENT_YEAR}{suffix}"
|
|
22
|
+
|
|
23
|
+
new_content = COPYRIGHT_REGEX.sub(replace_year, content)
|
|
24
|
+
|
|
25
|
+
if new_content != content:
|
|
26
|
+
with open(filepath, 'w', encoding='utf-8') as f:
|
|
27
|
+
f.write(new_content)
|
|
28
|
+
return True
|
|
29
|
+
return False
|
|
30
|
+
|
|
31
|
+
if __name__ == "__main__":
|
|
32
|
+
for arg in sys.argv[1:]:
|
|
33
|
+
update_file(arg)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: NeXpy
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.3
|
|
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
|
|
@@ -82,13 +82,15 @@ 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.
|
|
93
|
+
Requires-Dist: nexusformat>=2.0.3
|
|
92
94
|
Requires-Dist: numpy
|
|
93
95
|
Requires-Dist: packaging
|
|
94
96
|
Requires-Dist: pillow
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.gitattributes
|
|
2
2
|
.gitignore
|
|
3
|
+
.pre-commit-config.yaml
|
|
3
4
|
COPYING
|
|
4
5
|
README.md
|
|
5
6
|
README.rst
|
|
@@ -44,12 +45,16 @@ docs/source/images/x-tab.png
|
|
|
44
45
|
docs/source/images/y-tab.png
|
|
45
46
|
docs/source/images/z-tab.png
|
|
46
47
|
docs/source/images/z-toolbar.png
|
|
48
|
+
scripts/sync_copyright.py
|
|
49
|
+
scripts/update_copyright.py
|
|
47
50
|
src/NeXpy.egg-info/PKG-INFO
|
|
48
51
|
src/NeXpy.egg-info/SOURCES.txt
|
|
49
52
|
src/NeXpy.egg-info/dependency_links.txt
|
|
50
53
|
src/NeXpy.egg-info/entry_points.txt
|
|
51
54
|
src/NeXpy.egg-info/pbr.json
|
|
52
55
|
src/NeXpy.egg-info/requires.txt
|
|
56
|
+
src/NeXpy.egg-info/scm_file_list.json
|
|
57
|
+
src/NeXpy.egg-info/scm_version.json
|
|
53
58
|
src/NeXpy.egg-info/top_level.txt
|
|
54
59
|
src/nexpy/__init__.py
|
|
55
60
|
src/nexpy/_version.py
|
|
@@ -94,13 +99,13 @@ src/nexpy/gui/resources/forward-icon.png
|
|
|
94
99
|
src/nexpy/gui/resources/forward.png
|
|
95
100
|
src/nexpy/gui/resources/hand.png
|
|
96
101
|
src/nexpy/gui/resources/home.png
|
|
97
|
-
src/nexpy/gui/resources/link-icon.png
|
|
98
|
-
src/nexpy/gui/resources/lock-icon.png
|
|
99
|
-
src/nexpy/gui/resources/lock-red-icon.png
|
|
100
102
|
src/nexpy/gui/resources/modify-style.png
|
|
101
103
|
src/nexpy/gui/resources/move.png
|
|
102
104
|
src/nexpy/gui/resources/pause-icon.png
|
|
103
105
|
src/nexpy/gui/resources/refresh-icon.png
|
|
106
|
+
src/nexpy/gui/resources/tree-link.svg
|
|
107
|
+
src/nexpy/gui/resources/tree-lock.svg
|
|
108
|
+
src/nexpy/gui/resources/tree-modified.svg
|
|
104
109
|
src/nexpy/gui/resources/unlock-icon.png
|
|
105
110
|
src/nexpy/gui/resources/unlock-red-icon.png
|
|
106
111
|
src/nexpy/gui/resources/zoom_to_rect.png
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": [
|
|
3
|
+
".gitattributes",
|
|
4
|
+
".github/dependabot.yaml",
|
|
5
|
+
".github/workflows/ci.yml",
|
|
6
|
+
".github/workflows/sphinx.yml",
|
|
7
|
+
".gitignore",
|
|
8
|
+
".pre-commit-config.yaml",
|
|
9
|
+
"COPYING",
|
|
10
|
+
"README.md",
|
|
11
|
+
"README.rst",
|
|
12
|
+
"conda-recipe/bld.bat",
|
|
13
|
+
"conda-recipe/build.sh",
|
|
14
|
+
"conda-recipe/meta.yaml",
|
|
15
|
+
"docs/.nojekyll",
|
|
16
|
+
"docs/Makefile",
|
|
17
|
+
"docs/make.bat",
|
|
18
|
+
"docs/requirements.txt",
|
|
19
|
+
"docs/source/_static/__ignore__.txt",
|
|
20
|
+
"docs/source/conf.py",
|
|
21
|
+
"docs/source/examples.rst",
|
|
22
|
+
"docs/source/favicon.ico",
|
|
23
|
+
"docs/source/images/axis-limits-bar.png",
|
|
24
|
+
"docs/source/images/customize-panel.png",
|
|
25
|
+
"docs/source/images/limits-panel.png",
|
|
26
|
+
"docs/source/images/manage-plugins.png",
|
|
27
|
+
"docs/source/images/nexpy-fits.png",
|
|
28
|
+
"docs/source/images/nexpy-gui.png",
|
|
29
|
+
"docs/source/images/nexpy-logo.png",
|
|
30
|
+
"docs/source/images/options-tab.png",
|
|
31
|
+
"docs/source/images/projection-panel.png",
|
|
32
|
+
"docs/source/images/projection-tab.png",
|
|
33
|
+
"docs/source/images/rotation-plot.png",
|
|
34
|
+
"docs/source/images/scan-panel.png",
|
|
35
|
+
"docs/source/images/signal-tab.png",
|
|
36
|
+
"docs/source/images/simple-plot.png",
|
|
37
|
+
"docs/source/images/skewed-axis.png",
|
|
38
|
+
"docs/source/images/validation-panel.png",
|
|
39
|
+
"docs/source/images/x-tab.png",
|
|
40
|
+
"docs/source/images/y-tab.png",
|
|
41
|
+
"docs/source/images/z-tab.png",
|
|
42
|
+
"docs/source/images/z-toolbar.png",
|
|
43
|
+
"docs/source/includeme.rst",
|
|
44
|
+
"docs/source/index.rst",
|
|
45
|
+
"docs/source/pythongui.rst",
|
|
46
|
+
"docs/source/pythonshell.rst",
|
|
47
|
+
"docs/source/readers.rst",
|
|
48
|
+
"docs/source/treeapi.rst",
|
|
49
|
+
"pyproject.toml",
|
|
50
|
+
"scripts/sync_copyright.py",
|
|
51
|
+
"scripts/update_copyright.py",
|
|
52
|
+
"src/nexpy/__init__.py",
|
|
53
|
+
"src/nexpy/examples/README.rst",
|
|
54
|
+
"src/nexpy/examples/chopper.nxs",
|
|
55
|
+
"src/nexpy/examples/example.nxs",
|
|
56
|
+
"src/nexpy/examples/plugins/README.rst",
|
|
57
|
+
"src/nexpy/examples/plugins/chopper_plugin/chopper/__init__.py",
|
|
58
|
+
"src/nexpy/examples/plugins/chopper_plugin/chopper/convert_qe.py",
|
|
59
|
+
"src/nexpy/examples/plugins/chopper_plugin/chopper/get_ei.py",
|
|
60
|
+
"src/nexpy/examples/plugins/chopper_plugin/pyproject.toml",
|
|
61
|
+
"src/nexpy/examples/scripts/README.rst",
|
|
62
|
+
"src/nexpy/examples/scripts/chopper_plot.py",
|
|
63
|
+
"src/nexpy/examples/scripts/example.py",
|
|
64
|
+
"src/nexpy/gui/__init__.py",
|
|
65
|
+
"src/nexpy/gui/consoleapp.py",
|
|
66
|
+
"src/nexpy/gui/datadialogs.py",
|
|
67
|
+
"src/nexpy/gui/dialogs.py",
|
|
68
|
+
"src/nexpy/gui/fitdialogs.py",
|
|
69
|
+
"src/nexpy/gui/importdialog.py",
|
|
70
|
+
"src/nexpy/gui/mainwindow.py",
|
|
71
|
+
"src/nexpy/gui/plotview.py",
|
|
72
|
+
"src/nexpy/gui/pyqt.py",
|
|
73
|
+
"src/nexpy/gui/resources/NeXpy.png",
|
|
74
|
+
"src/nexpy/gui/resources/NeXpy.svg",
|
|
75
|
+
"src/nexpy/gui/resources/back.png",
|
|
76
|
+
"src/nexpy/gui/resources/backward-icon.png",
|
|
77
|
+
"src/nexpy/gui/resources/customize.png",
|
|
78
|
+
"src/nexpy/gui/resources/equal.png",
|
|
79
|
+
"src/nexpy/gui/resources/export-data.png",
|
|
80
|
+
"src/nexpy/gui/resources/export-figure.png",
|
|
81
|
+
"src/nexpy/gui/resources/filesave.png",
|
|
82
|
+
"src/nexpy/gui/resources/forward-icon.png",
|
|
83
|
+
"src/nexpy/gui/resources/forward.png",
|
|
84
|
+
"src/nexpy/gui/resources/hand.png",
|
|
85
|
+
"src/nexpy/gui/resources/home.png",
|
|
86
|
+
"src/nexpy/gui/resources/modify-style.png",
|
|
87
|
+
"src/nexpy/gui/resources/move.png",
|
|
88
|
+
"src/nexpy/gui/resources/pause-icon.png",
|
|
89
|
+
"src/nexpy/gui/resources/refresh-icon.png",
|
|
90
|
+
"src/nexpy/gui/resources/tree-link.svg",
|
|
91
|
+
"src/nexpy/gui/resources/tree-lock.svg",
|
|
92
|
+
"src/nexpy/gui/resources/tree-modified.svg",
|
|
93
|
+
"src/nexpy/gui/resources/unlock-icon.png",
|
|
94
|
+
"src/nexpy/gui/resources/unlock-red-icon.png",
|
|
95
|
+
"src/nexpy/gui/resources/zoom_to_rect.png",
|
|
96
|
+
"src/nexpy/gui/scripteditor.py",
|
|
97
|
+
"src/nexpy/gui/treeview.py",
|
|
98
|
+
"src/nexpy/gui/utils.py",
|
|
99
|
+
"src/nexpy/gui/widgets.py",
|
|
100
|
+
"src/nexpy/models/bose.py",
|
|
101
|
+
"src/nexpy/models/critexp.py",
|
|
102
|
+
"src/nexpy/models/op.py",
|
|
103
|
+
"src/nexpy/models/pdfdecay.py",
|
|
104
|
+
"src/nexpy/nexpygui.py",
|
|
105
|
+
"src/nexpy/readers/readnpy.py",
|
|
106
|
+
"src/nexpy/readers/readspec.py",
|
|
107
|
+
"src/nexpy/readers/readstack.py",
|
|
108
|
+
"src/nexpy/readers/readtiff.py",
|
|
109
|
+
"src/nexpy/readers/readtxt.py",
|
|
110
|
+
"tests/test_imports.py"
|
|
111
|
+
]
|
|
112
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# file generated by vcs-versioning
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"__version__",
|
|
7
|
+
"__version_tuple__",
|
|
8
|
+
"version",
|
|
9
|
+
"version_tuple",
|
|
10
|
+
"__commit_id__",
|
|
11
|
+
"commit_id",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
version: str
|
|
15
|
+
__version__: str
|
|
16
|
+
__version_tuple__: tuple[int | str, ...]
|
|
17
|
+
version_tuple: tuple[int | str, ...]
|
|
18
|
+
commit_id: str | None
|
|
19
|
+
__commit_id__: str | None
|
|
20
|
+
|
|
21
|
+
__version__ = version = '2.0.3'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 0, 3)
|
|
23
|
+
|
|
24
|
+
__commit_id__ = commit_id = 'gdce63b662'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -----------------------------------------------------------------------------
|
|
2
|
-
# Copyright (c) 2013-
|
|
2
|
+
# Copyright (c) 2013-2026, NeXpy Development Team.
|
|
3
3
|
#
|
|
4
4
|
# Distributed under the terms of the Modified BSD License.
|
|
5
5
|
#
|
|
@@ -19,6 +19,7 @@ import sys
|
|
|
19
19
|
import tempfile
|
|
20
20
|
from pathlib import Path
|
|
21
21
|
|
|
22
|
+
from h5py import __version__ as h5py_version
|
|
22
23
|
from IPython import __version__ as ipython_version
|
|
23
24
|
from matplotlib import __version__ as mpl_version
|
|
24
25
|
from nexusformat.nexus import NXroot, nxclasses, nxversion
|
|
@@ -141,6 +142,7 @@ class NXConsoleApp(JupyterQtConsoleApp):
|
|
|
141
142
|
logging.info(QtVersion)
|
|
142
143
|
logging.info('IPython v' + ipython_version)
|
|
143
144
|
logging.info('Matplotlib v' + mpl_version)
|
|
145
|
+
logging.info('h5py v' + h5py_version)
|
|
144
146
|
logging.info('NeXpy v' + nexpy_version)
|
|
145
147
|
logging.info('nexusformat v' + nxversion)
|
|
146
148
|
sys.stdout = sys.stderr = NXLogger()
|
|
@@ -148,7 +150,7 @@ class NXConsoleApp(JupyterQtConsoleApp):
|
|
|
148
150
|
def init_plugins(self):
|
|
149
151
|
"""
|
|
150
152
|
Initialize plugins.
|
|
151
|
-
|
|
153
|
+
|
|
152
154
|
This method looks for plugins stored as files in the NeXpy
|
|
153
155
|
directory or registered as entry points, and adds them to the
|
|
154
156
|
list of plugins in the NeXpy settings file. These will be added
|
|
@@ -182,7 +184,8 @@ class NXConsoleApp(JupyterQtConsoleApp):
|
|
|
182
184
|
f"Python {sys.version}\n"
|
|
183
185
|
f"GUI: {QtVersion} | Shell: IPython v{ipython_version} | "
|
|
184
186
|
f"Graphics: Matplotlib v{mpl_version}\n"
|
|
185
|
-
f"NeXpy v{nexpy_version} |
|
|
187
|
+
f"NeXpy v{nexpy_version} | nexusformat v{nxversion} "
|
|
188
|
+
f"| h5py v{h5py_version}")
|
|
186
189
|
self.config.RichJupyterWidget.include_other_output = False
|
|
187
190
|
self.config.InteractiveShell.banner1 = ""
|
|
188
191
|
self.config.InteractiveShell.banner2 = ""
|