Skip to content

Commit

Permalink
fix odcal
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Jan 15, 2025
1 parent aa03c40 commit 200b9d6
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 36 deletions.
53 changes: 26 additions & 27 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,39 @@
#### Web API changes
- New API to retrieve and set clocks on Pioreactors
- GET `/api/units/<pioreactor_unit>/system/utc_clock`
- GET `/unit_api/system/utc_clock`
- POST `/api/system/utc_clock`
- POST `/unit_api/system/utc_clock`
- GET `/api/units/<pioreactor_unit>/system/utc_clock`
- GET `/unit_api/system/utc_clock`
- POST `/api/system/utc_clock`
- POST `/unit_api/system/utc_clock`
- New log APIs
- GET `/api/experiments/<experiment>/recent_logs`
- GET `/api/experiments/<experiment>/logs`
- GET `/api/logs`
- GET `/api/workers/<pioreactor_unit>/experiments/<experiment>/recent_logs`
- GET `/api/workers/<pioreactor_unit>/experiments/<experiment>/logs`
- GET `/api/units/<pioreactor_unit>/logs`
- POST `/workers/<pioreactor_unit>/experiments/<experiment>/logs`
- GET `/api/experiments/<experiment>/recent_logs`
- GET `/api/experiments/<experiment>/logs`
- GET `/api/logs`
- GET `/api/workers/<pioreactor_unit>/experiments/<experiment>/recent_logs`
- GET `/api/workers/<pioreactor_unit>/experiments/<experiment>/logs`
- GET `/api/units/<pioreactor_unit>/logs`
- POST `/workers/<pioreactor_unit>/experiments/<experiment>/logs`
- New calibrations APIs
- GET `/api/workers/<pioreactor_unit>/calibrations`
- GET `/unit_api/calibrations`
- GET `/unit_api/active_calibrations`
- GET `/api/workers/<pioreactor_unit>/calibrations/<device>`
- GET `/unit_api/calibrations/<device>`
- PATCH `/api/workers/<pioreactor_unit>/active_calibrations/<device>/<cal_name>`
- PATCH `/unit_api/active_calibrations/<device>/<cal_name>`
- DELETE `/api/workers/<pioreactor_unit>/active_calibrations/<device>/<cal_name>`
- DELETE `/api/workers/<pioreactor_unit>/calibrations/<device>/<cal_name>`
- DELETE `/unit_api/active_calibrations/<device>/<cal_name>`
- DELETE `/unit_api/calibrations/<device>/<cal_name>`
- GET `/api/workers/<pioreactor_unit>/calibrations`
- GET `/unit_api/calibrations`
- GET `/unit_api/active_calibrations`
- GET `/api/workers/<pioreactor_unit>/calibrations/<device>`
- GET `/unit_api/calibrations/<device>`
- PATCH `/api/workers/<pioreactor_unit>/active_calibrations/<device>/<cal_name>`
- PATCH `/unit_api/active_calibrations/<device>/<cal_name>`
- DELETE `/api/workers/<pioreactor_unit>/active_calibrations/<device>/<cal_name>`
- DELETE `/api/workers/<pioreactor_unit>/calibrations/<device>/<cal_name>`
- DELETE `/unit_api/active_calibrations/<device>/<cal_name>`
- DELETE `/unit_api/calibrations/<device>/<cal_name>`
- New API for plugins
- GET `/api/units/<pioreactor_unit>/plugins/installed`
- PATCH `/api/units/<pioreactor_unit>/plugins/install`
- PATCH `/api/units/<pioreactor_unit>/plugins/uninstall`
- GET `/api/units/<pioreactor_unit>/plugins/installed`
- PATCH `/api/units/<pioreactor_unit>/plugins/install`
- PATCH `/api/units/<pioreactor_unit>/plugins/uninstall`
- Changed the `settings` API (see docs).
- New `/api/units` that returns a list of units (this is workers & leader). If leader is also a worker, then it's identical to `/api/workers`
- New `/api/experiments/<experiment>/historical_worker_assignments` that stores historical assignments to experiments
- New Path API for getting the dir structure of `~/.pioreactor`:
- `/unit_api/system/path/<path>`
- `/unit_api/system/path/<path>`
### Enhancements
- new SQL table for `historical_experiment_assignments` that stores historical assignments to experiments.
Expand Down Expand Up @@ -101,7 +101,6 @@
- fixed Stirring not updating to best DC % when using a calibration after changing target RPM



### 24.12.10
- Hotfix for UI settings bug

Expand Down
6 changes: 1 addition & 5 deletions update_scripts/upcoming/cal_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ def convert_old_to_new_pump(old_cal: dict) -> tuple[SimplePeristalticPumpCalibra
created_at=old_cal["created_at"],
curve_data_=[old_cal["duration_"], old_cal["bias_"]],
curve_type="poly",
x="Duration",
y="Volume",
recorded_data={"x": old_cal["durations"], "y": old_cal["volumes"]},
hz=old_cal["hz"],
dc=old_cal["dc"],
Expand All @@ -38,9 +36,7 @@ def convert_old_to_new_od(old_cal: dict) -> tuple[ODCalibration, str]:
created_at=old_cal["created_at"],
curve_data_=old_cal["curve_data_"],
curve_type="poly",
x="Voltage",
y="OD600",
recorded_data={"x": old_cal["voltages"], "y": old_cal["od600s"]},
recorded_data={"y": old_cal["voltages"], "x": old_cal["od600s"]},
angle=old_cal["type"].split("_")[1],
pd_channel=old_cal["pd_channel"],
ir_led_intensity=old_cal["ir_led_intensity"],
Expand Down
10 changes: 6 additions & 4 deletions update_scripts/upcoming/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ STORAGE_DIR=/home/$USERNAME/.pioreactor/storage
# 1. create persistant db in all pioreactors
DB=$STORAGE_DIR/local_persistent_pioreactor_metadata.sqlite

touch $DB
touch $DB-shm
touch $DB-wal
if [ ! -f "$DB" ]; then
touch $DB
touch $DB-shm
touch $DB-wal
fi

chown -R $USERNAME:www-data $DB*

# 2. make a calibration dir in all pioreactors
sudo -u $USERNAME mkdir "$STORAGE_DIR"/calibrations
sudo -u $USERNAME mkdir -p "$STORAGE_DIR"/calibrations

# 3. install pyyaml (only leader has it, but workers need it now)
sudo pip3 install "$SCRIPT_DIR"/PyYAML-6.0.2-cp311-cp311-linux_armv7l.whl
Expand Down

0 comments on commit 200b9d6

Please sign in to comment.