Skip to content

Commit

Permalink
Merge pull request #1153 from AllenNeuralDynamics/release-v1.2.0
Browse files Browse the repository at this point in the history
Release v1.2.0
  • Loading branch information
dbirman authored Nov 12, 2024
2 parents 73701a9 + 4a0b629 commit 04b5341
Show file tree
Hide file tree
Showing 54 changed files with 71,116 additions and 61,371 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/run_dev_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request:
branches:
- dev
merge_group:
branches:
- dev

jobs:
linters:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/run_main_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- '*release*'
- main
merge_group:
branches:
- '*release*'
- main

jobs:
linters:
Expand Down
22 changes: 14 additions & 8 deletions docs/source/quality_control.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ We recommend that you write PNG files for images and static multi-panel figures,

**Metadata**

We'll post documentation on how to append `QCEvaluations` to pre-existing quality_control.json files, via DocDB using the `aind-data-access-api`, in the future.
We'll post documentation on how to append `QCEvaluations` to pre-existing quality_control.json files, via DocDB using the `aind-data-access-api`, in the future. For now, you can refer to the code snippet in the [`aind-qc-capsule-example`](https://github.com/AllenNeuralDynamics/aind-qc-capsule-example/).

**References**

Expand All @@ -90,18 +90,24 @@ The QC portal automatically calls ``QualityControl.evaluate_status()`` whenever

**Q: How do reference URLs get pulled into the QC Portal?**

Each metric is associated with a reference figure, image, or video. The QC portal can interpret four ways of setting the reference field:
Each metric is associated with a reference figure (PDF preferred), image (png preferred), or video (mp4 preferred). The QC portal can interpret four ways of setting the reference field:

- Provide a relative path to a file in this data asset's S3 bucket
- Provide a relative path to a file in this data asset's S3 bucket, i.e. "figures/my_figure.png". The mount/asset name should not be included.
- Provide a url to a FigURL figure
- Provide the name of one of the interactive plots, e.g. "ecephys-drift-map"

<!-- There are many situations where it's helpful to be able to "swipe" between two images. If you have two identical images separated by a ';' the portal will allow users to swipe between them. For example, you might show snippets of the raw electrophysiology raster with detected spikes overlaid on the swipe. -->

**Q: I saw fancy things like dropdowns in the QC Portal, how do I do that?**

By default the QC portal displays dictionaries as tables where the values can be edited. We also support a few special cases to allow a bit more flexibility or to constrain the actions that manual annotators can take. Install the `aind-qcportal-schema` package and set the `value` field to the corresponding pydantic object to use these.
By default the QC portal displays dictionaries as tables where the values can be edited. We also support a few special cases to allow a bit more flexibility or to constrain the actions that manual annotators can take. Install the [`aind-qcportal-schema`](https://github.com/AllenNeuralDynamics/aind-qcportal-schema/blob/dev/src/aind_qcportal_schema/metric_value.py) package and set the `value` field to the corresponding pydantic object to use these.

### Multi-asset QC

During analysis there are many situations where multiple data assets need to be pulled together, often for comparison. For example, FOVs across imaging sessions or recording sessions from a chronic probe might need to get matched up across days. When a `QCEvaluation` is being calculated from multiple assets it should be tagged with `Stage:MULTI_ASSET` and each of its `QCMetric` objects needs to track the assets that were used to generate that metric in the `evaluated_assets` list.

**Q: Where do I store multi-asset QC?**

You should follow the preferred/alternate workflows described above. If your multi-asset analysis pipeline generates a new data asset, put the QC there. If your pipeline does not generate an asset, push a copy of each `QCEvaluation` back to **each** individual data asset.

### Multi-session QC
**Q: I want to be able to store data about each of the evaluated assets in this metric**

[Details coming soon, this is under discussion]
Take a look at the `MultiAssetMetric` class in `aind-qc-portal-schema`. It allows you to pass a list of values which will be matched up with the `evaluated_assets` names. You can also include options which will appear as dropdowns or checkboxes.
13 changes: 7 additions & 6 deletions docs/source/session.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ the Stimulus Class, but the trial-by-trial stimulus information belongs in the N

Great question! We began defining specific classes for different stimulus and behavior modalities, but quickly found
that this won't be scalable. You can currently use these classes if they work for you. However, in the long run we
would like this to move into the `script` field. This field uses the Software class, which has a field for stimulus
parameters, where users can define their own dictionary of parameters used in the script to control the stimulus/
behavior. We recommend that you use software to define these and be consistent within your projects. Please reach out
with questions and we can help you with this.
would like this to move into the `script` field. This field uses the Software class, which has a field for
`parameters`. Users should use this to document the parameters used to control the stimulus or behavior. parameters
should have unambiguous names (e.g. "trial_duration" rather than "duration") and units must be provided as a separate
field (e.g. "trial_duration_unit"). We recommend that you use software to define these and be consistent within your
projects. Please reach out with questions and we can help you with this.

**Q: What should I put for the `session_type`?**

Expand All @@ -77,8 +78,8 @@ and SLIMS. Until this is fully functional, these files must be created manually.
**Q: How do I know if my mouse platform is "active"?**

There are experiments in which the mouse platform is actively controlled by the stimulus/behavior software - i.e. the
resistance of the wheel is adjusted based on the subjects activity. This is an "active" mouse platform. Most platforms
we use are not active in this way.
resistance of the wheel is adjusted based on the subject's activity. This is an "active" mouse platform. Most platforms
we use are currently not active in this way.

**Q: How do I use the Calibration field?**

Expand Down
2 changes: 1 addition & 1 deletion examples/aibs_smartspim_instrument.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/instrument.py",
"schema_version": "1.0.1",
"schema_version": "1.0.3",
"instrument_id": "440_SmartSPIM2_20231004",
"modification_date": "2023-10-04",
"instrument_type": "SmartSPIM",
Expand Down
2 changes: 1 addition & 1 deletion examples/aibs_smartspim_procedures.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/procedures.py",
"schema_version": "1.1.1",
"schema_version": "1.1.3",
"subject_id": "651286",
"subject_procedures": [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/aind_smartspim_instrument.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/instrument.py",
"schema_version": "1.0.1",
"schema_version": "1.0.3",
"instrument_id": "440_SmartSPIM1_20231004",
"modification_date": "2023-10-04",
"instrument_type": "SmartSPIM",
Expand Down
2 changes: 1 addition & 1 deletion examples/bergamo_ophys_session.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/session.py",
"schema_version": "1.0.1",
"schema_version": "1.0.3",
"protocol_id": [],
"experimenter_full_name": [
"John Doe"
Expand Down
2 changes: 1 addition & 1 deletion examples/data_description.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/data_description.py",
"schema_version": "1.0.1",
"schema_version": "1.0.3",
"license": "CC-BY-4.0",
"platform": {
"name": "Electrophysiology platform",
Expand Down
6 changes: 3 additions & 3 deletions examples/ephys_rig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/rig.py",
"schema_version": "1.0.1",
"schema_version": "1.0.3",
"rig_id": "323_EPHYS1_20231003",
"modification_date": "2023-10-03",
"mouse_platform": {
Expand Down Expand Up @@ -842,8 +842,8 @@
"firmware_version": null,
"hardware_version": null,
"harp_device_type": {
"name": "Behavior",
"whoami": 1216
"whoami": 1216,
"name": "Behavior"
},
"core_version": "2.1",
"tag_version": null,
Expand Down
2 changes: 1 addition & 1 deletion examples/ephys_session.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/session.py",
"schema_version": "1.0.1",
"schema_version": "1.0.3",
"protocol_id": [],
"experimenter_full_name": [
"Max Quibble",
Expand Down
2 changes: 1 addition & 1 deletion examples/exaspim_acquisition.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/acquisition.py",
"schema_version": "1.0.1",
"schema_version": "1.0.3",
"protocol_id": [],
"experimenter_full_name": [
"###"
Expand Down
2 changes: 1 addition & 1 deletion examples/exaspim_instrument.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/instrument.py",
"schema_version": "1.0.1",
"schema_version": "1.0.3",
"instrument_id": "440_exaSPIM1-20231004",
"modification_date": "2023-10-04",
"instrument_type": "exaSPIM",
Expand Down
6 changes: 3 additions & 3 deletions examples/fip_behavior_rig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/rig.py",
"schema_version": "1.0.1",
"schema_version": "1.0.3",
"rig_id": "447_FIP-Behavior_20000101",
"modification_date": "2000-01-01",
"mouse_platform": {
Expand Down Expand Up @@ -909,8 +909,8 @@
"firmware_version": "FTDI version:",
"hardware_version": null,
"harp_device_type": {
"name": "Behavior",
"whoami": 1216
"whoami": 1216,
"name": "Behavior"
},
"core_version": "2.1",
"tag_version": null,
Expand Down
6 changes: 3 additions & 3 deletions examples/fip_ophys_rig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/rig.py",
"schema_version": "1.0.1",
"schema_version": "1.0.3",
"rig_id": "428_FIP1_20231003",
"modification_date": "2023-10-03",
"mouse_platform": {
Expand Down Expand Up @@ -879,8 +879,8 @@
"firmware_version": null,
"hardware_version": null,
"harp_device_type": {
"name": "Behavior",
"whoami": 1216
"whoami": 1216,
"name": "Behavior"
},
"core_version": "2.1",
"tag_version": null,
Expand Down
2 changes: 1 addition & 1 deletion examples/mri_session.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/session.py",
"schema_version": "1.0.1",
"schema_version": "1.0.3",
"protocol_id": [
"dx.doi.org/10.57824/protocols.io.bh7kl4n6"
],
Expand Down
2 changes: 1 addition & 1 deletion examples/multiplane_ophys_session.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/session.py",
"schema_version": "1.0.1",
"schema_version": "1.0.3",
"protocol_id": [],
"experimenter_full_name": [
"John Doe"
Expand Down
2 changes: 1 addition & 1 deletion examples/ophys_procedures.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/procedures.py",
"schema_version": "1.1.1",
"schema_version": "1.1.3",
"subject_id": "625100",
"subject_procedures": [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/ophys_session.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/session.py",
"schema_version": "1.0.1",
"schema_version": "1.0.3",
"protocol_id": [],
"experimenter_full_name": [
"John Doe"
Expand Down
2 changes: 1 addition & 1 deletion examples/procedures.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/procedures.py",
"schema_version": "1.1.1",
"schema_version": "1.1.3",
"subject_id": "625100",
"subject_procedures": [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/processing.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/processing.py",
"schema_version": "1.1.1",
"schema_version": "1.1.3",
"processing_pipeline": {
"data_processes": [
{
Expand Down
Loading

0 comments on commit 04b5341

Please sign in to comment.