File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 22
33Observes [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) standard and [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) convention.
44
5+ ## [ 0.1.6] - 2023-09-18
6+
7+ + Update - NWB export checks for activated session schema to allow use of both
8+ ` session_with_id ` and ` session_with_datetime `
9+
10+
511## [ 0.1.5] - 2023-06-20
612
713+ Update - GitHub Actions workflows
@@ -39,6 +45,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
3945+ Add - GitHub Action release process
4046+ Add - ` session ` schema
4147
48+ [ 0.1.6 ] : https://github.com/datajoint/element-session/releases/tag/0.1.6
4249[ 0.1.5 ] : https://github.com/datajoint/element-session/releases/tag/0.1.5
4350[ 0.1.4 ] : https://github.com/datajoint/element-session/releases/tag/0.1.4
4451[ 0.1.3 ] : https://github.com/datajoint/element-session/releases/tag/0.1.3
Original file line number Diff line number Diff line change 11import datetime
22from uuid import uuid4
33import pynwb
4+ import datajoint as dj
45
5- from .. import session
6+ from .. import session_with_id , session_with_datetime
7+
8+ if session_with_datetime .schema .is_activated ():
9+ session = session_with_datetime
10+ elif session_with_id .schema .is_activated ():
11+ session = session_with_id
12+ else :
13+ raise dj .DataJointError ("Session schema has not been activated." )
614
715
816def session_to_nwb (
@@ -12,7 +20,7 @@ def session_to_nwb(
1220 protocol_key : dict = None ,
1321 additional_nwbfile_kwargs = None ,
1422) -> pynwb .NWBFile :
15- """Return subject and session metadata ass NWBFile object
23+ """Return subject and session metadata as NWBFile object
1624
1725 Gather session- and subject-level metadata and use it to create an NWBFile. If there
1826 is no subject_to_nwb export function in the current namespace, subject_id will be
@@ -58,7 +66,7 @@ def session_to_nwb(
5866 session_key = (session .Session & session_key ).fetch1 ("KEY" )
5967
6068 session_identifier = {
61- k : v .isoformat () if isinstance (v , datetime .datetime ) else v
69+ k : v .isoformat () if isinstance (v , datetime .datetime ) else str ( v )
6270 for k , v in session_key .items ()
6371 }
6472
Original file line number Diff line number Diff line change 11"""Package metadata."""
2- __version__ = "0.1.5 "
2+ __version__ = "0.1.6 "
You can’t perform that action at this time.
0 commit comments