Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't insert lab member when creating lab team #983

Merged
merged 36 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
0752b16
Save LFP as pynwb.ecephys.LFP
khl02007 May 10, 2023
9fb9d7b
Fix formatting
edeno May 10, 2023
5243b21
Fix formatting
edeno May 10, 2023
fc9eac7
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 May 11, 2023
bf7487a
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 May 13, 2023
6a876fd
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 May 21, 2023
fba7523
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 May 22, 2023
2ff1a5f
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Jun 2, 2023
128a0a8
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Jun 5, 2023
75930cd
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Jun 20, 2023
476ee6d
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Jul 23, 2023
ecc3a0c
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Jul 24, 2023
2834d26
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Aug 2, 2023
379c904
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Aug 7, 2023
520c587
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Sep 21, 2023
b9d6b29
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Nov 29, 2023
0cadc41
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Dec 11, 2023
08b23cd
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Dec 15, 2023
405dc06
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Dec 20, 2023
d607d92
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Jan 7, 2024
3522e48
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Jan 11, 2024
b0ddff5
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Jan 13, 2024
3fe7f86
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Jan 22, 2024
b1ae3e2
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Jan 23, 2024
2cd9274
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Feb 22, 2024
87bced0
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Feb 26, 2024
5a6c96b
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Mar 7, 2024
90334fd
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 Mar 7, 2024
8cae55d
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass
khl02007 May 20, 2024
6026d84
Don't reinsert name
khl02007 May 20, 2024
105eefd
Recompose name
CBroz1 May 21, 2024
3716a9f
Fix second referece to
CBroz1 May 21, 2024
4e7e9cf
Merge branch 'master' into labteam_name
khl02007 May 22, 2024
6d6d002
Merge pull request #1 from CBroz1/ltn
khl02007 May 22, 2024
7450df5
Update CHANGELOG.md
edeno May 29, 2024
8418bb3
Merge branch 'master' into labteam_name
edeno May 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
- Allow dlc without pre-existing tracking data #973, #975
- Raise `KeyError` for missing input parameters across helper funcs #966
- `DLCPosVideo` table now inserts into self after `make` #966
- Common
- Don't insert lab member when creating lab team #983

## [0.5.2] (April 22, 2024)

Expand Down
13 changes: 7 additions & 6 deletions src/spyglass/common/common_lab.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def insert_from_nwbfile(cls, nwbf):
# each person is by default the member of their own LabTeam
# (same as their name)

full_name, _, _ = decompose_name(experimenter)
full_name, first, last = decompose_name(experimenter)
LabTeam.create_new_team(
team_name=full_name, team_members=[full_name]
team_name=full_name, team_members=[f"{last}, {first}"]
)

@classmethod
Expand Down Expand Up @@ -193,17 +193,18 @@ def create_new_team(
member_list = []
for team_member in team_members:
LabMember.insert_from_name(team_member)
query = (
LabMember.LabMemberInfo() & {"lab_member_name": team_member}
).fetch("google_user_name")
member_dict = {"lab_member_name": decompose_name(team_member)[0]}
query = (LabMember.LabMemberInfo() & member_dict).fetch(
"google_user_name"
)
if not query:
logger.info(
f"Please add the Google user ID for {team_member} in "
+ "LabMember.LabMemberInfo to help manage permissions."
)
labteammember_dict = {
"team_name": team_name,
"lab_member_name": team_member,
**member_dict,
}
member_list.append(labteammember_dict)
# clear cache for this member
Expand Down
Loading