ragbits-cli 1.0.0__tar.gz → 1.2.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.
@@ -9,6 +9,9 @@ venv/
9
9
  __pycache__/
10
10
  **.egg-info/
11
11
 
12
+ # Local cursor rules
13
+ .cursor/rules/local/
14
+
12
15
  # Byte-compiled / optimized / DLL files
13
16
  __pycache__/
14
17
  *.py[cod]
@@ -101,3 +104,4 @@ qdrant/
101
104
  .aider*
102
105
 
103
106
  .DS_Store
107
+ node_modules/
@@ -2,6 +2,18 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 1.2.0 (2025-08-01)
6
+
7
+ ### Changed
8
+
9
+ - ragbits-core updated to version v1.2.0
10
+
11
+ ## 1.1.0 (2025-07-09)
12
+
13
+ ### Changed
14
+
15
+ - ragbits-core updated to version v1.1.0
16
+
5
17
  ## 1.0.0 (2025-06-04)
6
18
 
7
19
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ragbits-cli
3
- Version: 1.0.0
3
+ Version: 1.2.0
4
4
  Summary: A CLI application for ragbits - building blocks for rapid development of GenAI applications
5
5
  Project-URL: Homepage, https://github.com/deepsense-ai/ragbits
6
6
  Project-URL: Bug Reports, https://github.com/deepsense-ai/ragbits/issues
@@ -22,7 +22,7 @@ Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
23
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
24
  Requires-Python: >=3.10
25
- Requires-Dist: ragbits-core==1.0.0
25
+ Requires-Dist: ragbits-core==1.2.0
26
26
  Requires-Dist: typer<1.0.0,>=0.12.5
27
27
  Description-Content-Type: text/markdown
28
28
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ragbits-cli"
3
- version = "1.0.0"
3
+ version = "1.2.0"
4
4
  description = "A CLI application for ragbits - building blocks for rapid development of GenAI applications"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -31,7 +31,7 @@ classifiers = [
31
31
  "Topic :: Scientific/Engineering :: Artificial Intelligence",
32
32
  "Topic :: Software Development :: Libraries :: Python Modules",
33
33
  ]
34
- dependencies = ["typer>=0.12.5,<1.0.0", "ragbits-core==1.0.0"]
34
+ dependencies = ["typer>=0.12.5,<1.0.0", "ragbits-core==1.2.0"]
35
35
 
36
36
  [project.urls]
37
37
  "Homepage" = "https://github.com/deepsense-ai/ragbits"
@@ -0,0 +1,38 @@
1
+ import sys
2
+
3
+ from ragbits.cli._utils import get_instance_or_exit
4
+ from ragbits.core.utils.config_handling import WithConstructionConfig
5
+
6
+
7
+ class ExampleClassForCLI(WithConstructionConfig):
8
+ default_module = sys.modules[__name__]
9
+ configuration_key = "example_cli"
10
+
11
+ def __init__(self, foo: str, bar: int) -> None:
12
+ self.foo = foo
13
+ self.bar = bar
14
+
15
+
16
+ def sync_factory_for_cli() -> ExampleClassForCLI:
17
+ return ExampleClassForCLI("sync_cli", 123)
18
+
19
+
20
+ async def async_factory_for_cli() -> ExampleClassForCLI:
21
+ """Async factory function for testing CLI with async support."""
22
+ return ExampleClassForCLI("async_cli", 456)
23
+
24
+
25
+ def test_get_instance_or_exit_with_sync_factory():
26
+ """Test that get_instance_or_exit works with sync factory functions."""
27
+ instance = get_instance_or_exit(ExampleClassForCLI, factory_path="sync_factory_for_cli")
28
+ assert isinstance(instance, ExampleClassForCLI)
29
+ assert instance.foo == "sync_cli"
30
+ assert instance.bar == 123
31
+
32
+
33
+ def test_get_instance_or_exit_with_async_factory():
34
+ """Test that get_instance_or_exit works with async factory functions."""
35
+ instance = get_instance_or_exit(ExampleClassForCLI, factory_path="async_factory_for_cli")
36
+ assert isinstance(instance, ExampleClassForCLI)
37
+ assert instance.foo == "async_cli"
38
+ assert instance.bar == 456
File without changes