TemDataBrowser 1.3__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 (29) hide show
  1. {temdatabrowser-1.3 → temdatabrowser-1.4}/.github/workflows/publish-to-pypi.yml +5 -5
  2. temdatabrowser-1.4/.github/workflows/tests.yml +53 -0
  3. {temdatabrowser-1.3/TemDataBrowser.egg-info → temdatabrowser-1.4}/PKG-INFO +38 -3
  4. temdatabrowser-1.4/README.md +58 -0
  5. temdatabrowser-1.4/TemDataBrowser/__init__.py +783 -0
  6. temdatabrowser-1.4/TemDataBrowser/fft_plugin.py +584 -0
  7. temdatabrowser-1.4/TemDataBrowser/mcp_server.py +1015 -0
  8. {temdatabrowser-1.3 → temdatabrowser-1.4/TemDataBrowser.egg-info}/PKG-INFO +38 -3
  9. {temdatabrowser-1.3 → temdatabrowser-1.4}/TemDataBrowser.egg-info/SOURCES.txt +7 -1
  10. temdatabrowser-1.4/TemDataBrowser.egg-info/requires.txt +19 -0
  11. temdatabrowser-1.4/TemDataBrowser.egg-info/scm_file_list.json +18 -0
  12. temdatabrowser-1.4/TemDataBrowser.egg-info/scm_version.json +8 -0
  13. {temdatabrowser-1.3 → temdatabrowser-1.4}/pyproject.toml +19 -1
  14. temdatabrowser-1.4/tests/test_fft_plugin.py +199 -0
  15. temdatabrowser-1.4/tests/test_mcp_server.py +422 -0
  16. temdatabrowser-1.4/tests/test_quick_fixes.py +185 -0
  17. temdatabrowser-1.3/README.md +0 -31
  18. temdatabrowser-1.3/TemDataBrowser/__init__.py +0 -392
  19. temdatabrowser-1.3/TemDataBrowser.egg-info/requires.txt +0 -7
  20. temdatabrowser-1.3/TemDataBrowser.egg-info/scm_file_list.json +0 -12
  21. temdatabrowser-1.3/TemDataBrowser.egg-info/scm_version.json +0 -8
  22. {temdatabrowser-1.3 → temdatabrowser-1.4}/.gitignore +0 -0
  23. {temdatabrowser-1.3 → temdatabrowser-1.4}/LICENSE +0 -0
  24. {temdatabrowser-1.3 → temdatabrowser-1.4}/TemDataBrowser/images/TemDataBrowser_window.png +0 -0
  25. {temdatabrowser-1.3 → temdatabrowser-1.4}/TemDataBrowser.egg-info/dependency_links.txt +0 -0
  26. {temdatabrowser-1.3 → temdatabrowser-1.4}/TemDataBrowser.egg-info/entry_points.txt +0 -0
  27. {temdatabrowser-1.3 → temdatabrowser-1.4}/TemDataBrowser.egg-info/top_level.txt +0 -0
  28. {temdatabrowser-1.3 → temdatabrowser-1.4}/run_TemDataBrowser.py +0 -0
  29. {temdatabrowser-1.3 → temdatabrowser-1.4}/setup.cfg +0 -0
@@ -11,11 +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
15
  with:
16
16
  fetch-depth: 0
17
17
  - name: Set up Python
18
- uses: actions/setup-python@v5
18
+ uses: actions/setup-python@v7
19
19
  with:
20
20
  python-version: "3.x"
21
21
  - name: Install pypa/build
@@ -27,7 +27,7 @@ jobs:
27
27
  - name: Build a binary wheel and a source tarball
28
28
  run: python -m build
29
29
  - name: Store the distribution packages
30
- uses: actions/upload-artifact@v4
30
+ uses: actions/upload-artifact@v7
31
31
  with:
32
32
  name: python-package-distributions
33
33
  path: dist/
@@ -49,7 +49,7 @@ jobs:
49
49
 
50
50
  steps:
51
51
  - name: Download all the dists
52
- uses: actions/download-artifact@v4
52
+ uses: actions/download-artifact@v8
53
53
  with:
54
54
  name: python-package-distributions
55
55
  path: dist/
@@ -78,7 +78,7 @@ jobs:
78
78
 
79
79
  steps:
80
80
  - name: Download all the dists
81
- uses: actions/download-artifact@v4
81
+ uses: actions/download-artifact@v8
82
82
  with:
83
83
  name: python-package-distributions
84
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TemDataBrowser
3
- Version: 1.3
3
+ Version: 1.4
4
4
  Summary: Graphical user interface to view transmission electron microscopy data.
5
5
  Author-email: Peter Ercius <percius@lbl.gov>
6
6
  License-Expression: MIT
@@ -13,16 +13,24 @@ Classifier: Programming Language :: Python :: 3
13
13
  Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
16
18
  Requires-Python: >=3.10
17
19
  Description-Content-Type: text/markdown
18
20
  License-File: LICENSE
19
21
  Requires-Dist: numpy
20
22
  Requires-Dist: pyqtgraph
21
23
  Requires-Dist: qtpy
22
- Requires-Dist: ScopeFoundry>=1.5
24
+ Requires-Dist: ScopeFoundry<2.3,>=1.5; python_version < "3.13"
25
+ Requires-Dist: ScopeFoundry>=1.5; python_version >= "3.13"
23
26
  Requires-Dist: ncempy>=1.15
24
27
  Requires-Dist: scipy
25
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"
26
34
  Dynamic: license-file
27
35
 
28
36
  # TemDataBrowser
@@ -55,4 +63,31 @@ to start the graphical user interface.
55
63
  ## From the command line
56
64
 
57
65
  A script should be installed on your system such that opening a command line
58
- and typing `TemDataBrowser` will open the graphical uiser interface.
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).