arrayview 0.2.3__tar.gz → 0.3.0__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.
@@ -12,4 +12,5 @@ wheels/
12
12
  *.npy
13
13
  .claude/
14
14
  CLAUDE.md
15
- debug/
15
+ debug/
16
+ tests/snapshots/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arrayview
3
- Version: 0.2.3
3
+ Version: 0.3.0
4
4
  Summary: Fast multi-dimensional array viewer
5
5
  Project-URL: Home, https://github.com/oscarvanderheide/arrayview
6
6
  Project-URL: Source, https://github.com/oscarvanderheide/arrayview
@@ -15,12 +15,18 @@ Classifier: Programming Language :: Python :: 3 :: Only
15
15
  Classifier: Programming Language :: Python :: 3.12
16
16
  Requires-Python: >=3.12
17
17
  Requires-Dist: fastapi>=0.129.0
18
+ Requires-Dist: h5py>=3.0
18
19
  Requires-Dist: matplotlib>=3.9.0
19
20
  Requires-Dist: nibabel>=5.3.3
20
21
  Requires-Dist: numpy>=2.4.2
21
22
  Requires-Dist: pillow>=12.1.1
23
+ Requires-Dist: pyqt5>=5.15; sys_platform == 'linux'
24
+ Requires-Dist: pyqtwebengine>=5.15; sys_platform == 'linux'
22
25
  Requires-Dist: pywebview>=6.1
23
26
  Requires-Dist: qmricolors>=0.1.2
27
+ Requires-Dist: qtpy>=2.0; sys_platform == 'linux'
28
+ Requires-Dist: scipy>=1.10
29
+ Requires-Dist: tifffile>=2023.1.1
24
30
  Requires-Dist: uvicorn>=0.41.0
25
31
  Requires-Dist: websockets>=14.0
26
32
  Requires-Dist: zarr>=2.17
@@ -29,16 +35,22 @@ Description-Content-Type: text/markdown
29
35
  # arrayview
30
36
 
31
37
  A fast, minimal viewer for multi-dimensional arrays, inspired by the great
32
- [arrShow](https://github.com/tsumpf/arrShow).
38
+ [arrShow](https://github.com/tsumpf/arrShow) and [sigpy's ImagePlot](https://github.com/mikgroup/sigpy/blob/5da0e8605f166be41e520ef0ef913482487611d8/sigpy/plot.py#L48).
33
39
 
34
40
  - CLI and Python useage
35
41
  - Inline in Jupyter / vscode interactive window
36
42
  - Runs locally, over SSH, and through VS Code tunnels
37
43
 
38
44
  ## CLI
45
+
39
46
  `uvx arrayview your_array.npy`
40
47
 
48
+ Opens in a native window. To open in browser, pass `--browser` flag.
49
+
41
50
  ## Python
51
+
52
+ `uv add arrayview`
53
+
42
54
  ```python
43
55
  from arrayview import view
44
56
  import numpy as np
@@ -47,4 +59,21 @@ np.random.rand(256,256,32,2)
47
59
  view(x)
48
60
  ```
49
61
 
62
+ ## Development
63
+
64
+ ```bash
65
+ git clone https://github.com/oscarvanderheide/arrayview
66
+ cd arrayview
67
+ uv sync --group test
68
+ uv run playwright install chromium
69
+ ```
70
+
71
+ Run the tests:
72
+
73
+ ```bash
74
+ uv run pytest tests/ # all (API + browser, ~100s)
75
+ uv run pytest tests/test_api.py # HTTP layer only (~40s)
76
+ uv run pytest tests/test_browser.py # Playwright/Chromium only (~60s)
77
+ ```
50
78
 
79
+ Visual regression baselines live in `tests/snapshots/`. Delete a file there to reset its baseline.
@@ -0,0 +1,45 @@
1
+ # arrayview
2
+
3
+ A fast, minimal viewer for multi-dimensional arrays, inspired by the great
4
+ [arrShow](https://github.com/tsumpf/arrShow) and [sigpy's ImagePlot](https://github.com/mikgroup/sigpy/blob/5da0e8605f166be41e520ef0ef913482487611d8/sigpy/plot.py#L48).
5
+
6
+ - CLI and Python useage
7
+ - Inline in Jupyter / vscode interactive window
8
+ - Runs locally, over SSH, and through VS Code tunnels
9
+
10
+ ## CLI
11
+
12
+ `uvx arrayview your_array.npy`
13
+
14
+ Opens in a native window. To open in browser, pass `--browser` flag.
15
+
16
+ ## Python
17
+
18
+ `uv add arrayview`
19
+
20
+ ```python
21
+ from arrayview import view
22
+ import numpy as np
23
+
24
+ np.random.rand(256,256,32,2)
25
+ view(x)
26
+ ```
27
+
28
+ ## Development
29
+
30
+ ```bash
31
+ git clone https://github.com/oscarvanderheide/arrayview
32
+ cd arrayview
33
+ uv sync --group test
34
+ uv run playwright install chromium
35
+ ```
36
+
37
+ Run the tests:
38
+
39
+ ```bash
40
+ uv run pytest tests/ # all (API + browser, ~100s)
41
+ uv run pytest tests/test_api.py # HTTP layer only (~40s)
42
+ uv run pytest tests/test_browser.py # Playwright/Chromium only (~60s)
43
+ ```
44
+
45
+ Visual regression baselines live in `tests/snapshots/`. Delete a file there to reset its baseline.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "arrayview"
7
- version = "0.2.3"
7
+ version = "0.3.0"
8
8
  description = "Fast multi-dimensional array viewer"
9
9
  readme = { file = "README.md", content-type = "text/markdown" }
10
10
  requires-python = ">=3.12"
@@ -21,12 +21,18 @@ keywords = ["npy", "viewer", "mri", "array", "visualization"]
21
21
  urls = { "Home" = "https://github.com/oscarvanderheide/arrayview", "Source" = "https://github.com/oscarvanderheide/arrayview" }
22
22
  dependencies = [
23
23
  "fastapi>=0.129.0",
24
+ "h5py>=3.0",
24
25
  "matplotlib>=3.9.0",
25
26
  "nibabel>=5.3.3",
26
27
  "numpy>=2.4.2",
27
28
  "pillow>=12.1.1",
28
29
  "pywebview>=6.1",
30
+ "PyQt5>=5.15; sys_platform == 'linux'",
31
+ "PyQtWebEngine>=5.15; sys_platform == 'linux'",
32
+ "qtpy>=2.0; sys_platform == 'linux'",
29
33
  "qmricolors>=0.1.2",
34
+ "scipy>=1.10",
35
+ "tifffile>=2023.1.1",
30
36
  "uvicorn>=0.41.0",
31
37
  "websockets>=14.0",
32
38
  "zarr>=2.17",
@@ -46,3 +52,21 @@ dev = [
46
52
  "ipykernel>=7.2.0",
47
53
  "twine>=6.2.0",
48
54
  ]
55
+ test = [
56
+ "pytest>=8.0",
57
+ "httpx>=0.27",
58
+ "pytest-playwright>=0.5",
59
+ "pillow>=12.1.1",
60
+ ]
61
+
62
+ [tool.pytest.ini_options]
63
+ testpaths = ["tests"]
64
+ markers = [
65
+ "browser: marks tests that require a real browser (playwright)",
66
+ ]
67
+ filterwarnings = [
68
+ # uvicorn 0.41 uses the deprecated websockets.legacy API (websockets 14+)
69
+ # — upstream issue, nothing we can fix
70
+ "ignore::DeprecationWarning:websockets",
71
+ "ignore::DeprecationWarning:uvicorn",
72
+ ]
@@ -1,3 +1,3 @@
1
- __version__ = "0.2.3"
1
+ __version__ = "0.2.4"
2
2
 
3
3
  from arrayview._app import arrayview, view # noqa: F401