Commit 179cd5e 1 parent e98cc79 commit 179cd5e Copy full SHA for 179cd5e
File tree 2 files changed +28
-0
lines changed
2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 7
7
import os
8
8
from collections .abc import Iterable
9
9
from enum import StrEnum
10
+ from subprocess import CalledProcessError , check_output
10
11
from typing import Literal , Self
11
12
12
13
from pydantic import (
@@ -427,5 +428,22 @@ def export_json_schema() -> None:
427
428
f .write ("\n " )
428
429
429
430
431
+ def app_version () -> str :
432
+ try :
433
+ return check_output (
434
+ [
435
+ "git" ,
436
+ "--no-pager" ,
437
+ "log" ,
438
+ "-1" ,
439
+ "--pretty=format:`%h (%cd)`" ,
440
+ "--date=format:%Y-%m-%d %H:%M:%S" ,
441
+ ],
442
+ text = True ,
443
+ ).strip ()
444
+ except CalledProcessError :
445
+ return ""
446
+
447
+
430
448
if __name__ == "__main__" :
431
449
export_json_schema ()
Original file line number Diff line number Diff line change 34
34
MetadataRetrieval ,
35
35
PackageDiscoveryChoice ,
36
36
Secret ,
37
+ app_version ,
37
38
)
38
39
from conda_metadata_app .version_order import VersionOrder
39
40
62
63
yaml .allow_duplicate_keys = True
63
64
yaml .default_flow_style = False
64
65
logger = get_logger (__name__ )
66
+
67
+
65
68
st .set_page_config (
66
69
page_title = "conda metadata browser" ,
67
70
page_icon = "📦" ,
68
71
initial_sidebar_state = "expanded" ,
72
+ menu_items = {
73
+ "about" : f"""
74
+ **📦 conda-metadata-app `{ app_version ()} `**
75
+
76
+ Browse metadata from conda packages in conda-forge, bioconda and others.
77
+ """
78
+ },
69
79
)
70
80
71
81
EXTENSION_TO_CATEGORY = {
You can’t perform that action at this time.
0 commit comments