Skip to content

Commit

Permalink
adds proper checking to microns
Browse files Browse the repository at this point in the history
  • Loading branch information
David Erb committed May 2, 2023
1 parent 18a8743 commit 2781015
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/echolocator_lib/guis/aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ async def _export(self, opaque, request_dict):
response = {"error": "blank visit was given"}
return response

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

if barcode_filter is None:
Expand Down
2 changes: 1 addition & 1 deletion tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,6 @@ async def inject(self, xchembku, autolocation: bool, droplocation: bool):
is_usable=True,
)

await xchembku.originate_crystal_well_droplocations([t])
await xchembku.upsert_crystal_well_droplocations([t])

return m
25 changes: 13 additions & 12 deletions tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,27 +252,28 @@ async def __export_wells(self, crystal_wells):
assert len(row) == 3

# Check the well positions are those that are considered "confirmed".
# The position constants are fromt the Swiss3 microns computation.
assert rows[0][0] == "02A_1"
assert int(rows[0][1]) == -198
assert int(rows[0][2]) == -297
assert int(rows[0][1]) == -561
assert int(rows[0][2]) == -842
assert rows[1][0] == "04A_1"
assert int(rows[1][1]) == 2
assert int(rows[1][2]) == -97
assert int(rows[1][1]) == 6
assert int(rows[1][2]) == -274
assert rows[2][0] == "05A_1"
assert int(rows[2][1]) == 102
assert int(rows[2][2]) == 3
assert int(rows[2][1]) == 289
assert int(rows[2][2]) == 9

# Check the results stored in soakdbb3, there should be no change to the first ones.
queried_models = await self.__xchembku.fetch_soakdb3_crystal_wells(
str(self.__visit_directory / "processing")
)
assert len(queried_models) == 3
assert queried_models[0].CrystalWell == "02A_1"
assert int(queried_models[0].EchoX) == -198
assert int(queried_models[0].EchoY) == -297
assert int(queried_models[0].EchoX) == -561
assert int(queried_models[0].EchoY) == -842
assert queried_models[1].CrystalWell == "04A_1"
assert int(queried_models[1].EchoX) == 2
assert int(queried_models[1].EchoY) == -97
assert int(queried_models[1].EchoX) == 6
assert int(queried_models[1].EchoY) == -274
assert queried_models[2].CrystalWell == "05A_1"
assert int(queried_models[2].EchoX) == 102
assert int(queried_models[2].EchoY) == 3
assert int(queried_models[2].EchoX) == 289
assert int(queried_models[2].EchoY) == 9

0 comments on commit 2781015

Please sign in to comment.