Coverage for sources/librovore/__/doctab.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.10.4, created at 2025-08-20 22:48 +0000

1# vim: set filetype=python fileencoding=utf-8: 

2# -*- coding: utf-8 -*- 

3 

4#============================================================================# 

5# # 

6# Licensed under the Apache License, Version 2.0 (the "License"); # 

7# you may not use this file except in compliance with the License. # 

8# You may obtain a copy of the License at # 

9# # 

10# http://www.apache.org/licenses/LICENSE-2.0 # 

11# # 

12# Unless required by applicable law or agreed to in writing, software # 

13# distributed under the License is distributed on an "AS IS" BASIS, # 

14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 

15# See the License for the specific language governing permissions and # 

16# limitations under the License. # 

17# # 

18#============================================================================# 

19 

20 

21''' Docstrings table for reuse across entities. ''' 

22 

23 

24from . import imports as __ 

25 

26 

27def access_doctab( name: str ) -> str: 

28 ''' Returns cleaned string corresponding to fragment. ''' 

29 return __.inspect.cleandoc( fragments[ name ] ) 

30 

31 

32fragments: __.cabc.Mapping[ str, str ] = __.types.MappingProxyType( { 

33 

34 # Arguments 

35 

36 'group by argument': 

37 ''' Field to group results by (e.g., 'domain', 'role', 'priority'). ''', 

38 

39 'include snippets argument': 

40 ''' Include content snippets in results. ''', 

41 

42 'term argument': 

43 ''' Search term for documentation content. ''', 

44 

45 'query details argument': 

46 ''' Detail level for inventory results. 

47 

48 One of: Name, Signature, Summary, Documentation 

49 ''', 

50 

51 'results max argument': 

52 ''' Maximum number of results to return. ''', 

53 

54 'server port argument': 

55 ''' TCP port for server. ''', 

56 

57 'location argument': 

58 ''' URL or file path to documentation location. ''', 

59 

60 'term filter argument': 

61 ''' Filter objects by name containing this text. ''', 

62 

63 'transport argument': 

64 ''' Transport: stdio or sse. ''', 

65 

66 # Returns 

67 

68 'content query return': 

69 ''' Documentation content search results with relevance ranking. 

70 Contains documents with signatures, descriptions, content snippets, 

71 relevance scores, and match reasons. 

72 ''', 

73 

74 'inventory query return': 

75 ''' Inventory search results with configurable detail levels. 

76 Contains project metadata, matching objects, and search metadata 

77 with applied filters. 

78 ''', 

79 

80 'inventory summary return': 

81 ''' Human-readable summary of inventory contents. ''', 

82 

83} )