ragbits-cli 0.6.0__tar.gz → 0.7.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.
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.7.0 (2025-01-21)
6
+
7
+ ### Changed
8
+
9
+ - ragbits-core updated to version v0.7.0
10
+
5
11
  ## 0.6.0 (2024-12-27)
6
12
 
7
13
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ragbits-cli
3
- Version: 0.6.0
3
+ Version: 0.7.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==0.6.0
25
+ Requires-Dist: ragbits-core==0.7.0
26
26
  Requires-Dist: typer>=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 = "0.6.0"
3
+ version = "0.7.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", "ragbits-core==0.6.0"]
34
+ dependencies = ["typer>=0.12.5", "ragbits-core==0.7.0"]
35
35
 
36
36
  [project.urls]
37
37
  "Homepage" = "https://github.com/deepsense-ai/ragbits"
@@ -8,6 +8,7 @@ import typer
8
8
  from typer.main import get_command
9
9
 
10
10
  import ragbits
11
+ from ragbits.core import audit
11
12
 
12
13
  from .state import OutputType, cli_state, print_output
13
14
 
@@ -28,9 +29,15 @@ def ragbits_cli(
28
29
  output: Annotated[
29
30
  OutputType, typer.Option("--output", "-o", help="Set the output type (text or json)")
30
31
  ] = OutputType.text.value, # type: ignore
32
+ verbose: bool = typer.Option(False, "--verbose", "-v", help="Print additional information"),
31
33
  ) -> None:
32
34
  """Common CLI arguments for all ragbits commands."""
33
35
  cli_state.output_type = output
36
+ cli_state.verbose = verbose
37
+
38
+ if verbose == 1:
39
+ typer.echo("Verbose mode is enabled.")
40
+ audit.set_trace_handlers("cli")
34
41
 
35
42
 
36
43
  def autoregister() -> None:
@@ -54,7 +54,7 @@ def get_instance_or_exit(
54
54
  except NoDefaultConfigError as e:
55
55
  Console(
56
56
  stderr=True
57
- ).print(f"""You need to provide the [b]{type_name}[/b] instance be used. You can do this by either:
57
+ ).print(f"""You need to provide the [b]{type_name}[/b] instance to be used. You can do this by either:
58
58
  - providing a path to a YAML configuration file with the [b]{yaml_path_argument_name}[/b] option
59
59
  - providing a Python path to a function that creates a vector store with the [b]{factory_path_argument_name}[/b] option
60
60
  - setting the default configuration or factory function in your project's [b]pyproject.toml[/b] file""")
@@ -21,6 +21,7 @@ class OutputType(Enum):
21
21
  class CliState:
22
22
  """A dataclass describing CLI state"""
23
23
 
24
+ verbose: bool = False
24
25
  output_type: OutputType = OutputType.text
25
26
 
26
27
 
@@ -47,10 +48,13 @@ def print_output_table(
47
48
  console.print("No results")
48
49
  return
49
50
 
50
- fields = data[0].model_fields
51
+ fields = {**data[0].model_fields, **data[0].model_computed_fields}
51
52
 
52
53
  # Human readable titles for columns
53
- titles = {key: value.get("title", key) for key, value in data[0].model_json_schema()["properties"].items()}
54
+ titles = {
55
+ key: value.get("title", key)
56
+ for key, value in data[0].model_json_schema(mode="serialization")["properties"].items()
57
+ }
54
58
 
55
59
  # Normalize the list of columns
56
60
  if columns is None:
File without changes
File without changes
File without changes