Skip to content

Commit 2cef690

Browse files
authored
Adds AC exec env, alfred integration (#14)
* adds ac exec env * comment describing version overwrite in alfred
1 parent b55abaf commit 2cef690

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
def update_to_newest() -> str:
1313
session_token = general.get_ctx_token()
1414
if util.update_to_newest():
15-
msg = "updated to newest version"
15+
msg = "updated to current version"
1616
else:
1717
msg = "nothing to update"
1818
general.remove_and_refresh_session(session_token)

service_overview.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66

77
class Service(Enum):
8+
AC_EXEC_ENV = "AC_EXEC_ENV"
89
ADMIN_DASHBOARD = "ADMIN_DASHBOARD"
910
AUTHORIZER = "AUTHORIZER"
1011
CONFIG = "CONFIG"
@@ -29,6 +30,11 @@ class Service(Enum):
2930

3031

3132
__service_lookup = {
33+
Service.AC_EXEC_ENV: {
34+
"name": "AC Exec Env",
35+
"link": "https://github.com/code-kern-ai/refinery-ac-exec-env",
36+
"public_repo": True,
37+
},
3238
Service.ADMIN_DASHBOARD: {
3339
"name": "Admin Dashboard",
3440
"link": "https://github.com/code-kern-ai/admin-dashboard",

util.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
def version_overview() -> List[Dict[str, str]]:
1212
current_version = app_version.get_all()
1313
if len(current_version) == 0:
14-
print("version check before entry add --> update to newest version", flush=True)
14+
print(
15+
"version check before entry add --> update to current version", flush=True
16+
)
1517
update_to_newest()
1618

1719
if not check_db_uptodate():
@@ -51,7 +53,10 @@ def update_to_newest() -> None:
5153
something_updated = False
5254
current_version = app_version.get_all()
5355
if len(current_version) == 0:
54-
print("No version found in database -> assuming < 1.2.0", flush=True)
56+
print(
57+
"No version found in database -> assuming new installation or version < 1.2.0",
58+
flush=True,
59+
)
5560
initial_db_version.upgrade()
5661
something_updated = True
5762
current_version = app_version.get_all()
@@ -66,6 +71,7 @@ def update_to_newest() -> None:
6671
db_entry.installed_version,
6772
db_entry.remote_version,
6873
)
74+
# version is overwritten in alfred start up procedure
6975
db_entry.installed_version = db_entry.remote_version
7076
something_updated = True
7177
if something_updated:
@@ -119,5 +125,5 @@ def __remote_has_newer(installed: str, remote: Union[str, None]) -> bool:
119125
return base_logic.is_newer(remote, installed)
120126

121127

122-
def helper_function(function_name: str) -> bool:
128+
def helper_function(function_name: str) -> bool:
123129
return base_logic.call_function_by_name(function_name)

0 commit comments

Comments
 (0)