roifile 2024.9.15__tar.gz → 2025.5.10__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.

Potentially problematic release.


This version of roifile might be problematic. Click here for more details.

@@ -1,6 +1,14 @@
1
1
  Revisions
2
2
  ---------
3
3
 
4
+ 2025.5.10
5
+
6
+ - Support Python 3.14.
7
+
8
+ 2025.2.20
9
+
10
+ - Drop support for Python 3.9.
11
+
4
12
  2024.9.15
5
13
 
6
14
  - Improve typing.
@@ -1,6 +1,6 @@
1
- BSD 3-Clause License
1
+ BSD-3-Clause license
2
2
 
3
- Copyright (c) 2020-2024, Christoph Gohlke
3
+ Copyright (c) 2020-2025, Christoph Gohlke
4
4
  All rights reserved.
5
5
 
6
6
  Redistribution and use in source and binary forms, with or without
@@ -1,6 +1,7 @@
1
1
  include LICENSE
2
2
  include README.rst
3
3
  include CHANGES.rst
4
+ include pyproject.toml
4
5
  include roifile_demo.py
5
6
 
6
7
  include roifile/py.typed
@@ -1,16 +1,15 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: roifile
3
- Version: 2024.9.15
3
+ Version: 2025.5.10
4
4
  Summary: Read and write ImageJ ROI format
5
5
  Home-page: https://www.cgohlke.com
6
6
  Author: Christoph Gohlke
7
7
  Author-email: cgohlke@cgohlke.com
8
- License: BSD
8
+ License: BSD-3-Clause
9
9
  Project-URL: Bug Tracker, https://github.com/cgohlke/roifile/issues
10
10
  Project-URL: Source Code, https://github.com/cgohlke/roifile
11
11
  Platform: any
12
12
  Classifier: Development Status :: 4 - Beta
13
- Classifier: License :: OSI Approved :: BSD License
14
13
  Classifier: Intended Audience :: Science/Research
15
14
  Classifier: Intended Audience :: Developers
16
15
  Classifier: Operating System :: OS Independent
@@ -19,13 +18,28 @@ Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
20
19
  Classifier: Programming Language :: Python :: 3.12
21
20
  Classifier: Programming Language :: Python :: 3.13
22
- Requires-Python: >=3.9
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Requires-Python: >=3.10
23
23
  Description-Content-Type: text/x-rst
24
24
  License-File: LICENSE
25
25
  Requires-Dist: numpy
26
26
  Provides-Extra: all
27
27
  Requires-Dist: matplotlib; extra == "all"
28
28
  Requires-Dist: tifffile; extra == "all"
29
+ Dynamic: author
30
+ Dynamic: author-email
31
+ Dynamic: classifier
32
+ Dynamic: description
33
+ Dynamic: description-content-type
34
+ Dynamic: home-page
35
+ Dynamic: license
36
+ Dynamic: license-file
37
+ Dynamic: platform
38
+ Dynamic: project-url
39
+ Dynamic: provides-extra
40
+ Dynamic: requires-dist
41
+ Dynamic: requires-python
42
+ Dynamic: summary
29
43
 
30
44
  Read and write ImageJ ROI format
31
45
  ================================
@@ -37,8 +51,8 @@ interest, geometric shapes, paths, text, and whatnot for image overlays.
37
51
  .. _ImageJ: https://imagej.net
38
52
 
39
53
  :Author: `Christoph Gohlke <https://www.cgohlke.com>`_
40
- :License: BSD 3-Clause
41
- :Version: 2024.9.15
54
+ :License: BSD-3-Clause
55
+ :Version: 2025.5.10
42
56
  :DOI: `10.5281/zenodo.6941603 <https://doi.org/10.5281/zenodo.6941603>`_
43
57
 
44
58
  Quickstart
@@ -64,14 +78,22 @@ Requirements
64
78
  This revision was tested with the following requirements and dependencies
65
79
  (other versions may work):
66
80
 
67
- - `CPython <https://www.python.org>`_ 3.10.11, 3.11.9, 3.12.5, 3.13.0rc2
68
- - `Numpy <https://pypi.org/project/numpy/>`_ 2.2.1
69
- - `Tifffile <https://pypi.org/project/tifffile/>`_ 2024.8.30 (optional)
70
- - `Matplotlib <https://pypi.org/project/matplotlib/>`_ 3.9.2 (optional)
81
+ - `CPython <https://www.python.org>`_ 3.10.11, 3.11.9, 3.12.10, 3.13.3 64-bit
82
+ - `NumPy <https://pypi.org/project/numpy/>`_ 2.2.5
83
+ - `Tifffile <https://pypi.org/project/tifffile/>`_ 2025.5.10 (optional)
84
+ - `Matplotlib <https://pypi.org/project/matplotlib/>`_ 3.10.3 (optional)
71
85
 
72
86
  Revisions
73
87
  ---------
74
88
 
89
+ 2025.5.10
90
+
91
+ - Support Python 3.14.
92
+
93
+ 2025.2.20
94
+
95
+ - Drop support for Python 3.9.
96
+
75
97
  2024.9.15
76
98
 
77
99
  - Improve typing.
@@ -182,6 +204,7 @@ Read the ROIs from the ZIP file:
182
204
 
183
205
  Write the ROIs to an ImageJ formatted TIFF file:
184
206
 
207
+ >>> import numpy
185
208
  >>> import tifffile
186
209
  >>> tifffile.imwrite(
187
210
  ... '_test.tif',
@@ -11,8 +11,8 @@ interest, geometric shapes, paths, text, and whatnot for image overlays.
11
11
  .. _ImageJ: https://imagej.net
12
12
 
13
13
  :Author: `Christoph Gohlke <https://www.cgohlke.com>`_
14
- :License: BSD 3-Clause
15
- :Version: 2024.9.15
14
+ :License: BSD-3-Clause
15
+ :Version: 2025.5.10
16
16
  :DOI: `10.5281/zenodo.6941603 <https://doi.org/10.5281/zenodo.6941603>`_
17
17
 
18
18
  Quickstart
@@ -38,14 +38,22 @@ Requirements
38
38
  This revision was tested with the following requirements and dependencies
39
39
  (other versions may work):
40
40
 
41
- - `CPython <https://www.python.org>`_ 3.10.11, 3.11.9, 3.12.5, 3.13.0rc2
42
- - `Numpy <https://pypi.org/project/numpy/>`_ 2.2.1
43
- - `Tifffile <https://pypi.org/project/tifffile/>`_ 2024.8.30 (optional)
44
- - `Matplotlib <https://pypi.org/project/matplotlib/>`_ 3.9.2 (optional)
41
+ - `CPython <https://www.python.org>`_ 3.10.11, 3.11.9, 3.12.10, 3.13.3 64-bit
42
+ - `NumPy <https://pypi.org/project/numpy/>`_ 2.2.5
43
+ - `Tifffile <https://pypi.org/project/tifffile/>`_ 2025.5.10 (optional)
44
+ - `Matplotlib <https://pypi.org/project/matplotlib/>`_ 3.10.3 (optional)
45
45
 
46
46
  Revisions
47
47
  ---------
48
48
 
49
+ 2025.5.10
50
+
51
+ - Support Python 3.14.
52
+
53
+ 2025.2.20
54
+
55
+ - Drop support for Python 3.9.
56
+
49
57
  2024.9.15
50
58
 
51
59
  - Improve typing.
@@ -170,6 +178,7 @@ Write the ROIs to an ImageJ formatted TIFF file:
170
178
 
171
179
  .. code-block:: python
172
180
 
181
+ >>> import numpy
173
182
  >>> import tifffile
174
183
  >>> tifffile.imwrite(
175
184
  ... '_test.tif',
@@ -0,0 +1,3 @@
1
+ [build-system]
2
+ requires = ["setuptools"]
3
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,17 @@
1
+ # roifile/__init__.py
2
+
3
+ from .roifile import *
4
+ from .roifile import __all__, __doc__, __version__
5
+
6
+
7
+ def _set_module() -> None:
8
+ """Set __module__ attribute for all public objects."""
9
+ globs = globals()
10
+ module = globs['__name__']
11
+ for item in __all__:
12
+ obj = globs[item]
13
+ if hasattr(obj, '__module__'):
14
+ obj.__module__ = module
15
+
16
+
17
+ _set_module()
@@ -1,6 +1,6 @@
1
1
  # roifile.py
2
2
 
3
- # Copyright (c) 2020-2024, Christoph Gohlke
3
+ # Copyright (c) 2020-2025, Christoph Gohlke
4
4
  # All rights reserved.
5
5
  #
6
6
  # Redistribution and use in source and binary forms, with or without
@@ -38,8 +38,8 @@ interest, geometric shapes, paths, text, and whatnot for image overlays.
38
38
  .. _ImageJ: https://imagej.net
39
39
 
40
40
  :Author: `Christoph Gohlke <https://www.cgohlke.com>`_
41
- :License: BSD 3-Clause
42
- :Version: 2024.9.15
41
+ :License: BSD-3-Clause
42
+ :Version: 2025.5.10
43
43
  :DOI: `10.5281/zenodo.6941603 <https://doi.org/10.5281/zenodo.6941603>`_
44
44
 
45
45
  Quickstart
@@ -65,14 +65,22 @@ Requirements
65
65
  This revision was tested with the following requirements and dependencies
66
66
  (other versions may work):
67
67
 
68
- - `CPython <https://www.python.org>`_ 3.10.11, 3.11.9, 3.12.5, 3.13.0rc2
69
- - `Numpy <https://pypi.org/project/numpy/>`_ 2.2.1
70
- - `Tifffile <https://pypi.org/project/tifffile/>`_ 2024.8.30 (optional)
71
- - `Matplotlib <https://pypi.org/project/matplotlib/>`_ 3.9.2 (optional)
68
+ - `CPython <https://www.python.org>`_ 3.10.11, 3.11.9, 3.12.10, 3.13.3 64-bit
69
+ - `NumPy <https://pypi.org/project/numpy/>`_ 2.2.5
70
+ - `Tifffile <https://pypi.org/project/tifffile/>`_ 2025.5.10 (optional)
71
+ - `Matplotlib <https://pypi.org/project/matplotlib/>`_ 3.10.3 (optional)
72
72
 
73
73
  Revisions
74
74
  ---------
75
75
 
76
+ 2025.5.10
77
+
78
+ - Support Python 3.14.
79
+
80
+ 2025.2.20
81
+
82
+ - Drop support for Python 3.9.
83
+
76
84
  2024.9.15
77
85
 
78
86
  - Improve typing.
@@ -183,6 +191,7 @@ Read the ROIs from the ZIP file:
183
191
 
184
192
  Write the ROIs to an ImageJ formatted TIFF file:
185
193
 
194
+ >>> import numpy
186
195
  >>> import tifffile
187
196
  >>> tifffile.imwrite(
188
197
  ... '_test.tif',
@@ -206,9 +215,10 @@ For an advanced example, see `roifile_demo.py` in the source distribution.
206
215
 
207
216
  from __future__ import annotations
208
217
 
209
- __version__ = '2024.9.15'
218
+ __version__ = '2025.5.10'
210
219
 
211
220
  __all__ = [
221
+ '__version__',
212
222
  'roiread',
213
223
  'roiwrite',
214
224
  'ImagejRoi',
@@ -232,8 +242,8 @@ from typing import TYPE_CHECKING
232
242
  import numpy
233
243
 
234
244
  if TYPE_CHECKING:
235
- from collections.abc import Iterable
236
- from typing import Any, Iterator, Literal
245
+ from collections.abc import Iterable, Iterator
246
+ from typing import Any, Literal
237
247
 
238
248
  from matplotlib.axes import Axes
239
249
  from numpy.typing import ArrayLike, NDArray
@@ -286,6 +296,7 @@ def roiwrite(
286
296
 
287
297
  import zipfile
288
298
 
299
+ assert mode is not None
289
300
  with zipfile.ZipFile(filename, mode) as zf:
290
301
  for r in roi:
291
302
  if name is None:
@@ -750,6 +761,7 @@ class ImagejRoi:
750
761
  mode = 'a' if os.path.exists(filename) else 'w'
751
762
  import zipfile
752
763
 
764
+ assert mode is not None
753
765
  with zipfile.ZipFile(filename, mode) as zf:
754
766
  with zf.open(name, 'w') as fh:
755
767
  fh.write(self.tobytes())
@@ -1096,9 +1108,11 @@ class ImagejRoi:
1096
1108
  multi_coordinates: NDArray[numpy.float32], /
1097
1109
  ) -> list[NDArray[numpy.float32]]:
1098
1110
  """Return list of coordinate arrays from 2D geometric path."""
1099
- coordinates = []
1111
+ coordinates: list[NDArray[numpy.float32]] = []
1100
1112
  points: list[list[float]] = []
1101
- path: list[float] = multi_coordinates.tolist()
1113
+ path: list[float] = []
1114
+
1115
+ path = multi_coordinates.tolist() # type: ignore[assignment]
1102
1116
  n = 0
1103
1117
  m = 0
1104
1118
  while n < len(path):
@@ -1302,8 +1316,8 @@ def enumstr(v: enum.Enum | None, /) -> str:
1302
1316
 
1303
1317
 
1304
1318
  def logger() -> logging.Logger:
1305
- """Return logging.getLogger('roifile')."""
1306
- return logging.getLogger(__name__.replace('roifile.roifile', 'roifile'))
1319
+ """Return logger for roifile module."""
1320
+ return logging.getLogger('roifile')
1307
1321
 
1308
1322
 
1309
1323
  def test(verbose: bool = False) -> None:
@@ -1,16 +1,15 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: roifile
3
- Version: 2024.9.15
3
+ Version: 2025.5.10
4
4
  Summary: Read and write ImageJ ROI format
5
5
  Home-page: https://www.cgohlke.com
6
6
  Author: Christoph Gohlke
7
7
  Author-email: cgohlke@cgohlke.com
8
- License: BSD
8
+ License: BSD-3-Clause
9
9
  Project-URL: Bug Tracker, https://github.com/cgohlke/roifile/issues
10
10
  Project-URL: Source Code, https://github.com/cgohlke/roifile
11
11
  Platform: any
12
12
  Classifier: Development Status :: 4 - Beta
13
- Classifier: License :: OSI Approved :: BSD License
14
13
  Classifier: Intended Audience :: Science/Research
15
14
  Classifier: Intended Audience :: Developers
16
15
  Classifier: Operating System :: OS Independent
@@ -19,13 +18,28 @@ Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
20
19
  Classifier: Programming Language :: Python :: 3.12
21
20
  Classifier: Programming Language :: Python :: 3.13
22
- Requires-Python: >=3.9
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Requires-Python: >=3.10
23
23
  Description-Content-Type: text/x-rst
24
24
  License-File: LICENSE
25
25
  Requires-Dist: numpy
26
26
  Provides-Extra: all
27
27
  Requires-Dist: matplotlib; extra == "all"
28
28
  Requires-Dist: tifffile; extra == "all"
29
+ Dynamic: author
30
+ Dynamic: author-email
31
+ Dynamic: classifier
32
+ Dynamic: description
33
+ Dynamic: description-content-type
34
+ Dynamic: home-page
35
+ Dynamic: license
36
+ Dynamic: license-file
37
+ Dynamic: platform
38
+ Dynamic: project-url
39
+ Dynamic: provides-extra
40
+ Dynamic: requires-dist
41
+ Dynamic: requires-python
42
+ Dynamic: summary
29
43
 
30
44
  Read and write ImageJ ROI format
31
45
  ================================
@@ -37,8 +51,8 @@ interest, geometric shapes, paths, text, and whatnot for image overlays.
37
51
  .. _ImageJ: https://imagej.net
38
52
 
39
53
  :Author: `Christoph Gohlke <https://www.cgohlke.com>`_
40
- :License: BSD 3-Clause
41
- :Version: 2024.9.15
54
+ :License: BSD-3-Clause
55
+ :Version: 2025.5.10
42
56
  :DOI: `10.5281/zenodo.6941603 <https://doi.org/10.5281/zenodo.6941603>`_
43
57
 
44
58
  Quickstart
@@ -64,14 +78,22 @@ Requirements
64
78
  This revision was tested with the following requirements and dependencies
65
79
  (other versions may work):
66
80
 
67
- - `CPython <https://www.python.org>`_ 3.10.11, 3.11.9, 3.12.5, 3.13.0rc2
68
- - `Numpy <https://pypi.org/project/numpy/>`_ 2.2.1
69
- - `Tifffile <https://pypi.org/project/tifffile/>`_ 2024.8.30 (optional)
70
- - `Matplotlib <https://pypi.org/project/matplotlib/>`_ 3.9.2 (optional)
81
+ - `CPython <https://www.python.org>`_ 3.10.11, 3.11.9, 3.12.10, 3.13.3 64-bit
82
+ - `NumPy <https://pypi.org/project/numpy/>`_ 2.2.5
83
+ - `Tifffile <https://pypi.org/project/tifffile/>`_ 2025.5.10 (optional)
84
+ - `Matplotlib <https://pypi.org/project/matplotlib/>`_ 3.10.3 (optional)
71
85
 
72
86
  Revisions
73
87
  ---------
74
88
 
89
+ 2025.5.10
90
+
91
+ - Support Python 3.14.
92
+
93
+ 2025.2.20
94
+
95
+ - Drop support for Python 3.9.
96
+
75
97
  2024.9.15
76
98
 
77
99
  - Improve typing.
@@ -182,6 +204,7 @@ Read the ROIs from the ZIP file:
182
204
 
183
205
  Write the ROIs to an ImageJ formatted TIFF file:
184
206
 
207
+ >>> import numpy
185
208
  >>> import tifffile
186
209
  >>> tifffile.imwrite(
187
210
  ... '_test.tif',
@@ -2,6 +2,7 @@ CHANGES.rst
2
2
  LICENSE
3
3
  MANIFEST.in
4
4
  README.rst
5
+ pyproject.toml
5
6
  roifile_demo.py
6
7
  setup.py
7
8
  roifile/__init__.py
@@ -8,7 +8,7 @@ import sys
8
8
  from setuptools import setup
9
9
 
10
10
 
11
- def search(pattern, string, flags=0):
11
+ def search(pattern: str, string: str, flags: int = 0) -> str:
12
12
  """Return first match of pattern in string."""
13
13
  match = re.search(pattern, string, flags)
14
14
  if match is None:
@@ -16,7 +16,7 @@ def search(pattern, string, flags=0):
16
16
  return match.groups()[0]
17
17
 
18
18
 
19
- def fix_docstring_examples(docstring):
19
+ def fix_docstring_examples(docstring: str) -> str:
20
20
  """Return docstring with examples fixed for GitHub."""
21
21
  start = True
22
22
  indent = False
@@ -64,7 +64,7 @@ if 'sdist' in sys.argv:
64
64
  license = license.replace('# ', '').replace('#', '')
65
65
 
66
66
  with open('LICENSE', 'w', encoding='utf-8') as fh:
67
- fh.write('BSD 3-Clause License\n\n')
67
+ fh.write('BSD-3-Clause license\n\n')
68
68
  fh.write(license)
69
69
 
70
70
  revisions = search(
@@ -84,7 +84,7 @@ if 'sdist' in sys.argv:
84
84
  setup(
85
85
  name='roifile',
86
86
  version=version,
87
- license='BSD',
87
+ license='BSD-3-Clause',
88
88
  description=description,
89
89
  long_description=readme,
90
90
  long_description_content_type='text/x-rst',
@@ -99,13 +99,12 @@ setup(
99
99
  packages=['roifile'],
100
100
  package_data={'roifile': ['py.typed']},
101
101
  entry_points={'console_scripts': ['roifile = roifile.roifile:main']},
102
- python_requires='>=3.9',
102
+ python_requires='>=3.10',
103
103
  install_requires=['numpy'],
104
104
  extras_require={'all': ['matplotlib', 'tifffile']},
105
105
  platforms=['any'],
106
106
  classifiers=[
107
107
  'Development Status :: 4 - Beta',
108
- 'License :: OSI Approved :: BSD License',
109
108
  'Intended Audience :: Science/Research',
110
109
  'Intended Audience :: Developers',
111
110
  'Operating System :: OS Independent',
@@ -114,5 +113,6 @@ setup(
114
113
  'Programming Language :: Python :: 3.11',
115
114
  'Programming Language :: Python :: 3.12',
116
115
  'Programming Language :: Python :: 3.13',
116
+ 'Programming Language :: Python :: 3.14',
117
117
  ],
118
118
  )
@@ -1,4 +0,0 @@
1
- # roifile/__init__.py
2
-
3
- from .roifile import __doc__, __all__, __version__
4
- from .roifile import *
File without changes
File without changes