npc-sync 0.2.2__tar.gz → 0.2.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.
- {npc_sync-0.2.2/src/npc_sync.egg-info → npc_sync-0.2.4}/PKG-INFO +1 -1
- {npc_sync-0.2.2 → npc_sync-0.2.4}/pyproject.toml +1 -1
- {npc_sync-0.2.2 → npc_sync-0.2.4}/src/npc_sync/sync.py +2 -1
- {npc_sync-0.2.2 → npc_sync-0.2.4/src/npc_sync.egg-info}/PKG-INFO +1 -1
- npc_sync-0.2.4/tests/test_core.py +30 -0
- npc_sync-0.2.2/tests/test_core.py +0 -5
- {npc_sync-0.2.2 → npc_sync-0.2.4}/LICENSE +0 -0
- {npc_sync-0.2.2 → npc_sync-0.2.4}/README.md +0 -0
- {npc_sync-0.2.2 → npc_sync-0.2.4}/setup.cfg +0 -0
- {npc_sync-0.2.2 → npc_sync-0.2.4}/src/npc_sync/__init__.py +0 -0
- {npc_sync-0.2.2 → npc_sync-0.2.4}/src/npc_sync/py.typed +0 -0
- {npc_sync-0.2.2 → npc_sync-0.2.4}/src/npc_sync.egg-info/SOURCES.txt +0 -0
- {npc_sync-0.2.2 → npc_sync-0.2.4}/src/npc_sync.egg-info/dependency_links.txt +0 -0
- {npc_sync-0.2.2 → npc_sync-0.2.4}/src/npc_sync.egg-info/entry_points.txt +0 -0
- {npc_sync-0.2.2 → npc_sync-0.2.4}/src/npc_sync.egg-info/requires.txt +0 -0
- {npc_sync-0.2.2 → npc_sync-0.2.4}/src/npc_sync.egg-info/top_level.txt +0 -0
- {npc_sync-0.2.2 → npc_sync-0.2.4}/tests/test_known_files.py +0 -0
- {npc_sync-0.2.2 → npc_sync-0.2.4}/tests/test_plots.py +0 -0
|
@@ -222,7 +222,8 @@ class SyncDataset:
|
|
|
222
222
|
stim_paths: Iterable[npc_io.PathLike] | None = None,
|
|
223
223
|
) -> None:
|
|
224
224
|
if isinstance(path, self.__class__):
|
|
225
|
-
self = path
|
|
225
|
+
self.path = path.path
|
|
226
|
+
self.dfile = path.dfile
|
|
226
227
|
else:
|
|
227
228
|
self.path = npc_io.from_pathlike(path)
|
|
228
229
|
self.dfile = self.load(path)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import npc_sync
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def test_import_package():
|
|
5
|
+
pass
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def test_no_stim_paths_and_meta_data() -> None:
|
|
9
|
+
"""Constructing SyncDataset without stim_paths leaves stim_paths as None,
|
|
10
|
+
and meta_data is accessible and contains expected keys."""
|
|
11
|
+
s = npc_sync.SyncDataset(
|
|
12
|
+
"s3://aind-ephys-data/ecephys_662892_2023-08-21_12-43-45/behavior/20230821T124345.h5"
|
|
13
|
+
)
|
|
14
|
+
assert s.stim_paths is None
|
|
15
|
+
meta = s.meta_data
|
|
16
|
+
assert isinstance(meta, dict)
|
|
17
|
+
assert "line_labels" in meta
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def test_init_from_instance_and_meta_data() -> None:
|
|
21
|
+
"""Constructing SyncDataset from an existing instance reuses it,
|
|
22
|
+
and meta_data is still accessible with expected keys."""
|
|
23
|
+
s = npc_sync.SyncDataset(
|
|
24
|
+
"s3://aind-ephys-data/ecephys_662892_2023-08-21_12-43-45/behavior/20230821T124345.h5"
|
|
25
|
+
)
|
|
26
|
+
s2 = npc_sync.SyncDataset(s)
|
|
27
|
+
assert s2.stim_paths is None
|
|
28
|
+
meta = s2.meta_data
|
|
29
|
+
assert isinstance(meta, dict)
|
|
30
|
+
assert "line_labels" in meta
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|