checkup 0.4.0__tar.gz → 0.5.1__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 (49) hide show
  1. {checkup-0.4.0 → checkup-0.5.1}/PKG-INFO +1 -1
  2. {checkup-0.4.0 → checkup-0.5.1}/pyproject.toml +1 -1
  3. checkup-0.5.1/src/checkup/cli/__init__.py +39 -0
  4. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/cli/commands/__init__.py +2 -0
  5. checkup-0.5.1/src/checkup/cli/commands/plugins.py +49 -0
  6. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/registry/__init__.py +2 -0
  7. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/registry/discovery.py +45 -0
  8. checkup-0.4.0/src/checkup/cli/__init__.py +0 -18
  9. {checkup-0.4.0 → checkup-0.5.1}/README.md +0 -0
  10. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/__init__.py +0 -0
  11. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/cli/commands/config.py +0 -0
  12. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/cli/commands/init.py +0 -0
  13. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/cli/commands/run.py +0 -0
  14. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/cli/commands/schema.py +0 -0
  15. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/cli/config_wizard/__init__.py +0 -0
  16. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/cli/config_wizard/_common.py +0 -0
  17. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/cli/config_wizard/create.py +0 -0
  18. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/cli/config_wizard/edit.py +0 -0
  19. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/cli/executor.py +0 -0
  20. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/cli/utils.py +0 -0
  21. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/config.py +0 -0
  22. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/configuration/__init__.py +0 -0
  23. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/configuration/env.py +0 -0
  24. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/configuration/io.py +0 -0
  25. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/configuration/models.py +0 -0
  26. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/configuration/schema.py +0 -0
  27. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/errors.py +0 -0
  28. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/executor/__init__.py +0 -0
  29. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/executor/batch_executors.py +0 -0
  30. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/executor/metric_calculator.py +0 -0
  31. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/executor/provider_executor.py +0 -0
  32. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/executor/state.py +0 -0
  33. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/graph.py +0 -0
  34. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/hub.py +0 -0
  35. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/materializers/__init__.py +0 -0
  36. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/materializers/base.py +0 -0
  37. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/materializers/console.py +0 -0
  38. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/materializers/csv_file.py +0 -0
  39. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/materializers/database.py +0 -0
  40. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/materializers/html_report.py +0 -0
  41. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/measurement.py +0 -0
  42. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/metric.py +0 -0
  43. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/provider.py +0 -0
  44. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/providers/__init__.py +0 -0
  45. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/providers/tags.py +0 -0
  46. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/templates/metrics_report.html +0 -0
  47. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/types.py +0 -0
  48. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/utils.py +0 -0
  49. {checkup-0.4.0 → checkup-0.5.1}/src/checkup/validators.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: checkup
3
- Version: 0.4.0
3
+ Version: 0.5.1
4
4
  Summary: Computational governance framework for measuring data product health
5
5
  Author: Jan Vanbuel
6
6
  Author-email: Jan Vanbuel <jan.vanbuel@ond.vlaanderen.be>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "checkup"
3
- version = "0.4.0"
3
+ version = "0.5.1"
4
4
  description = "Computational governance framework for measuring data product health"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Jan Vanbuel", email = "jan.vanbuel@ond.vlaanderen.be" }]
@@ -0,0 +1,39 @@
1
+ """
2
+ Checkup CLI application.
3
+ """
4
+
5
+ from importlib.metadata import version as pkg_version
6
+ from typing import Annotated
7
+
8
+ import typer
9
+
10
+ from checkup.cli.commands import config, init, plugins, run, schema
11
+
12
+ app = typer.Typer(
13
+ name="checkup",
14
+ help="CheckUp - Computational governance framework for measuring data product health",
15
+ no_args_is_help=True,
16
+ )
17
+
18
+
19
+ def version_callback(value: bool) -> None:
20
+ if value:
21
+ typer.echo(pkg_version("checkup"))
22
+ raise typer.Exit()
23
+
24
+
25
+ @app.callback()
26
+ def main(
27
+ version: Annotated[
28
+ bool | None,
29
+ typer.Option("--version", "-v", callback=version_callback),
30
+ ] = None,
31
+ ) -> None:
32
+ pass
33
+
34
+
35
+ app.command()(run)
36
+ app.command()(init)
37
+ app.command()(config)
38
+ app.command()(schema)
39
+ app.command()(plugins)
@@ -4,12 +4,14 @@ CLI commands.
4
4
 
5
5
  from checkup.cli.commands.config import config
6
6
  from checkup.cli.commands.init import init
7
+ from checkup.cli.commands.plugins import plugins
7
8
  from checkup.cli.commands.run import run
8
9
  from checkup.cli.commands.schema import schema
9
10
 
10
11
  __all__ = [
11
12
  "config",
12
13
  "init",
14
+ "plugins",
13
15
  "run",
14
16
  "schema",
15
17
  ]
@@ -0,0 +1,49 @@
1
+ """
2
+ Plugins command. List installed checkup plugins.
3
+ """
4
+
5
+ from rich.console import Console
6
+ from rich.table import Table
7
+
8
+ from checkup.registry import get_registry
9
+
10
+ console = Console()
11
+
12
+
13
+ def plugins() -> None:
14
+ """
15
+ List installed checkup plugins.
16
+ """
17
+
18
+ all_plugins = get_registry().list_plugins()
19
+ all_plugins.pop("checkup", None)
20
+
21
+ if not all_plugins:
22
+ console.print("[yellow]No checkup plugins installed[/yellow]")
23
+ return
24
+
25
+ kinds = [
26
+ ("Providers", "providers"),
27
+ ("Metrics", "metrics"),
28
+ ("Materializers", "materializers"),
29
+ ]
30
+ populated_kinds = [ # Hide columns that are empty
31
+ (header, attr)
32
+ for header, attr in kinds
33
+ if any(getattr(p, attr) for p in all_plugins.values())
34
+ ]
35
+
36
+ table = Table(title="Installed checkup plugins")
37
+ table.add_column("Plugin", style="bold", overflow="fold")
38
+ table.add_column("Version", overflow="fold")
39
+ for header, _ in populated_kinds:
40
+ table.add_column(header, overflow="fold")
41
+
42
+ for name, plugin in all_plugins.items():
43
+ table.add_row(
44
+ name,
45
+ plugin.version or "",
46
+ *("\n".join(getattr(plugin, attr)) for _, attr in populated_kinds),
47
+ )
48
+
49
+ console.print(table)
@@ -3,11 +3,13 @@ Plugin registry for discovering providers, metrics, and materializers.
3
3
  """
4
4
 
5
5
  from checkup.registry.discovery import (
6
+ Plugin,
6
7
  PluginRegistry,
7
8
  get_registry,
8
9
  )
9
10
 
10
11
  __all__ = [
12
+ "Plugin",
11
13
  "PluginRegistry",
12
14
  "get_registry",
13
15
  ]
@@ -3,6 +3,7 @@ Plugin discovery via Python entry points.
3
3
  """
4
4
 
5
5
  import logging
6
+ from dataclasses import dataclass, field
6
7
  from importlib.metadata import entry_points
7
8
  from typing import TYPE_CHECKING
8
9
 
@@ -13,6 +14,19 @@ if TYPE_CHECKING:
13
14
 
14
15
  logger = logging.getLogger(__name__)
15
16
 
17
+
18
+ @dataclass
19
+ class Plugin:
20
+ """
21
+ A distribution registering one or more checkup entry points.
22
+ """
23
+
24
+ version: str | None
25
+ providers: list[str] = field(default_factory=list)
26
+ metrics: list[str] = field(default_factory=list)
27
+ materializers: list[str] = field(default_factory=list)
28
+
29
+
16
30
  # Entry point group names
17
31
  PROVIDERS_GROUP = "checkup.providers"
18
32
  METRICS_GROUP = "checkup.metrics"
@@ -137,6 +151,37 @@ class PluginRegistry:
137
151
 
138
152
  return self._list_entry_point_names(MATERIALIZERS_GROUP)
139
153
 
154
+ def list_plugins(self) -> dict[str, Plugin]:
155
+ """
156
+ List installed plugins grouped by distribution.
157
+
158
+ Walks all checkup entry-point groups and groups them by the
159
+ distribution that registers them. Does not load plugin code.
160
+ """
161
+
162
+ groups = {
163
+ "providers": PROVIDERS_GROUP,
164
+ "metrics": METRICS_GROUP,
165
+ "materializers": MATERIALIZERS_GROUP,
166
+ }
167
+
168
+ plugins: dict[str, Plugin] = {}
169
+
170
+ for kind, group in groups.items():
171
+ for ep in entry_points(group=group):
172
+ dist = ep.dist
173
+ dist_name = dist.name if dist else "unknown"
174
+ dist_version = dist.version if dist else None
175
+
176
+ plugin = plugins.setdefault(dist_name, Plugin(version=dist_version))
177
+ getattr(plugin, kind).append(ep.name)
178
+
179
+ for plugin in plugins.values():
180
+ for kind in groups:
181
+ getattr(plugin, kind).sort()
182
+
183
+ return dict(sorted(plugins.items()))
184
+
140
185
  def list_compatible_metric_names(self, provider_names: list[str]) -> list[str]:
141
186
  """
142
187
  List metric names compatible with the given providers.
@@ -1,18 +0,0 @@
1
- """
2
- Checkup CLI application.
3
- """
4
-
5
- import typer
6
-
7
- from checkup.cli.commands import config, init, run, schema
8
-
9
- app = typer.Typer(
10
- name="checkup",
11
- help="CheckUp - Computational governance framework for measuring data product health",
12
- no_args_is_help=True,
13
- )
14
-
15
- app.command()(run)
16
- app.command()(init)
17
- app.command()(config)
18
- app.command()(schema)
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