Coverage for src/backoffice/compatibility_pure.py: 0%

24 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-08-13 03:07 +0000

1"""Pure Python alternative data models for compatibility reports 

2 

3Usable when installing backoffice without dependencies.""" 

4 

5from __future__ import annotations 

6 

7from collections.abc import Sequence 

8from typing import Any 

9 

10from typing_extensions import Literal, TypedDict 

11 

12PartnerToolName = Literal[ 

13 "ilastik", 

14 "deepimagej", 

15 "icy", 

16 "biapy", 

17 "careamics", 

18] 

19ToolName = Literal["bioimageio.core", PartnerToolName] 

20 

21PARTNER_TOOL_NAMES = ( 

22 "ilastik", 

23 "deepimagej", 

24 "icy", 

25 "biapy", 

26 "careamics", 

27) 

28TOOL_NAMES = ("bioimageio.core", *PARTNER_TOOL_NAMES) 

29ToolNameVersioned = str 

30 

31 

32class BadgeDict(TypedDict): 

33 icon: str 

34 label: str 

35 url: str 

36 

37 

38class ToolCompatibilityReportDict(TypedDict): 

39 status: Literal["passed", "failed", "not-applicable"] 

40 """status of this tool for this resource""" 

41 

42 error: str | None 

43 """error message if `status`=='failed'""" 

44 

45 details: Any 

46 """details to explain the `status`""" 

47 

48 badge: BadgeDict | None 

49 """status badge with a resource specific link to the tool""" 

50 

51 links: Sequence[str] 

52 """the checked resource should link these other bioimage.io resources"""