TwoPy 0.3.4__py3-none-any.whl → 0.3.5__py3-none-any.whl
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.
- twopy/converted.py +1 -1
- twopy/napari/version_check.py +14 -1
- twopy/napari/viewer.py +4 -1
- {twopy-0.3.4.dist-info → twopy-0.3.5.dist-info}/METADATA +1 -1
- {twopy-0.3.4.dist-info → twopy-0.3.5.dist-info}/RECORD +8 -8
- {twopy-0.3.4.dist-info → twopy-0.3.5.dist-info}/WHEEL +0 -0
- {twopy-0.3.4.dist-info → twopy-0.3.5.dist-info}/entry_points.txt +0 -0
- {twopy-0.3.4.dist-info → twopy-0.3.5.dist-info}/top_level.txt +0 -0
twopy/converted.py
CHANGED
|
@@ -234,7 +234,7 @@ def load_converted_recording(
|
|
|
234
234
|
if len(movie_shape) != 3:
|
|
235
235
|
msg = f"aligned movie shape must have 3 dimensions: {movie_shape}"
|
|
236
236
|
raise ValueError(msg)
|
|
237
|
-
movie_shape_3d =
|
|
237
|
+
movie_shape_3d = movie_shape
|
|
238
238
|
|
|
239
239
|
recording = RecordingData(
|
|
240
240
|
path=data_path,
|
twopy/napari/version_check.py
CHANGED
|
@@ -137,7 +137,12 @@ def check_for_update(
|
|
|
137
137
|
"""
|
|
138
138
|
checked_now = _utc(now)
|
|
139
139
|
cache = read_version_check_cache(state_file=state_file)
|
|
140
|
-
if _cache_is_fresh(
|
|
140
|
+
if _cache_is_fresh(
|
|
141
|
+
cache,
|
|
142
|
+
now=checked_now,
|
|
143
|
+
max_age=max_age,
|
|
144
|
+
current_version=current_version,
|
|
145
|
+
):
|
|
141
146
|
return _notice_from_cache(current_version, cache)
|
|
142
147
|
|
|
143
148
|
try:
|
|
@@ -243,6 +248,7 @@ def _cache_is_fresh(
|
|
|
243
248
|
*,
|
|
244
249
|
now: datetime,
|
|
245
250
|
max_age: timedelta,
|
|
251
|
+
current_version: str,
|
|
246
252
|
) -> bool:
|
|
247
253
|
"""Return whether the cache is young enough to skip a network check."""
|
|
248
254
|
if cache is None:
|
|
@@ -250,6 +256,13 @@ def _cache_is_fresh(
|
|
|
250
256
|
checked_at = _parse_cached_datetime(cache.checked_at)
|
|
251
257
|
if checked_at is None:
|
|
252
258
|
return False
|
|
259
|
+
try:
|
|
260
|
+
current = Version(current_version)
|
|
261
|
+
latest = Version(cache.latest_version)
|
|
262
|
+
except InvalidVersion:
|
|
263
|
+
return False
|
|
264
|
+
if latest < current:
|
|
265
|
+
return False
|
|
253
266
|
return now - checked_at <= max_age
|
|
254
267
|
|
|
255
268
|
|
twopy/napari/viewer.py
CHANGED
|
@@ -398,7 +398,10 @@ def create_viewer() -> NapariViewer:
|
|
|
398
398
|
"""
|
|
399
399
|
import napari
|
|
400
400
|
|
|
401
|
-
viewer = cast(
|
|
401
|
+
viewer = cast(
|
|
402
|
+
NapariViewer,
|
|
403
|
+
napari.Viewer(title=APPLICATION_TITLE, show_welcome_screen=False),
|
|
404
|
+
)
|
|
402
405
|
_set_application_icon(viewer)
|
|
403
406
|
show_empty_viewer_message(viewer)
|
|
404
407
|
return viewer
|
|
@@ -7,7 +7,7 @@ twopy/api.py,sha256=lveeoPjg-Yy4wWdepy1pnekZj77D-Y4FkvyL6smXgp4,3005
|
|
|
7
7
|
twopy/cache_inventory.py,sha256=LJTWotkMASq9o1ebAtXsDb13PY6zYhFEThmQPZErrn8,23241
|
|
8
8
|
twopy/config.example.yml,sha256=_HymfhzjWSPQc3gscTOAnvlt6ijLHvJ7NWHmeDQBZ74,2764
|
|
9
9
|
twopy/config.py,sha256=91ZGMTtOaJwSiE7mBoMLTF_VxbF2Hntp9gLawMLiHGQ,24460
|
|
10
|
-
twopy/converted.py,sha256=
|
|
10
|
+
twopy/converted.py,sha256=ff8Zh-E5aTkBFeq5LB4N6APKleSHGs8vdNY8pfCejWQ,24892
|
|
11
11
|
twopy/filenames.py,sha256=uEjiBRygoojU1upQ-HldrtNYZpgq3Mv0gp0VxlWGbnM,1487
|
|
12
12
|
twopy/frame_ranges.py,sha256=ETREkQxzuof_EgomR-lV75rjSPLObJlss91GENcwxhY,1368
|
|
13
13
|
twopy/hdf5_utils.py,sha256=f_lddPqI2X-PNjGXWVSbLL6LFpr14ClFqY6zprMsoGo,3816
|
|
@@ -120,8 +120,8 @@ twopy/napari/state.py,sha256=P4QD9XZdeHvm_Ebjn7nOqV49gmDUTqBr0kSlOSZruhU,7337
|
|
|
120
120
|
twopy/napari/text.py,sha256=amsxpoq4zMj5sHnNIiWpcVS5sS2KzIh7d1vQD2C4paE,2127
|
|
121
121
|
twopy/napari/trial_timeline.py,sha256=oZSrYDEWfV60mrI9yekc813cc2W8-8EQZVwb7EUQn74,24349
|
|
122
122
|
twopy/napari/types.py,sha256=yBHw9FSWFdjf8Xp-bK2SKBlH2BW7nIhUgPZceG63amc,1201
|
|
123
|
-
twopy/napari/version_check.py,sha256=
|
|
124
|
-
twopy/napari/viewer.py,sha256=
|
|
123
|
+
twopy/napari/version_check.py,sha256=hOBIfVb2_YwFqGh9LxwCDaYfTv4oOIqGqZqfDEFCG-A,8730
|
|
124
|
+
twopy/napari/viewer.py,sha256=dmXKjwE7PGrcin4OTAUZY_QSZcQ1ZhRJIZnXQQwm7CY,21933
|
|
125
125
|
twopy/napari/assets/twopy-app-icon-128.png,sha256=93BO_VF7_CsUCRKpd5OrIid0ax3eV1vUciUtc8UyjP8,10629
|
|
126
126
|
twopy/napari/assets/twopy-app-icon-16.png,sha256=uTRc_JlpzN1jNrWAu4Zi_xUd2nTvNa9TI--yzkGoJZs,1284
|
|
127
127
|
twopy/napari/assets/twopy-app-icon-256.png,sha256=mR3Sb0TUGoLQn-nz7hhRNjMyhefJsYPwvYCjFopB2_A,28009
|
|
@@ -180,8 +180,8 @@ twopy/parity/psycho5.py,sha256=Xg7Q8Ipyv6hH9AXYKLxU0cLx9z10uWDLg7PNxT-rDyk,13908
|
|
|
180
180
|
twopy/parity/roi.py,sha256=Q3deH6xRGCmTXASTlPHQgzH7FhBWkdjRUgh9skyS8j0,4975
|
|
181
181
|
twopy/parity/roi_extraction.py,sha256=Z-ABVSB4Z6IUqZMWU1bq6Ko1tGP4uTdzk3As0gHaHTA,10372
|
|
182
182
|
twopy/parity/saved_analysis.py,sha256=Kbpaxh1zapR5XxnHEkin8r4mEZX8kEtonudeZcwI7Dw,5597
|
|
183
|
-
twopy-0.3.
|
|
184
|
-
twopy-0.3.
|
|
185
|
-
twopy-0.3.
|
|
186
|
-
twopy-0.3.
|
|
187
|
-
twopy-0.3.
|
|
183
|
+
twopy-0.3.5.dist-info/METADATA,sha256=bGwirK2BKWBwj3EMvncaGvQZWWWHOVAxkVZW9B4LCJk,4143
|
|
184
|
+
twopy-0.3.5.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
185
|
+
twopy-0.3.5.dist-info/entry_points.txt,sha256=RnmRKOxEv5ZwLN-dArdSB678gM2iNxbE30VwRpwhp8o,44
|
|
186
|
+
twopy-0.3.5.dist-info/top_level.txt,sha256=8MB6QGpnHMTeTfEE543DOr676HcemeoELujrJkFcvak,6
|
|
187
|
+
twopy-0.3.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|