mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-03 15:01:00 +02:00
Squashed 'ai-context/trustgraph-templates/' content from commit 42a5fd1b
git-subtree-dir: ai-context/trustgraph-templates git-subtree-split: 42a5fd1b678f32be378062e30451e2052ccb95dd
This commit is contained in:
commit
74cc8a4685
1216 changed files with 116347 additions and 0 deletions
61
trustgraph_configurator/list.py
Normal file
61
trustgraph_configurator/list.py
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
|
||||
import json
|
||||
import logging
|
||||
import argparse
|
||||
import tabulate
|
||||
|
||||
from . import Index
|
||||
|
||||
from . import Generator, Packager
|
||||
|
||||
def list():
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
prog="tg-show-config-params",
|
||||
description=__doc__
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
args = vars(args)
|
||||
|
||||
platforms = [
|
||||
(v.name, v.description)
|
||||
for v in Index.get_platforms()
|
||||
]
|
||||
|
||||
templates = [
|
||||
(v.name, v.description, v.status, v.version)
|
||||
for v in Index.get_templates()
|
||||
]
|
||||
|
||||
print()
|
||||
print("Platforms:")
|
||||
print(tabulate.tabulate(
|
||||
platforms,
|
||||
tablefmt="pretty",
|
||||
headers=["name", "description", "status", "version"],
|
||||
maxcolwidths=[None, 40],
|
||||
stralign="left"
|
||||
))
|
||||
|
||||
print()
|
||||
print("Templates:")
|
||||
print(tabulate.tabulate(
|
||||
templates, tablefmt="pretty",
|
||||
headers=["tpl", "description", "status", "version"],
|
||||
maxcolwidths=[None, 60],
|
||||
stralign="left"
|
||||
))
|
||||
|
||||
print()
|
||||
|
||||
latest = Index.get_latest()
|
||||
if latest:
|
||||
print("Latest version:", latest.version)
|
||||
|
||||
stable = Index.get_latest_stable()
|
||||
if stable:
|
||||
print("Latest stable:", stable.version)
|
||||
|
||||
print()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue