Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b3b58d2
Added additional failure types and renamed Beckman specific one to be…
andrewsparkes Mar 16, 2022
eb13e0b
Bump flake8-bugbear from 22.1.11 to 22.3.20
dependabot[bot] Mar 21, 2022
08c8408
Bump responses from 0.19.0 to 0.20.0
dependabot[bot] Mar 21, 2022
dee5714
Bump types-requests from 2.27.11 to 2.27.14
dependabot[bot] Mar 21, 2022
64794c4
Merge pull request #541 from sanger/dependabot/pip/flake8-bugbear-22.…
sdjmchattie Mar 21, 2022
06049af
Merge pull request #543 from sanger/dependabot/pip/types-requests-2.2…
sdjmchattie Mar 21, 2022
f34a1bf
Merge pull request #542 from sanger/dependabot/pip/responses-0.20.0
sdjmchattie Mar 21, 2022
60a21f7
Added note to readme to remind to re-build docker image if needed
andrewsparkes Mar 21, 2022
4339b2a
Added cryptography as now seems to be required
andrewsparkes Mar 21, 2022
39ab2ba
Merge branch 'develop' into dpl317-biosero-fail-plates
andrewsparkes Mar 21, 2022
4e52999
Removing cryptography package
andrewsparkes Mar 23, 2022
af1651a
Renamed BECKMAN_FAILURE_TYPES list to be generic as shared with Biosero
andrewsparkes Mar 23, 2022
a2e0965
Adjusted failure type message to remove slash
andrewsparkes Mar 23, 2022
2e91430
Bump flake8-bugbear from 22.3.20 to 22.3.23
dependabot[bot] Mar 24, 2022
9c031cf
Minor failure type text change
andrewsparkes Mar 24, 2022
3ffe9e5
Merge pull request #545 from sanger/dpl317-biosero-fail-plates
andrewsparkes Mar 24, 2022
d6380b4
bump release version
andrewsparkes Mar 24, 2022
79445ac
Merge pull request #550 from sanger/dpl317-biosero-fail-plates
andrewsparkes Mar 24, 2022
6f91453
Merge pull request #549 from sanger/dependabot/pip/flake8-bugbear-22.…
sdjmchattie Mar 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.24.0
2.25.0
258 changes: 125 additions & 133 deletions Pipfile.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ Various environment variables are set in the docker-compose file.
### Running

1. Start the Lighthouse service specified in the `docker-compose.yml` from the
root of the repository:
root of the repository (this builds the docker image if it does not exist, then starts it up i.e. take care to delete old images or add --build):

docker-compose up
or
docker-compose up --build

This will keep running continuously in your terminal window, so to execute further commands you'll need
to open a new terminal window or tab.
Expand Down
2 changes: 1 addition & 1 deletion lighthouse/classes/beckman.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def get_robots() -> Optional[List[Dict[str, str]]]:
def get_failure_types() -> List[Dict[str, str]]:
logger.debug("Getting Beckman failure types information from config...")

failure_types_config = app.config.get("BECKMAN_FAILURE_TYPES")
failure_types_config = app.config.get("ROBOT_FAILURE_TYPES")

if failure_types_config is None or not isinstance(failure_types_config, dict):
message = "no config found or unreadable"
Expand Down
8 changes: 5 additions & 3 deletions lighthouse/config/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,15 @@
"BKRB0003": {"name": "Robot 3", "uuid": "90d8bc7a-2f6e-4a5f-8bea-1e8d27a1ac89"},
"BKRB0004": {"name": "Robot 4", "uuid": "675002fe-f364-47e4-b71f-4fe1bb7b5091"},
}
# TODO: make these the generic failure types
BECKMAN_FAILURE_TYPES = {
# failure types (shared by Beckman and Biosero fail screens in Lighthouse-UI)
ROBOT_FAILURE_TYPES = {
"plate_too_low_empty": "Plate volumes are too low or empty",
"general_software_error": "General software error",
"robot_crashed": "The robot crashed",
"sample_contamination": "Sample contamination occurred",
"power_failure": "Power loss to instrument",
"network_failure": "Cannot retrieve sample data",
"SILAS_error": "Internal communication error in Beckman system",
"SILAS_error": "Internal communication error in robot system",
"instrument_loaded_incorrectly": "Labware has been incorrectly loaded onto instrument",
"other": "Any other failure",
}
Expand Down
4 changes: 2 additions & 2 deletions lighthouse/config/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@
RMQ_LIMS_ID = "LH_TEST"

###
# Beckman config
# Robot config
###
BECKMAN_FAILURE_TYPES = {key: BECKMAN_FAILURE_TYPES[key] for key in ("robot_crashed", "sample_contamination", "other")}
ROBOT_FAILURE_TYPES = {key: ROBOT_FAILURE_TYPES[key] for key in ("robot_crashed", "sample_contamination", "other")}

###
# SS plate creation config (UUID for the plate purpose and study of the plate created)
Expand Down
2 changes: 1 addition & 1 deletion lighthouse/routes/common/cherrypicked_plates.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def fail_plate_from_barcode() -> FlaskResponse:

return bad_request(str(e))
try:
if failure_type not in app.config["BECKMAN_FAILURE_TYPES"]:
if failure_type not in app.config["ROBOT_FAILURE_TYPES"]:
logger.error(f"{ERROR_CHERRYPICKED_FAILURE_RECORD} unknown failure type")

return bad_request(f"'{failure_type}' is not a known cherrypicked plate failure type")
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/test_plates_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def mock_event_helpers():


def any_failure_type(app):
return list(app.config["BECKMAN_FAILURE_TYPES"].keys())[0]
return list(app.config["ROBOT_FAILURE_TYPES"].keys())[0]


# ---------- tests ----------
Expand Down
4 changes: 2 additions & 2 deletions tests/routes/v1/test_beckman.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_get_failure_types_returns_expected_failure_types(app, client, base_url)
@pytest.mark.parametrize("base_url", FAILURE_TYPES_BASE_URLS)
def test_get_failure_types_internal_server_error_no_failure_types_config_exists(app, client, base_url):
with app.app_context():
del app.config["BECKMAN_FAILURE_TYPES"]
del app.config["ROBOT_FAILURE_TYPES"]
response = client.get(base_url)

assert response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR
Expand All @@ -81,7 +81,7 @@ def test_get_failure_types_internal_server_error_no_failure_types_config_exists(
@pytest.mark.parametrize("base_url", FAILURE_TYPES_BASE_URLS)
def test_get_failure_types_internal_server_error_incorrect_format_config(app, client, base_url):
with app.app_context():
app.config["BECKMAN_FAILURE_TYPES"] = ["not the expected dictionary"]
app.config["ROBOT_FAILURE_TYPES"] = ["not the expected dictionary"]
response = client.get(base_url)

assert response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR
Expand Down