Skip to content

Commit 2781015

Browse files
author
David Erb
committed
adds proper checking to microns
1 parent 18a8743 commit 2781015

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

src/echolocator_lib/guis/aiohttp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ async def _export(self, opaque, request_dict):
414414
response = {"error": "blank visit was given"}
415415
return response
416416

417+
# Get the barcode string submitted from the html form.
417418
barcode_filter = request_dict.get("barcode_filter")
418419

419420
if barcode_filter is None:

tests/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,6 @@ async def inject(self, xchembku, autolocation: bool, droplocation: bool):
154154
is_usable=True,
155155
)
156156

157-
await xchembku.originate_crystal_well_droplocations([t])
157+
await xchembku.upsert_crystal_well_droplocations([t])
158158

159159
return m

tests/test_export.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -252,27 +252,28 @@ async def __export_wells(self, crystal_wells):
252252
assert len(row) == 3
253253

254254
# Check the well positions are those that are considered "confirmed".
255+
# The position constants are fromt the Swiss3 microns computation.
255256
assert rows[0][0] == "02A_1"
256-
assert int(rows[0][1]) == -198
257-
assert int(rows[0][2]) == -297
257+
assert int(rows[0][1]) == -561
258+
assert int(rows[0][2]) == -842
258259
assert rows[1][0] == "04A_1"
259-
assert int(rows[1][1]) == 2
260-
assert int(rows[1][2]) == -97
260+
assert int(rows[1][1]) == 6
261+
assert int(rows[1][2]) == -274
261262
assert rows[2][0] == "05A_1"
262-
assert int(rows[2][1]) == 102
263-
assert int(rows[2][2]) == 3
263+
assert int(rows[2][1]) == 289
264+
assert int(rows[2][2]) == 9
264265

265266
# Check the results stored in soakdbb3, there should be no change to the first ones.
266267
queried_models = await self.__xchembku.fetch_soakdb3_crystal_wells(
267268
str(self.__visit_directory / "processing")
268269
)
269270
assert len(queried_models) == 3
270271
assert queried_models[0].CrystalWell == "02A_1"
271-
assert int(queried_models[0].EchoX) == -198
272-
assert int(queried_models[0].EchoY) == -297
272+
assert int(queried_models[0].EchoX) == -561
273+
assert int(queried_models[0].EchoY) == -842
273274
assert queried_models[1].CrystalWell == "04A_1"
274-
assert int(queried_models[1].EchoX) == 2
275-
assert int(queried_models[1].EchoY) == -97
275+
assert int(queried_models[1].EchoX) == 6
276+
assert int(queried_models[1].EchoY) == -274
276277
assert queried_models[2].CrystalWell == "05A_1"
277-
assert int(queried_models[2].EchoX) == 102
278-
assert int(queried_models[2].EchoY) == 3
278+
assert int(queried_models[2].EchoX) == 289
279+
assert int(queried_models[2].EchoY) == 9

0 commit comments

Comments
 (0)