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

ticket/PSB-260: Bug fix to VBN #2731

Merged
merged 6 commits into from
Nov 30, 2023
Merged

ticket/PSB-260: Bug fix to VBN #2731

merged 6 commits into from
Nov 30, 2023

Conversation

morriscb
Copy link
Contributor

@morriscb morriscb commented Oct 31, 2023

Expand logic to drop an omitted stimulus as first to the replay block of VBN.

Added logic to allow for VBN data to run through behavior nwb creation. Missing column not in VBN behavior_sessions metadata table.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@CLAassistant
Copy link

CLAassistant commented Oct 31, 2023

CLA assistant check
All committers have signed the CLA.

@morriscb morriscb changed the base branch from master to rc/2.16.0 October 31, 2023 20:39
@morriscb morriscb changed the base branch from rc/2.16.0 to rc/2.16.1 November 11, 2023 00:06
@morriscb morriscb marked this pull request as ready for review November 16, 2023 18:27
@morriscb morriscb changed the base branch from rc/2.16.1 to rc/2.16.2 November 16, 2023 18:57
@@ -12,48 +12,67 @@ class BehaviorSessionMetadataSchema(RaisingSchema):
age_in_days = Int(required=True, description="Subject age")
behavior_session_id = Int(
required=True,
allow_none=True,
Copy link
Contributor

Choose a reason for hiding this comment

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

If allow_none is True, then required should be False

if first_row["omitted"]:
input_df = input_df.drop(first_row.name, axis=0)
else:
first_row = input_df.iloc[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

            first_row = input_df.iloc[0]
            if not pd.isna(first_row["omitted"]):
                if first_row["omitted"]:
                    input_df = input_df.drop(first_row.name, axis=0)

this needs to be modularized and not repeated

"""
if column_name not in bs_row.index:
warn(f"Warning, {column_name} not in metadata table. Unless this "
"has been added it to skip_metadata_key or "
Copy link
Contributor

Choose a reason for hiding this comment

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

typos


return behavior_session_metadata

def _retrieve_column(self, bs_row: pd.Series, column_name: str):
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like this is retrieving a value from a series, the name implies it's retrieving a column from a dataframe

@morriscb morriscb merged commit 3fd24be into rc/2.16.2 Nov 30, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants