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

Implement adding data from config file #934

Merged
merged 8 commits into from
Jul 2, 2024
Merged

Conversation

calderast
Copy link
Contributor

@calderast calderast commented Apr 17, 2024

Implement adding data from config file

Allows users to specify Institution, Lab, LabMember, Subject, and CameraDevice information for an nwb file in the associated config file.

Checklist:

  • This PR should be accompanied by a release: (yes/no/unsure)
  • (If release) I have updated the CITATION.cff
  • I have updated the CHANGELOG.md
  • I have added/edited docs/notebooks to reflect the changes

Copy link
Member

@CBroz1 CBroz1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

I started on common_subject and worked up, so the 'why' might be in the later comments. All my comments are along the lines of "This old part of spyglass doesn't do this python thing that I think we'd be better off if we did". What you've got so far looks like it would work perfectly well, but I'm cutting down lines of code in my suggestions

@edeno edeno added the infrastructure Unix, MySQL, etc. settings/issues impacting users label Apr 19, 2024
@edeno
Copy link
Collaborator

edeno commented May 6, 2024

@calderast what is the status of this PR? is it mostly good to go (aside from the change requested above) or are you still working on things?

@samuelbray32 samuelbray32 self-assigned this May 24, 2024
@edeno edeno requested a review from samuelbray32 June 11, 2024 17:51
@edeno edeno marked this pull request as ready for review July 2, 2024 16:23
@edeno edeno merged commit 589e315 into LorenFrankLab:master Jul 2, 2024
7 checks passed
@CBroz1
Copy link
Member

CBroz1 commented Jul 3, 2024

@edeno - The use of def func(a, config={}) bare dictionary as default has the potential to cause issues if run multiple times. It risks data being assigned to this anonymous dict, and inherited the next run.

I recommend reverting and using

def func(a, config=None):
    config = config or dict()

@edeno
Copy link
Collaborator

edeno commented Jul 3, 2024

We can just put in a quick PR to fix.

@edeno
Copy link
Collaborator

edeno commented Jul 3, 2024

Fixed in 08fa17c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Unix, MySQL, etc. settings/issues impacting users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implementation of import config
4 participants