qlever 0.4.3__py3-none-any.whl → 0.4.4__py3-none-any.whl

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.

Potentially problematic release.


This version of qlever might be problematic. Click here for more details.

qlever/config.py CHANGED
@@ -3,8 +3,9 @@ from __future__ import annotations
3
3
  import argparse
4
4
  import os
5
5
  import traceback
6
- from pathlib import Path
7
6
  from importlib.metadata import version
7
+ from pathlib import Path
8
+ from termcolor import colored
8
9
 
9
10
  import argcomplete
10
11
 
@@ -115,17 +116,11 @@ class QleverConfig:
115
116
  argcomplete_enabled = os.environ.get("QLEVER_ARGCOMPLETE_ENABLED")
116
117
  if not argcomplete_enabled and not argcomplete_check_off:
117
118
  log.info("")
118
- log.warn(f"Autocompletion is not enabled for this script, run "
119
- f"the following command, and consider adding it to your "
120
- f"`.bashrc` or `.zshrc`:"
119
+ log.warn(f"To enable autocompletion, run the following command, "
120
+ f"and consider adding it to your `.bashrc` or `.zshrc`:"
121
121
  f"\n\n"
122
122
  f"eval \"$(register-python-argcomplete {script_name})\""
123
- f" && export QLEVER_ARGCOMPLETE_ENABLED=1"
124
- f"\n\n"
125
- f"If autocompletion does not work for you or you don't "
126
- f"want to use it, disable this warning as follows:"
127
- f"\n\n"
128
- f"export QLEVER_ARGCOMPLETE_CHECK_OFF")
123
+ f" && export QLEVER_ARGCOMPLETE_ENABLED=1")
129
124
  log.info("")
130
125
 
131
126
  # Create a temporary parser only to parse the `--qleverfile` option, in
@@ -180,7 +175,10 @@ class QleverConfig:
180
175
  # command. We have a dedicated class for each command. These classes
181
176
  # are defined in the modules in `qlever/commands`. In `__init__.py`
182
177
  # an object of each class is created and stored in `command_objects`.
183
- parser = argparse.ArgumentParser()
178
+ parser = argparse.ArgumentParser(
179
+ description=colored("This is the qlever command line tool, "
180
+ "it's all you need to work with QLever",
181
+ attrs=["bold"]))
184
182
  parser.add_argument("--version", action="version",
185
183
  version=f"%(prog)s {version('qlever')}")
186
184
  add_qleverfile_option(parser)
@@ -198,6 +196,11 @@ class QleverConfig:
198
196
  # because it is executed whenever the user triggers the autocompletion.
199
197
  argcomplete.autocomplete(parser, always_complete_options="long")
200
198
 
199
+ # If called without arguments, show the help message.
200
+ if len(os.sys.argv) == 1:
201
+ parser.print_help()
202
+ exit(1)
203
+
201
204
  # Parse the command line arguments.
202
205
  args = parser.parse_args()
203
206
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qlever
3
- Version: 0.4.3
3
+ Version: 0.4.4
4
4
  Summary: Script for using the QLever SPARQL engine.
5
5
  Author-email: Hannah Bast <bast@cs.uni-freiburg.de>
6
6
  License: Apache-2.0
@@ -1,7 +1,7 @@
1
1
  qlever/__init__.py,sha256=7VKA8tp5iHZQyTXhDOcxUbloZ7WyxDnkruq0iJOzQcE,1403
2
2
  qlever/__main__.py,sha256=MqM37bEzQeJEGUXZvuLcilIvnObZiG2eTGIkfKGpdnw,62016
3
3
  qlever/command.py,sha256=yOr0Uc8D8-AM7EjwDsVzbc3KNYjPH-FVOZhIHkqO588,2749
4
- qlever/config.py,sha256=-jjHAL8jdp25v53SqXKP4gWip6Qw9OdlDvFN6X7uk_4,10184
4
+ qlever/config.py,sha256=fMEyI0dsLsDeBXiclobwB0m1gmzd7J1r7OZfk7_J2dc,10254
5
5
  qlever/containerize.py,sha256=p8g3O3G8a_0XLzSTzl_e5t9dqjbCQ-ippoA8vI2Z9pI,4193
6
6
  qlever/log.py,sha256=and5prQcLW_5nM8AAZNeNbVqJxLtJmX3EjHFhtHCR28,1279
7
7
  qlever/qlever_main.py,sha256=tA_xqOs_FjvqlDIvKTprwuysfTwzsUjE7at26gRhCVA,2336
@@ -40,9 +40,9 @@ qlever/commands/status.py,sha256=5S6EdapZEwFKV9cQZtNYcZhMbAXAY-FP6ggjIhfX8ek,163
40
40
  qlever/commands/stop.py,sha256=TZs4bxKHvujlZAU8BZmFjA5eXSZNAa6EeNzvPpEZsuI,4139
41
41
  qlever/commands/ui.py,sha256=rV8u017WLbfz0zVT_c9GC4d9v1WWwrTM3kfGONbeCvQ,2499
42
42
  qlever/commands/warmup.py,sha256=WOZSxeV8U_F6pEEnAb6YybXLQMxZFTRJXs4BPHUhsmc,1030
43
- qlever-0.4.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
44
- qlever-0.4.3.dist-info/METADATA,sha256=TCf4w7h5mrkWyhiwSie43PGKRUvx-6FUTcKYd8ksCxs,4146
45
- qlever-0.4.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
46
- qlever-0.4.3.dist-info/entry_points.txt,sha256=U_gbYYi0wwdsn884eb0XoOXfvhACOsxhlO330dZ9bi0,87
47
- qlever-0.4.3.dist-info/top_level.txt,sha256=kd3zsYqiFd0--Czh5XTVkfEq6XR-XgRFW35X0v0GT-c,7
48
- qlever-0.4.3.dist-info/RECORD,,
43
+ qlever-0.4.4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
44
+ qlever-0.4.4.dist-info/METADATA,sha256=6OKe211H7bjBnvdsSx1BO-m3ndvjc7baWLLmf4_P9PM,4146
45
+ qlever-0.4.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
46
+ qlever-0.4.4.dist-info/entry_points.txt,sha256=U_gbYYi0wwdsn884eb0XoOXfvhACOsxhlO330dZ9bi0,87
47
+ qlever-0.4.4.dist-info/top_level.txt,sha256=kd3zsYqiFd0--Czh5XTVkfEq6XR-XgRFW35X0v0GT-c,7
48
+ qlever-0.4.4.dist-info/RECORD,,
File without changes