Skip to content

Commit

Permalink
Release 1.1.4 (#582)
Browse files Browse the repository at this point in the history
- allow 300 barcodes (#579)
- fix publish

---------

Co-authored-by: Luci Pak <84344924+luciipak@users.noreply.github.com>
  • Loading branch information
tannermpeterson and luciipak committed Jul 12, 2023
1 parent 7603c88 commit ebb13f1
Show file tree
Hide file tree
Showing 7 changed files with 150 additions and 236 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ jobs:
cd ui/
npm run build
cd ../electron
npm run build-unstable
npm run build-${{env.RELEASE_CHANNEL}}
- name: S3 Publisher
if: matrix.IS_DEPLOYMENT_CONFIG == true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ jobs:
cd ui/
npm run build
cd ../electron
npm run build
npm run build-unstable
# - name: Archive Installer File
# if: runner.os == 'Windows'
Expand Down
2 changes: 1 addition & 1 deletion controller/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jsonschema = "==4.1.0" # Tanner (11/8/21): latest version is having issues in c
nptyping = "==1.4.4" # Tanner (4/7/22): pinned for pulse3D
numpy = "==1.23.4"
psutil = "==5.8.0"
pulse3d = "==0.33.8"
pulse3d = "==0.33.11"
pyserial = "==3.5"
scipy = "==1.9.3"
semver = "==2.13.0"
Expand Down
335 changes: 115 additions & 220 deletions controller/Pipfile.lock

Large diffs are not rendered by default.

10 changes: 3 additions & 7 deletions controller/src/mantarray_desktop_app/utils/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def _check_new_barcode(barcode: str, beta_2_mode: bool) -> str:
return f"barcode contains invalid year: '{barcode[2:4]}'"
if not 0 < int(barcode[4:7]) < 366:
return f"barcode contains invalid Julian date: '{barcode[4:7]}'"
if not 0 <= int(barcode[7:10]) < 300:
if not 0 <= int(barcode[7:10]) < 400:
return f"barcode contains invalid experiment id: '{barcode[7:10]}'"
# final digit must equal beta version (1/2)
last_digit = int(barcode[-1])
Expand Down Expand Up @@ -405,10 +405,7 @@ def _create_start_recording_command(
if is_hardware_test_recording:
adc_offsets = dict()
for well_idx in range(24):
adc_offsets[well_idx] = {
"construct": 0,
"ref": 0,
}
adc_offsets[well_idx] = {"construct": 0, "ref": 0}
else:
adc_offsets = shared_values_dict["adc_offsets"]
comm_dict["metadata_to_copy_onto_main_file_attributes"].update(
Expand Down Expand Up @@ -439,7 +436,7 @@ def _check_scanned_barcode_vs_user_value(


def _get_timestamp_of_acquisition_sample_index_zero( # yeah, it's kind of long, but Eli (2/27/20) doesn't know a good way to shorten it
shared_values_dict: Dict[str, Any],
shared_values_dict: Dict[str, Any]
) -> datetime.datetime:
board_idx = 0 # board index 0 hardcoded for now
timestamp_of_sample_idx_zero: datetime.datetime = shared_values_dict[
Expand All @@ -458,7 +455,6 @@ def set_this_process_high_priority() -> None: # pragma: no cover


def upload_log_files_to_s3(config_settings: Dict[str, str]) -> None:

if not config_settings.get("auto_upload_on_completion", False):
logger.info("Auto-upload is not turned on, skipping upload of log files.")
return
Expand Down
34 changes: 29 additions & 5 deletions controller/tests/server/test_calling_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,7 @@ def test_start_managed_acquisition__returns_error_code_and_message_if_mantarray_

@pytest.mark.parametrize("test_system_status", [BUFFERING_STATE, LIVE_VIEW_ACTIVE_STATE, RECORDING_STATE])
def test_start_managed_acquisition__returns_error_code_if_already_running(
test_system_status,
client_and_server_manager_and_shared_values,
test_system_status, client_and_server_manager_and_shared_values
):
test_client, _, shared_values_dict = client_and_server_manager_and_shared_values
shared_values_dict["beta_2_mode"] = True
Expand All @@ -599,6 +598,22 @@ def test_start_managed_acquisition__returns_error_code_if_already_running(
assert response.status_code == 304


def test_start_managed_acquisition__returns_200_when_mini_barcode_is_used(
client_and_server_manager_and_shared_values, mocker
):
test_client, _, shared_values_dict = client_and_server_manager_and_shared_values
shared_values_dict["beta_2_mode"] = True
shared_values_dict["mantarray_serial_number"] = {0: MantarrayMcSimulator.default_mantarray_serial_number}
shared_values_dict["stimulator_circuit_statuses"] = {
well_idx: StimulatorCircuitStatuses.MEDIA.name.lower() for well_idx in range(24)
}

test_mini_barcode = "ML22001350-2"

response = test_client.get(f"/start_managed_acquisition?plate_barcode={test_mini_barcode}")
assert response.status_code == 200


def test_start_managed_acquisition__returns_error_code_and_message_called_while_stimulator_checks_are_running(
client_and_server_manager_and_shared_values,
):
Expand Down Expand Up @@ -813,6 +828,17 @@ def test_start_recording__returns_error_code_and_message_if_stim_barcode_is_not_
assert response.status.endswith("Request missing 'stim_barcode' parameter")


def test_start_recording__returns_200_when_mini_barcode_is_sent(client_and_server_manager_and_shared_values):
test_client, _, shared_values_dict = client_and_server_manager_and_shared_values
put_generic_beta_2_start_recording_info_in_dict(shared_values_dict)
shared_values_dict["stimulation_running"] = [True] * 24

barcodes = {"plate_barcode": "ML22001350-2", "stim_barcode": MantarrayMcSimulator.default_stim_barcode}

response = test_client.get(f"/start_recording?{urllib.parse.urlencode(barcodes)}")
assert response.status_code == 200


@pytest.mark.parametrize("test_barcode_type", ["Stim", "Plate"])
@pytest.mark.parametrize(
"test_barcode,expected_error_message",
Expand Down Expand Up @@ -962,9 +988,7 @@ def test_start_recording__returns_error_code_if_already_recording(
assert response.status_code == 304


def test_stop_recording__returns_error_code_if_not_recording(
client_and_server_manager_and_shared_values,
):
def test_stop_recording__returns_error_code_if_not_recording(client_and_server_manager_and_shared_values):
test_client, _, shared_values_dict = client_and_server_manager_and_shared_values
put_generic_beta_2_start_recording_info_in_dict(shared_values_dict)
shared_values_dict["system_status"] = LIVE_VIEW_ACTIVE_STATE
Expand Down
1 change: 0 additions & 1 deletion electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"build-alpha": "check-engines && cross-env-shell NODE_ENV=production RELEASE_CHANNEL=alpha node .electron-nuxt/index.js",
"build-beta": "check-engines && cross-env-shell NODE_ENV=production RELEASE_CHANNEL=beta node .electron-nuxt/index.js",
"build-prod": "check-engines && cross-env-shell NODE_ENV=production RELEASE_CHANNEL=prod node .electron-nuxt/index.js",
"build": "check-engines && cross-env-shell NODE_ENV=production RELEASE_CHANNEL=jest node .electron-nuxt/index.js",
"build-nuxt": "check-engines && cross-env-shell NODE_ENV=production SUPPRESS_ELECTRON_BUILD=true node .electron-nuxt/index.js",
"electron-builder-help": "electron-builder --help",
"postinstall": "electron-builder install-app-deps",
Expand Down

0 comments on commit ebb13f1

Please sign in to comment.