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/2545/dev #2604

Merged
merged 6 commits into from
Nov 17, 2022
Merged

Ticket/2545/dev #2604

merged 6 commits into from
Nov 17, 2022

Conversation

mikejhuang
Copy link
Contributor

@mikejhuang mikejhuang commented Nov 10, 2022

Addresses ticket # 2545
Summary: Get average of all imaging_depths and store it under a data attribute named average_container_depth on the ophys_experiment_table.

  1. Created new data object named AverageContainerDepth
  2. AverageContainerDepth.from_lims takes an ophys_experiment_id and queries for its associated container_id and gets all experiment_ids in that container. Joins the imaging_depth for all experiments. Takes average of all imaging_depths.
  3. Add AverageContainerDepth to ophys_experiment_metadata, multi_plane_metadata, behavior_ophys_metadata, and associated schemas and namespaces.
  4. Update tests to accommodate changes.

…ata, schema, namespace

remove pyproject.toml

remove target_imaging_depth from behaviorcache
@mikejhuang mikejhuang force-pushed the ticket/2545/dev branch 2 times, most recently from c7be0aa to f3f1a68 Compare November 11, 2022 09:27
force target_imaging_depth to be int

lint
@mikejhuang mikejhuang force-pushed the ticket/2545/dev branch 2 times, most recently from 2779e75 to 4b75de6 Compare November 14, 2022 09:10
Copy link
Contributor

@morriscb morriscb left a comment

Choose a reason for hiding this comment

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

Looks good overall, just a few comments/questions. One thing we'll need to do is run this by @matchings and co on the SDK issue regarding the name and structure. If you could post a csv to that issue (#2545) with the updated table. Also, we'll try and fix the failing text before we merge.

field_of_view_shape=ophys_experiment_metadata._field_of_view_shape,
imaging_depth=ophys_experiment_metadata._imaging_depth,
average_container_depth=ophys_experiment_metadata._average_container_depth, # noqa E501
Copy link
Contributor

Choose a reason for hiding this comment

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

Does black really not split this line and the others like it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's been a ticket open for this on the black repository since 2018 and it hasn't been resolved yet.
psf/black#510

A black collaborator acknowledged the issue needs to be fixed in 2020
psf/black#1582 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

huh, if you fix it by hand, does black just revert it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it gets reverted.

Copy link
Contributor

Choose a reason for hiding this comment

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

okay, guess we'll live with it.

Copy link
Contributor

@aamster aamster left a comment

Choose a reason for hiding this comment

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

Looks good. One important comment about adding this value to the json.

sql query variable fix

convert average_container_depth to int
Copy link
Contributor

@aamster aamster left a comment

Choose a reason for hiding this comment

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

Looks good

@mikejhuang mikejhuang merged commit 3608488 into rc/2.16.1 Nov 17, 2022
@mikejhuang mikejhuang deleted the ticket/2545/dev branch November 17, 2022 00:12
@mikejhuang mikejhuang restored the ticket/2545/dev branch November 17, 2022 00:54
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