Coverage for nexusLIMS/schemas/__init__.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.11.3, created at 2026-03-24 05:23 +0000

1""" 

2Schema tools for NexusLIMS. 

3 

4This module provides: 

5- Type-specific metadata schemas (Image, Spectrum, SpectrumImage, Diffraction) 

6- Pint Quantity integration for physical units 

7- EM Glossary field name mappings 

8- Stage position modeling 

9""" 

10 

11from nexusLIMS.schemas.em_glossary import ( 

12 get_all_emg_terms, 

13 get_all_mapped_fields, 

14 get_description, 

15 get_display_name, 

16 get_emg_id, 

17 get_emg_label, 

18 get_emg_uri, 

19 get_fields_with_emg_ids, 

20 has_emg_id, 

21) 

22from nexusLIMS.schemas.metadata import ( 

23 DiffractionMetadata, 

24 ImageMetadata, 

25 NexusMetadata, 

26 SpectrumImageMetadata, 

27 SpectrumMetadata, 

28 StagePosition, 

29) 

30from nexusLIMS.schemas.pint_types import PintQuantity 

31from nexusLIMS.schemas.units import ( 

32 PREFERRED_UNITS, 

33 get_qudt_uri, 

34 normalize_quantity, 

35 parse_quantity, 

36 quantity_to_xml_parts, 

37 ureg, 

38) 

39 

40__all__ = [ # noqa: RUF022 

41 # Units and Pint integration 

42 "ureg", 

43 "PintQuantity", 

44 "PREFERRED_UNITS", 

45 "parse_quantity", 

46 "normalize_quantity", 

47 "quantity_to_xml_parts", 

48 "get_qudt_uri", 

49 # Metadata schemas 

50 "StagePosition", 

51 "NexusMetadata", 

52 "ImageMetadata", 

53 "SpectrumMetadata", 

54 "SpectrumImageMetadata", 

55 "DiffractionMetadata", 

56 # EM Glossary integration 

57 "get_emg_id", 

58 "get_emg_label", 

59 "get_emg_uri", 

60 "get_display_name", 

61 "get_description", 

62 "get_all_emg_terms", 

63 "get_all_mapped_fields", 

64 "get_fields_with_emg_ids", 

65 "has_emg_id", 

66]