-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from AllenNeuralDynamics/release-v0.15.0
Release v0.15.0
- Loading branch information
Showing
29 changed files
with
1,168 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Run integration tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
integration_tests: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
env: | ||
AWS_METADATA_MAPPER_ROLE: ${{ secrets.AWS_METADATA_MAPPER_ROLE_PROD }} | ||
AWS_METADATA_MAPPER_BUCKET: ${{ vars.AWS_METADATA_MAPPER_BUCKET_PROD }} | ||
AWS_REGION: ${{ vars.AWS_REGION_PROD }} | ||
MOUNT_S3_URL: ${{ vars.MOUNT_S3_URL }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: | ||
python -m pip install -e .[all] | ||
- name: Configure aws credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: ${{ env.AWS_METADATA_MAPPER_ROLE }} | ||
role-session-name: github-integration-test-session | ||
aws-region: ${{ env.AWS_REGION }} | ||
- name: install mountpoint-s3 | ||
run: | | ||
wget $MOUNT_S3_URL | ||
sudo apt-get update | ||
sudo apt-get install ./mount-s3.deb | ||
- name: mount s3 bucket | ||
run: | | ||
mkdir bucket_mt | ||
mount-s3 $AWS_METADATA_MAPPER_BUCKET bucket_mt | ||
- name: run integration tests | ||
run: | | ||
python tests/integration/bergamo/session.py --input_source "bucket_mt/metadata-mapper-integration-testing/bergamo" IntegrationTestBergamo | ||
umount bucket_mt | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
"""Init package""" | ||
|
||
__version__ = "0.14.0" | ||
__version__ = "0.15.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
"""Module defining JobSettings for Bergamo ETL""" | ||
from decimal import Decimal | ||
from pathlib import Path | ||
from typing import List, Literal, Optional | ||
|
||
from pydantic import Field | ||
from pydantic_settings import BaseSettings | ||
|
||
|
||
class JobSettings(BaseSettings): | ||
"""Data that needs to be input by user. Can be pulled from env vars with | ||
BERGAMO prefix or set explicitly.""" | ||
|
||
job_settings_name: Literal["Bergamo"] = "Bergamo" | ||
input_source: Path = Field( | ||
..., description="Directory of files that need to be parsed." | ||
) | ||
output_directory: Optional[Path] = Field( | ||
default=None, | ||
description=( | ||
"Directory where to save the json file to. If None, then json" | ||
" contents will be returned in the Response message." | ||
), | ||
) | ||
# mandatory fields: | ||
experimenter_full_name: List[str] | ||
subject_id: str | ||
imaging_laser_wavelength: int # user defined | ||
fov_imaging_depth: int | ||
fov_targeted_structure: str | ||
notes: Optional[str] | ||
|
||
# fields with default values | ||
mouse_platform_name: str = "Standard Mouse Tube" # FROM RIG JSON | ||
active_mouse_platform: bool = False | ||
session_type: str = "BCI" | ||
iacuc_protocol: str = "2109" | ||
# should match rig json: | ||
rig_id: str = "442 Bergamo 2p photostim" | ||
behavior_camera_names: List[str] = [ | ||
"Side Face Camera", | ||
"Bottom Face Camera", | ||
] | ||
ch1_filter_names: List[str] = [ | ||
"Green emission filter", | ||
"Emission dichroic", | ||
] | ||
ch1_detector_name: str = "Green PMT" | ||
ch1_daq_name: str = "PXI" | ||
ch2_filter_names: List[str] = ["Red emission filter", "Emission dichroic"] | ||
ch2_detector_name: str = "Red PMT" | ||
ch2_daq_name: str = "PXI" | ||
imaging_laser_name: str = "Chameleon Laser" | ||
|
||
photostim_laser_name: str = "Monaco Laser" | ||
stimulus_device_names: List[str] = ["speaker", "lickport"] # FROM RIG JSON | ||
photostim_laser_wavelength: int = 1040 | ||
fov_coordinate_ml: Decimal = Decimal("1.5") | ||
fov_coordinate_ap: float = Decimal("1.5") | ||
fov_reference: str = "Bregma" | ||
|
||
starting_lickport_position: List[float] = [ | ||
0, | ||
-6, | ||
0, | ||
] # in mm from face of the mouse | ||
behavior_task_name: str = "single neuron BCI conditioning" | ||
hit_rate_trials_0_10: Optional[float] = None | ||
hit_rate_trials_20_40: Optional[float] = None | ||
total_hits: Optional[float] = None | ||
average_hit_rate: Optional[float] = None | ||
trial_num: Optional[float] = None | ||
# ZoneInfo object doesn't serialize well, so we can define it as a str | ||
timezone: str = "US/Pacific" | ||
|
||
class Config: | ||
"""Config to set env var prefix to BERGAMO""" | ||
|
||
env_prefix = "BERGAMO_" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
"""Module defining JobSettings for Bruker ETL""" | ||
|
||
from pathlib import Path | ||
from typing import List, Literal, Optional | ||
|
||
from aind_data_schema.components.devices import ( | ||
MagneticStrength, | ||
ScannerLocation, | ||
) | ||
from pydantic import Field | ||
from pydantic_settings import BaseSettings | ||
|
||
|
||
class JobSettings(BaseSettings): | ||
"""Data that needs to be input by user.""" | ||
|
||
job_settings_name: Literal["Bruker"] = "Bruker" | ||
data_path: Path | ||
output_directory: Optional[Path] = Field( | ||
default=None, | ||
description=( | ||
"Directory where to save the json file to. If None, then json" | ||
" contents will be returned in the Response message." | ||
), | ||
) | ||
experimenter_full_name: List[str] | ||
protocol_id: str = Field(default="", description="Protocol ID") | ||
collection_tz: str = Field( | ||
default="America/Los_Angeles", | ||
description="Timezone string of the collection site", | ||
) | ||
session_type: str | ||
primary_scan_number: int | ||
setup_scan_number: int | ||
scanner_name: str | ||
scan_location: ScannerLocation | ||
magnetic_strength: MagneticStrength | ||
subject_id: str | ||
iacuc_protocol: str | ||
session_notes: str |
Oops, something went wrong.