gitea workflows: updated pyproject toml dependencies, tellupdater updates and fix error in test_beamcenter_fit_no_contours
This commit is contained in:
@@ -31,6 +31,15 @@ dependencies = [
|
||||
"httpx>=0.28.1",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
test = [
|
||||
"pytest==9.0.3",
|
||||
"pytest-cov==7.1.0",
|
||||
"pytest-mock==3.14.0",
|
||||
"pytest-qt==4.4.0",
|
||||
"pytest-asyncio==0.25.3",
|
||||
]
|
||||
|
||||
[lint]
|
||||
ignore = ["F401", "F541", "W503", "W504"]
|
||||
|
||||
@@ -45,6 +54,8 @@ url = "https://gitea.psi.ch/api/packages/mx/pypi/simple"
|
||||
testpaths = ["tests"]
|
||||
python_files = ["test_*.py"]
|
||||
norecursedirs = ["scripts", ".venv", "logs", "docs"]
|
||||
asyncio_mode = "auto"
|
||||
asyncio_default_fixture_loop_scope = "function"
|
||||
markers = [
|
||||
"integration: tests that require external systems or secrets",
|
||||
]
|
||||
|
||||
@@ -15,6 +15,10 @@ from aare.common.beamline import MXBeamline, mx_beamline
|
||||
|
||||
logger = setup_logger("aareDAQ")
|
||||
|
||||
# Initialize TELL client and DB wrapper to None so they can be patched in tests
|
||||
tell_client = None
|
||||
aare_db = None
|
||||
|
||||
# Track current state
|
||||
current_pucks = []
|
||||
last_pucks_sent = []
|
||||
@@ -196,6 +200,8 @@ def main():
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Configuration
|
||||
tell_client = TellClient(bl=mx_beamline())
|
||||
aare_db = AareWrapper(bl=mx_beamline())
|
||||
|
||||
beamline = mx_beamline()
|
||||
SLOT_IDENTIFIER = beamline.value.upper()
|
||||
@@ -205,8 +211,4 @@ if __name__ == "__main__":
|
||||
WS_HEADERS = [f"X-Shared-Password: {os.getenv('AAREDB_SHARED_PASSWORD')}"]
|
||||
print(WS_HEADERS)
|
||||
|
||||
# Initialize TELL client and DB wrapper
|
||||
# Use your beamline enum/value
|
||||
tell_client = TellClient(bl=beamline)
|
||||
aare_db = AareWrapper(bl=beamline)
|
||||
main()
|
||||
|
||||
@@ -51,7 +51,7 @@ def test_beamcenter_fit_no_converge():
|
||||
def test_beamcenter_fit_no_contours():
|
||||
# Completely black image, max(contours) will fail
|
||||
image = np.zeros((100, 100), dtype=np.uint8)
|
||||
with pytest.raises(ValueError, match="max\(\) (arg is an empty sequence|iterable argument is empty)"):
|
||||
with pytest.raises(ValueError, match=r"max\(\) (arg is an empty sequence|iterable argument is empty)"):
|
||||
beamcenter_fit(image)
|
||||
|
||||
def test_beamcenter_fit_small_blob():
|
||||
|
||||
Reference in New Issue
Block a user