Skip to content

Commit

Permalink
Merge pull request #273 from JaerongA/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ttngu207 authored Nov 3, 2023
2 parents 6a52fe2 + edc8d02 commit bb64808
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 55 deletions.
2 changes: 2 additions & 0 deletions aeon/dj_pipeline/utils/paths.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import pathlib

from aeon.dj_pipeline import repository_config
Expand Down
4 changes: 2 additions & 2 deletions aeon/dj_pipeline/webapps/sciviz/docker-compose-remote.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cd aeon/dj_pipeline/webapps/sciviz/
# cd aeon/dj_pipeline/webapps/sciviz/
# HOST_UID=$(id -u) docker-compose -f docker-compose-remote.yaml up -d
# Access https://www.swc.ucl.ac.uk/aeon/

Expand All @@ -23,7 +23,7 @@ services:
- |
apk add --update git g++ &&
git clone -b datajoint_pipeline https://github.com/SainsburyWellcomeCentre/aeon_mecha.git &&
pip install -e ./aeon_mecha &&
pip install -e ./aeon_mecha --ignore-requires-python &&
gunicorn --bind 0.0.0.0:$${PHARUS_PORT} --workers=4 pharus.server:app
# ports:
Expand Down
74 changes: 21 additions & 53 deletions aeon/dj_pipeline/webapps/sciviz/specsheet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SciViz:
kwargs['end_time'] = datetime.utcfromtimestamp(int(kwargs.pop('endTime')))
kwargs['start_frame'] = int(kwargs.pop('start_frame'))
kwargs['chunk_size'] = int(kwargs.pop('chunk_size'))
return (
NumpyEncoder.dumps(
retrieve_video_frames(**kwargs)
Expand All @@ -46,48 +46,40 @@ SciViz:
columns: 1
row_height: 1000
components:
Colony Entry:
route: /colony_form
Pyrat User Entry:
route: /colony_page_pyrat_user_entry
x: 0
y: 0
height: 0.5
height: 0.3
width: 1
type: form
tables:
- aeon_lab.Colony
- aeon_subject.Subject
- aeon_lab.User
map:
- type: attribute
input: Subject
destination: subject
- type: attribute
input: Reference Weight
destination: reference_weight
- type: attribute
input: Sex
destination: sex
- type: attribute
input: Date of Birth
destination: subject_birth_date
input: SWC Username
destination: user
- type: attribute
input: Note
destination: note
input: Pyrat Responsible Owner
destination: responsible_owner
- type: attribute
input: Subject Description
destination: subject_description
Colony:
route: /colony_page_table
input: Pyrat Responsible ID
destination: responsible_id
Pyrat Subjects:
route: /colony_page_pyrat_subjects
x: 0
y: 0.5
y: 0.3
height: 0.6
width: 1
type: antd-table
restriction: >
def restriction(**kwargs):
return dict(**kwargs)
dj_query: >
def dj_query(aeon_lab):
return {'query': aeon_lab.Colony(), 'fetch_args': []}
def dj_query(aeon_subject):
query = aeon_subject.Subject * aeon_subject.SubjectDetail & 'available = 1'
return {'query': query, 'fetch_args': []}
ExperimentEntry:
route: /experiment_entry
grids:
Expand All @@ -96,7 +88,7 @@ SciViz:
columns: 1
row_height: 1000
components:
Experiment Entry:
New Experiment:
route: /exp_form
x: 0
y: 0
Expand Down Expand Up @@ -125,7 +117,7 @@ SciViz:
input: Experiment Type
destination: aeon_acquisition.ExperimentType

Experiment Subject Entry:
New Experiment Subject:
route: /exp_subject_form
x: 0
y: 0.5
Expand All @@ -142,30 +134,6 @@ SciViz:
input: Subject in the experiment
destination: aeon_subject.Subject

Experiment Directory Entry:
route: /exp_subject_dir_form
x: 0
y: 0.8
height: 0.5

width: 1
type: form
tables:
- aeon_acquisition.Experiment.Directory
map:
- type: table
input: Experiment Name
destination: aeon_acquisition.Experiment
- type: table
input: Directory Type
destination: aeon_acquisition.DirectoryType
- type: table
input: Pipeline Repository
destination: aeon_acquisition.PipelineRepository
- type: attribute
input: Full Path to Experiment Data Directory
destination: directory_path

LookupEntry:
route: /lab_entry
grids:
Expand Down Expand Up @@ -598,7 +566,7 @@ SciViz:
stream_time_selector,
]
restriction: >
def restriction(**kwargs):
def restriction(**kwargs):
return dict(**kwargs)
dj_query: >
def dj_query(aeon_acquisition):
Expand Down

0 comments on commit bb64808

Please sign in to comment.