TemDataBrowser 1.2__tar.gz → 1.4__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 (30) hide show
  1. {temdatabrowser-1.2 → temdatabrowser-1.4}/.github/workflows/publish-to-pypi.yml +7 -5
  2. temdatabrowser-1.4/.github/workflows/tests.yml +53 -0
  3. temdatabrowser-1.4/LICENSE +21 -0
  4. temdatabrowser-1.4/PKG-INFO +93 -0
  5. temdatabrowser-1.4/README.md +58 -0
  6. temdatabrowser-1.4/TemDataBrowser/__init__.py +783 -0
  7. temdatabrowser-1.4/TemDataBrowser/fft_plugin.py +584 -0
  8. temdatabrowser-1.4/TemDataBrowser/mcp_server.py +1015 -0
  9. temdatabrowser-1.4/TemDataBrowser.egg-info/PKG-INFO +93 -0
  10. {temdatabrowser-1.2 → temdatabrowser-1.4}/TemDataBrowser.egg-info/SOURCES.txt +10 -1
  11. temdatabrowser-1.4/TemDataBrowser.egg-info/requires.txt +19 -0
  12. temdatabrowser-1.4/TemDataBrowser.egg-info/scm_file_list.json +18 -0
  13. temdatabrowser-1.4/TemDataBrowser.egg-info/scm_version.json +8 -0
  14. temdatabrowser-1.4/pyproject.toml +50 -0
  15. temdatabrowser-1.4/tests/test_fft_plugin.py +199 -0
  16. temdatabrowser-1.4/tests/test_mcp_server.py +422 -0
  17. temdatabrowser-1.4/tests/test_quick_fixes.py +185 -0
  18. temdatabrowser-1.2/PKG-INFO +0 -45
  19. temdatabrowser-1.2/README.md +0 -31
  20. temdatabrowser-1.2/TemDataBrowser/__init__.py +0 -306
  21. temdatabrowser-1.2/TemDataBrowser.egg-info/PKG-INFO +0 -45
  22. temdatabrowser-1.2/TemDataBrowser.egg-info/requires.txt +0 -6
  23. temdatabrowser-1.2/pyproject.toml +0 -15
  24. {temdatabrowser-1.2 → temdatabrowser-1.4}/.gitignore +0 -0
  25. {temdatabrowser-1.2 → temdatabrowser-1.4}/TemDataBrowser/images/TemDataBrowser_window.png +0 -0
  26. {temdatabrowser-1.2 → temdatabrowser-1.4}/TemDataBrowser.egg-info/dependency_links.txt +0 -0
  27. {temdatabrowser-1.2 → temdatabrowser-1.4}/TemDataBrowser.egg-info/entry_points.txt +0 -0
  28. {temdatabrowser-1.2 → temdatabrowser-1.4}/TemDataBrowser.egg-info/top_level.txt +0 -0
  29. {temdatabrowser-1.2 → temdatabrowser-1.4}/run_TemDataBrowser.py +0 -0
  30. {temdatabrowser-1.2 → temdatabrowser-1.4}/setup.cfg +0 -0
@@ -11,9 +11,11 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
 
13
13
  steps:
14
- - uses: actions/checkout@v4
14
+ - uses: actions/checkout@v7
15
+ with:
16
+ fetch-depth: 0
15
17
  - name: Set up Python
16
- uses: actions/setup-python@v5
18
+ uses: actions/setup-python@v7
17
19
  with:
18
20
  python-version: "3.x"
19
21
  - name: Install pypa/build
@@ -25,7 +27,7 @@ jobs:
25
27
  - name: Build a binary wheel and a source tarball
26
28
  run: python -m build
27
29
  - name: Store the distribution packages
28
- uses: actions/upload-artifact@v4
30
+ uses: actions/upload-artifact@v7
29
31
  with:
30
32
  name: python-package-distributions
31
33
  path: dist/
@@ -47,7 +49,7 @@ jobs:
47
49
 
48
50
  steps:
49
51
  - name: Download all the dists
50
- uses: actions/download-artifact@v4
52
+ uses: actions/download-artifact@v8
51
53
  with:
52
54
  name: python-package-distributions
53
55
  path: dist/
@@ -76,7 +78,7 @@ jobs:
76
78
 
77
79
  steps:
78
80
  - name: Download all the dists
79
- uses: actions/download-artifact@v4
81
+ uses: actions/download-artifact@v8
80
82
  with:
81
83
  name: python-package-distributions
82
84
  path: dist/
@@ -0,0 +1,53 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ tags: ["v*"]
7
+ pull_request:
8
+ branches: [main]
9
+ workflow_dispatch:
10
+
11
+ env:
12
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
13
+ QT_QPA_PLATFORM: offscreen
14
+
15
+ jobs:
16
+ test:
17
+ name: pytest (Python ${{ matrix.python-version }})
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
23
+
24
+ steps:
25
+ - uses: actions/checkout@v7
26
+ with:
27
+ fetch-depth: 0
28
+
29
+ - name: Set up Python ${{ matrix.python-version }}
30
+ uses: actions/setup-python@v7
31
+ with:
32
+ python-version: ${{ matrix.python-version }}
33
+ cache: pip
34
+
35
+ - name: Install Qt6 headless system libraries
36
+ run: |
37
+ sudo apt-get update
38
+ sudo apt-get install -y --no-install-recommends \
39
+ libegl1 libgl1 libxkbcommon0 libdbus-1-3 libfontconfig1
40
+
41
+ - name: Install base package and test dependencies (without MCP)
42
+ run: |
43
+ python -m pip install --upgrade pip
44
+ pip install -e ".[test]"
45
+
46
+ - name: Run core tests (without fastmcp)
47
+ run: pytest tests/test_quick_fixes.py tests/test_fft_plugin.py -v
48
+
49
+ - name: Install MCP optional dependencies
50
+ run: pip install -e ".[mcp,test]"
51
+
52
+ - name: Run full test suite (including MCP)
53
+ run: pytest tests/ -v
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Peter Ercius
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Metadata-Version: 2.4
2
+ Name: TemDataBrowser
3
+ Version: 1.4
4
+ Summary: Graphical user interface to view transmission electron microscopy data.
5
+ Author-email: Peter Ercius <percius@lbl.gov>
6
+ License-Expression: MIT
7
+ Project-URL: Repository, https://github.com/ercius/TemDataBrowser
8
+ Project-URL: Homepage, https://github.com/ercius/TemDataBrowser
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Topic :: Scientific/Engineering :: Visualization
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: numpy
22
+ Requires-Dist: pyqtgraph
23
+ Requires-Dist: qtpy
24
+ Requires-Dist: ScopeFoundry<2.3,>=1.5; python_version < "3.13"
25
+ Requires-Dist: ScopeFoundry>=1.5; python_version >= "3.13"
26
+ Requires-Dist: ncempy>=1.15
27
+ Requires-Dist: scipy
28
+ Requires-Dist: imageio>2.17
29
+ Provides-Extra: mcp
30
+ Requires-Dist: fastmcp>=2.12.2; extra == "mcp"
31
+ Provides-Extra: test
32
+ Requires-Dist: pytest; extra == "test"
33
+ Requires-Dist: PyQt6; extra == "test"
34
+ Dynamic: license-file
35
+
36
+ # TemDataBrowser
37
+ A graphical user interface based on ScopeFoundry for viewing TEM data.
38
+
39
+ ![GUI example](TemDataBrowser/images/TemDataBrowser_window.png)
40
+
41
+ # Installation
42
+ First install QT bindings. For example:
43
+
44
+ `$ pip install PyQt6`
45
+
46
+ Then install this package and the rest of the dependencies:
47
+
48
+ `$ pip install TemDataBrowser`
49
+
50
+ # Running the GUI
51
+
52
+ ## From a python interpreter
53
+ Start python interpreter, import the package, and run the `open_file` function:
54
+
55
+ ```
56
+ $ python
57
+ >>> import TemDataBrowser
58
+ >>> TemDataBrowser.main()
59
+ ```
60
+
61
+ to start the graphical user interface.
62
+
63
+ ## From the command line
64
+
65
+ A script should be installed on your system such that opening a command line
66
+ and typing `TemDataBrowser` will open the graphical user interface.
67
+
68
+ # MCP Server Integration
69
+
70
+ TemDataBrowser includes an optional embedded Model Context Protocol (MCP) server
71
+ implemented as a ScopeFoundry `DataBrowserPlugIn`, allowing external MCP clients
72
+ and AI assistants to load TEM/image files, push in-memory images/arrays, adjust
73
+ contrast, navigate 3D stacks, read metadata, and inspect rendered previews.
74
+
75
+ ## Install with MCP support
76
+
77
+ ```bash
78
+ pip install "TemDataBrowser[mcp]"
79
+ ```
80
+
81
+ ## Auto-start from the command line
82
+
83
+ Pass `--mcp` to auto-start the Streamable HTTP MCP server on launch:
84
+
85
+ ```bash
86
+ TemDataBrowser --mcp
87
+ # or customize host and port:
88
+ TemDataBrowser --mcp --mcp-host 127.0.0.1 --mcp-port 8000
89
+ ```
90
+
91
+ You can also open the **MCP** control panel inside the GUI (click the **MCP**
92
+ toolbar button or press `Ctrl+M`) to start, stop, or inspect the endpoint URL
93
+ (`http://127.0.0.1:8000/mcp` by default).
@@ -0,0 +1,58 @@
1
+ # TemDataBrowser
2
+ A graphical user interface based on ScopeFoundry for viewing TEM data.
3
+
4
+ ![GUI example](TemDataBrowser/images/TemDataBrowser_window.png)
5
+
6
+ # Installation
7
+ First install QT bindings. For example:
8
+
9
+ `$ pip install PyQt6`
10
+
11
+ Then install this package and the rest of the dependencies:
12
+
13
+ `$ pip install TemDataBrowser`
14
+
15
+ # Running the GUI
16
+
17
+ ## From a python interpreter
18
+ Start python interpreter, import the package, and run the `open_file` function:
19
+
20
+ ```
21
+ $ python
22
+ >>> import TemDataBrowser
23
+ >>> TemDataBrowser.main()
24
+ ```
25
+
26
+ to start the graphical user interface.
27
+
28
+ ## From the command line
29
+
30
+ A script should be installed on your system such that opening a command line
31
+ and typing `TemDataBrowser` will open the graphical user interface.
32
+
33
+ # MCP Server Integration
34
+
35
+ TemDataBrowser includes an optional embedded Model Context Protocol (MCP) server
36
+ implemented as a ScopeFoundry `DataBrowserPlugIn`, allowing external MCP clients
37
+ and AI assistants to load TEM/image files, push in-memory images/arrays, adjust
38
+ contrast, navigate 3D stacks, read metadata, and inspect rendered previews.
39
+
40
+ ## Install with MCP support
41
+
42
+ ```bash
43
+ pip install "TemDataBrowser[mcp]"
44
+ ```
45
+
46
+ ## Auto-start from the command line
47
+
48
+ Pass `--mcp` to auto-start the Streamable HTTP MCP server on launch:
49
+
50
+ ```bash
51
+ TemDataBrowser --mcp
52
+ # or customize host and port:
53
+ TemDataBrowser --mcp --mcp-host 127.0.0.1 --mcp-port 8000
54
+ ```
55
+
56
+ You can also open the **MCP** control panel inside the GUI (click the **MCP**
57
+ toolbar button or press `Ctrl+M`) to start, stop, or inspect the endpoint URL
58
+ (`http://127.0.0.1:8000/mcp` by default).