sunholo 0.58.5__tar.gz → 0.59.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. {sunholo-0.58.5 → sunholo-0.59.0}/PKG-INFO +3 -2
  2. {sunholo-0.58.5 → sunholo-0.59.0}/setup.py +2 -1
  3. sunholo-0.59.0/sunholo/cli/configs.py +111 -0
  4. sunholo-0.59.0/sunholo/utils/config_schema.py +121 -0
  5. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo.egg-info/PKG-INFO +3 -2
  6. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo.egg-info/SOURCES.txt +1 -0
  7. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo.egg-info/requires.txt +1 -0
  8. sunholo-0.58.5/sunholo/cli/configs.py +0 -29
  9. {sunholo-0.58.5 → sunholo-0.59.0}/LICENSE.txt +0 -0
  10. {sunholo-0.58.5 → sunholo-0.59.0}/MANIFEST.in +0 -0
  11. {sunholo-0.58.5 → sunholo-0.59.0}/README.md +0 -0
  12. {sunholo-0.58.5 → sunholo-0.59.0}/setup.cfg +0 -0
  13. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/__init__.py +0 -0
  14. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/agents/__init__.py +0 -0
  15. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/agents/chat_history.py +0 -0
  16. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/agents/dispatch_to_qa.py +0 -0
  17. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/agents/fastapi/__init__.py +0 -0
  18. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/agents/fastapi/base.py +0 -0
  19. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/agents/fastapi/qna_routes.py +0 -0
  20. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/agents/flask/__init__.py +0 -0
  21. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/agents/flask/base.py +0 -0
  22. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/agents/flask/qna_routes.py +0 -0
  23. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/agents/langserve.py +0 -0
  24. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/agents/pubsub.py +0 -0
  25. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/agents/route.py +0 -0
  26. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/agents/special_commands.py +0 -0
  27. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/agents/test_chat_history.py +0 -0
  28. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/archive/__init__.py +0 -0
  29. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/archive/archive.py +0 -0
  30. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/auth/__init__.py +0 -0
  31. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/auth/run.py +0 -0
  32. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/bots/__init__.py +0 -0
  33. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/bots/discord.py +0 -0
  34. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/bots/webapp.py +0 -0
  35. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/chunker/__init__.py +0 -0
  36. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/chunker/data_to_embed_pubsub.py +0 -0
  37. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/chunker/doc_handling.py +0 -0
  38. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/chunker/images.py +0 -0
  39. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/chunker/loaders.py +0 -0
  40. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/chunker/message_data.py +0 -0
  41. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/chunker/pdfs.py +0 -0
  42. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/chunker/publish.py +0 -0
  43. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/chunker/splitter.py +0 -0
  44. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/cli/__init__.py +0 -0
  45. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/cli/cli.py +0 -0
  46. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/cli/cli_init.py +0 -0
  47. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/cli/deploy.py +0 -0
  48. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/components/__init__.py +0 -0
  49. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/components/llm.py +0 -0
  50. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/components/prompt.py +0 -0
  51. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/components/retriever.py +0 -0
  52. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/components/vectorstore.py +0 -0
  53. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/database/__init__.py +0 -0
  54. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/database/alloydb.py +0 -0
  55. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/database/database.py +0 -0
  56. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/database/lancedb.py +0 -0
  57. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/database/sql/sb/create_function.sql +0 -0
  58. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/database/sql/sb/create_function_time.sql +0 -0
  59. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/database/sql/sb/create_table.sql +0 -0
  60. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/database/sql/sb/delete_source_row.sql +0 -0
  61. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/database/sql/sb/return_sources.sql +0 -0
  62. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/database/sql/sb/setup.sql +0 -0
  63. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/database/static_dbs.py +0 -0
  64. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/database/uuid.py +0 -0
  65. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/embedder/__init__.py +0 -0
  66. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/embedder/embed_chunk.py +0 -0
  67. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/gcs/__init__.py +0 -0
  68. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/gcs/add_file.py +0 -0
  69. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/gcs/download_url.py +0 -0
  70. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/gcs/metadata.py +0 -0
  71. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/langfuse/__init__.py +0 -0
  72. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/langfuse/callback.py +0 -0
  73. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/langfuse/prompts.py +0 -0
  74. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/llamaindex/__init__.py +0 -0
  75. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/llamaindex/generate.py +0 -0
  76. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/llamaindex/import_files.py +0 -0
  77. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/logging.py +0 -0
  78. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/lookup/__init__.py +0 -0
  79. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/lookup/model_lookup.yaml +0 -0
  80. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/patches/__init__.py +0 -0
  81. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/patches/langchain/__init__.py +0 -0
  82. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/patches/langchain/lancedb.py +0 -0
  83. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/patches/langchain/vertexai.py +0 -0
  84. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/pubsub/__init__.py +0 -0
  85. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/pubsub/process_pubsub.py +0 -0
  86. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/pubsub/pubsub_manager.py +0 -0
  87. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/qna/__init__.py +0 -0
  88. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/qna/parsers.py +0 -0
  89. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/qna/retry.py +0 -0
  90. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/streaming/__init__.py +0 -0
  91. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/streaming/content_buffer.py +0 -0
  92. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/streaming/langserve.py +0 -0
  93. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/streaming/streaming.py +0 -0
  94. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/summarise/__init__.py +0 -0
  95. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/summarise/summarise.py +0 -0
  96. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/utils/__init__.py +0 -0
  97. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/utils/big_context.py +0 -0
  98. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/utils/config.py +0 -0
  99. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/utils/gcp.py +0 -0
  100. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/utils/parsers.py +0 -0
  101. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/vertex/__init__.py +0 -0
  102. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo/vertex/init_vertex.py +0 -0
  103. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo.egg-info/dependency_links.txt +0 -0
  104. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo.egg-info/entry_points.txt +0 -0
  105. {sunholo-0.58.5 → sunholo-0.59.0}/sunholo.egg-info/top_level.txt +0 -0
  106. {sunholo-0.58.5 → sunholo-0.59.0}/test/test_dispatch_to_qa.py +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.58.5
3
+ Version: 0.59.0
4
4
  Summary: Large Language Model DevOps - a package to help deploy LLMs to the Cloud.
5
5
  Home-page: https://github.com/sunholo-data/sunholo-py
6
- Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.58.5.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.59.0.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
19
  Description-Content-Type: text/markdown
20
20
  License-File: LICENSE.txt
21
+ Requires-Dist: jsonschema
21
22
  Requires-Dist: langchain
22
23
  Requires-Dist: langchain_experimental
23
24
  Requires-Dist: langchain-community
@@ -1,7 +1,7 @@
1
1
  from setuptools import setup, find_packages
2
2
 
3
3
  # Define your base version
4
- version = '0.58.5'
4
+ version = '0.59.0'
5
5
 
6
6
  setup(
7
7
  name='sunholo',
@@ -27,6 +27,7 @@ setup(
27
27
  },
28
28
  install_requires=[
29
29
  # Base dependencies
30
+ "jsonschema",
30
31
  "langchain",
31
32
  "langchain_experimental",
32
33
  "langchain-community",
@@ -0,0 +1,111 @@
1
+ from ..utils.config import load_all_configs
2
+ from ..utils.config_schema import SCHEMAS, VAC_SUBCONFIG_SCHEMA
3
+ from jsonschema import validate, ValidationError
4
+ from pprint import pprint
5
+
6
+ def validate_config(config, schema):
7
+ try:
8
+ validate(instance=config, schema=schema)
9
+ print("OK: Validated schema")
10
+ return True
11
+ except ValidationError as err:
12
+ error_path = " -> ".join(map(str, err.path))
13
+ #print(f"ERROR: Validation error at '{error_path}': {err.message}")
14
+ raise ValidationError(f"Validation error at '{error_path}': {err.message}")
15
+
16
+ def list_configs(args):
17
+ """
18
+ Lists configuration files, filtered by kind or VAC name if specified, and optionally validates them.
19
+
20
+ Args:
21
+ args: Command-line arguments including 'kind', 'vac', and 'validate' for filtering and validation.
22
+
23
+ Examples:
24
+ # List all configurations
25
+ list_configs(args)
26
+
27
+ # List configurations filtered by kind
28
+ args.kind = 'vacConfig'
29
+ list_configs(args)
30
+
31
+ # List configurations filtered by VAC name
32
+ args.vac = 'edmonbrain'
33
+ list_configs(args)
34
+
35
+ # List configurations filtered by both kind and VAC name
36
+ args.kind = 'vacConfig'
37
+ args.vac = 'edmonbrain'
38
+ list_configs(args)
39
+
40
+ # Validate configurations
41
+ args.validate = True
42
+ list_configs(args)
43
+ """
44
+ print("Listing configuration files")
45
+ configs = load_all_configs()
46
+ filtered_configs = {}
47
+
48
+ if args.kind and args.vac:
49
+ if args.kind in configs:
50
+ kind_config = configs[args.kind]
51
+ vac_config = kind_config.get('vac', {}).get(args.vac)
52
+ if vac_config:
53
+ filtered_configs[args.kind] = {args.vac: vac_config}
54
+ else:
55
+ print(f"No configurations found for kind: {args.kind} with VAC: {args.vac}")
56
+ else:
57
+ print(f"No configurations found for kind: {args.kind}")
58
+ elif args.kind:
59
+ if args.kind in configs:
60
+ filtered_configs[args.kind] = configs[args.kind]
61
+ else:
62
+ print(f"No configurations found for kind: {args.kind}")
63
+ elif args.vac:
64
+ for kind, config in configs.items():
65
+ vac_config = config.get('vac', {}).get(args.vac)
66
+ if vac_config:
67
+ if kind not in filtered_configs:
68
+ filtered_configs[kind] = {}
69
+ filtered_configs[kind][args.vac] = vac_config
70
+ if not filtered_configs:
71
+ print(f"No configurations found with VAC: {args.vac}")
72
+ else:
73
+ filtered_configs = configs
74
+
75
+ for kind, config in filtered_configs.items():
76
+ print(f"## Config kind: {kind}")
77
+ pprint(config)
78
+
79
+ if args.validate:
80
+ for kind, config in filtered_configs.items():
81
+ print(f"Validating configuration for kind: {kind}")
82
+ if args.kind == "vacConfig" and args.vac:
83
+ print(f"Validating vacConfig for {args.vac}")
84
+ if not validate_config(config[args.vac], VAC_SUBCONFIG_SCHEMA):
85
+ print(f"Validation failed for sub-kind: {args.vac}")
86
+ elif kind in SCHEMAS:
87
+ if not validate_config(config, SCHEMAS[kind]):
88
+ print(f"FAIL: Validation failed for kind: {kind}")
89
+ else:
90
+ print(f"No schema available to validate configuration for kind: {kind}")
91
+
92
+
93
+
94
+ def setup_list_configs_subparser(subparsers):
95
+ """
96
+ Sets up an argparse subparser for the 'list-configs' command.
97
+
98
+ Args:
99
+ subparsers: The subparsers object from argparse.ArgumentParser().
100
+
101
+ Examples:
102
+ # Set up the subparser for the 'list-configs' command
103
+ parser = argparse.ArgumentParser()
104
+ subparsers = parser.add_subparsers()
105
+ setup_list_configs_subparser(subparsers)
106
+ """
107
+ list_configs_parser = subparsers.add_parser('list-configs', help='Lists all configuration files and their details e.g. `sunholo list-configs --kind=vacConfig --vac=edmonbrain`')
108
+ list_configs_parser.add_argument('--kind', help='Filter configurations by kind e.g. `--kind=vacConfig`')
109
+ list_configs_parser.add_argument('--vac', help='Filter configurations by VAC name e.g. `--vac=edmonbrain`')
110
+ list_configs_parser.add_argument('--validate', action='store_true', help='Validate the configuration files.')
111
+ list_configs_parser.set_defaults(func=list_configs)
@@ -0,0 +1,121 @@
1
+ VAC_SUBCONFIG_SCHEMA = {
2
+ "type": "object",
3
+ "properties": {
4
+ "llm": {"type": "string"},
5
+ "agent": {"type": "string"},
6
+ "model": {"type": "string"},
7
+ "prompt": {"type": "string"},
8
+ "chunker": {
9
+ "type": "object",
10
+ "properties": {
11
+ "type": {"type": "string"},
12
+ "llm": {"type": "string"},
13
+ "chunk_size": {"type": "integer"},
14
+ "overlap": {"type": "integer"}
15
+ },
16
+ "additionalProperties": False
17
+ },
18
+ "memory": {
19
+ "type": "array",
20
+ "items": {
21
+ "type": "object",
22
+ "patternProperties": {
23
+ ".*-vectorstore": {
24
+ "type": "object",
25
+ "properties": {
26
+ "vectorstore": {"type": "string"},
27
+ "self_query": {"type": "boolean"},
28
+ "provider": {"type": "string"},
29
+ "k": {"type": "integer"},
30
+ "vector_name": {"type": "string"},
31
+ "read_only": {"type": "boolean"},
32
+ "llm": {"type": "string"}
33
+ },
34
+ "required": ["vectorstore"]
35
+ }
36
+ }
37
+ }
38
+ },
39
+ "gcp_config": {
40
+ "type": "object",
41
+ "properties": {
42
+ "project_id": {"type": "string"},
43
+ "endpoint_id": {"type": "integer"},
44
+ "location": {"type": "string"}
45
+ }
46
+ },
47
+ "alloydb_config": {
48
+ "type": "object",
49
+ "properties": {
50
+ "project_id": {"type": "string"},
51
+ "region": {"type": "string"},
52
+ "cluster": {"type": "string"},
53
+ "instance": {"type": "string"},
54
+ "database": {"type": "string"}
55
+ }
56
+ },
57
+ "secrets": {
58
+ "type": "array",
59
+ "items": {"type": "string"}
60
+ },
61
+ "display_name": {"type": "string"},
62
+ "avatar_url": {"type": "string"},
63
+ "description": {"type": "string"},
64
+ "memory_k": {"type": "integer"}
65
+ },
66
+ "required": ["llm", "agent"]
67
+ }
68
+
69
+
70
+ VAC_CONFIG_SCHEMA = {
71
+ "type": "object",
72
+ "properties": {
73
+ "kind": {"type": "string"},
74
+ "apiVersion": {"type": "string"},
75
+ "gcp_config": {
76
+ "type": "object",
77
+ "properties": {
78
+ "project_id": {"type": "string"},
79
+ "location": {"type": "string"}
80
+ },
81
+ "required": ["project_id", "location"]
82
+ },
83
+ "vac": {
84
+ "type": "object",
85
+ "patternProperties": {
86
+ ".*": VAC_SUBCONFIG_SCHEMA
87
+ }
88
+ }
89
+ },
90
+ "required": ["kind", "apiVersion", "gcp_config", "vac"]
91
+ }
92
+
93
+ PROMPT_CONFIG_SCHEMA = {
94
+ "type": "object",
95
+ "properties": {
96
+ "kind": {"type": "string"},
97
+ "apiVersion": {"type": "string"},
98
+ "prompts": {
99
+ "type": "object",
100
+ "patternProperties": {
101
+ ".*": {
102
+ "type": "object",
103
+ "properties": {
104
+ "chunk_summary": {"type": "string"},
105
+ "intro": {"type": "string"},
106
+ "template": {"type": "string"},
107
+ "chat_summary": {"type": "string"},
108
+ "summarise_known_question": {"type": "string"}
109
+ }
110
+ }
111
+ }
112
+ }
113
+ },
114
+ "required": ["kind", "apiVersion", "prompts"]
115
+ }
116
+
117
+ SCHEMAS = {
118
+ "vacConfig": VAC_CONFIG_SCHEMA,
119
+ "promptConfig": PROMPT_CONFIG_SCHEMA
120
+ }
121
+
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.58.5
3
+ Version: 0.59.0
4
4
  Summary: Large Language Model DevOps - a package to help deploy LLMs to the Cloud.
5
5
  Home-page: https://github.com/sunholo-data/sunholo-py
6
- Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.58.5.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.59.0.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
19
  Description-Content-Type: text/markdown
20
20
  License-File: LICENSE.txt
21
+ Requires-Dist: jsonschema
21
22
  Requires-Dist: langchain
22
23
  Requires-Dist: langchain_experimental
23
24
  Requires-Dist: langchain-community
@@ -96,6 +96,7 @@ sunholo/summarise/summarise.py
96
96
  sunholo/utils/__init__.py
97
97
  sunholo/utils/big_context.py
98
98
  sunholo/utils/config.py
99
+ sunholo/utils/config_schema.py
99
100
  sunholo/utils/gcp.py
100
101
  sunholo/utils/parsers.py
101
102
  sunholo/vertex/__init__.py
@@ -1,3 +1,4 @@
1
+ jsonschema
1
2
  langchain
2
3
  langchain_experimental
3
4
  langchain-community
@@ -1,29 +0,0 @@
1
- from ..utils.config import load_all_configs
2
-
3
- from pprint import pprint
4
-
5
- def list_configs(args):
6
- """
7
- Lists configuration files, filtered by kind if specified.
8
- """
9
- print("Listing configuration files")
10
- configs = load_all_configs()
11
-
12
- if args.kind:
13
- if args.kind in configs:
14
- print(f"## Config kind: {args.kind}")
15
- pprint(configs[args.kind])
16
- else:
17
- print(f"No configurations found for kind: {args.kind}")
18
- else:
19
- for kind, config in configs.items():
20
- pprint(f"## Config kind: {kind}")
21
- pprint(config)
22
-
23
- def setup_list_configs_subparser(subparsers):
24
- """
25
- Sets up an argparse subparser for the 'list-configs' command.
26
- """
27
- list_configs_parser = subparsers.add_parser('list-configs', help='Lists all configuration files and their details.')
28
- list_configs_parser.add_argument('--kind', help='Filter configurations by kind.')
29
- list_configs_parser.set_defaults(func=list_configs)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes