cyclo-manager 0.2.0.dev0__tar.gz → 0.2.0.dev1__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.
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/PKG-INFO +1 -1
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_host_agent/routers/repos.py +17 -13
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_manager.egg-info/PKG-INFO +1 -1
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_manager_cli/cli.py +3 -1
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/pyproject.toml +1 -1
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/README.md +0 -0
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_host_agent/__init__.py +0 -0
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_host_agent/main.py +0 -0
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_host_agent/models.py +0 -0
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_host_agent/routers/__init__.py +0 -0
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_host_agent/routers/update.py +0 -0
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_manager.egg-info/SOURCES.txt +0 -0
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_manager.egg-info/dependency_links.txt +0 -0
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_manager.egg-info/entry_points.txt +0 -0
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_manager.egg-info/requires.txt +0 -0
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_manager.egg-info/top_level.txt +0 -0
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_manager_cli/__init__.py +0 -0
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_manager_cli/config/config.yml +0 -0
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_manager_cli/docker/docker-compose.yml +0 -0
- {cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cyclo-manager
|
|
3
|
-
Version: 0.2.0.
|
|
3
|
+
Version: 0.2.0.dev1
|
|
4
4
|
Summary: cyclo_manager CLI: pip-installable launcher for cyclo_manager server and UI containers. Run 'cyclo_manager up' to start Docker stack.
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -22,6 +22,7 @@ import asyncio
|
|
|
22
22
|
import json
|
|
23
23
|
import os
|
|
24
24
|
import re
|
|
25
|
+
import subprocess
|
|
25
26
|
import urllib.request
|
|
26
27
|
from pathlib import Path
|
|
27
28
|
from typing import Optional
|
|
@@ -86,20 +87,23 @@ def _fmt_cmd(cmd: str, output: str) -> str:
|
|
|
86
87
|
|
|
87
88
|
# ── git helpers ────────────────────────────────────────────────────────────────
|
|
88
89
|
|
|
89
|
-
|
|
90
|
-
proc = await asyncio.create_subprocess_exec(
|
|
91
|
-
'git', *args,
|
|
92
|
-
cwd=str(cwd) if cwd else None,
|
|
93
|
-
stdout=asyncio.subprocess.PIPE,
|
|
94
|
-
stderr=asyncio.subprocess.PIPE,
|
|
95
|
-
)
|
|
90
|
+
def _git_sync(args: list[str], cwd: Optional[Path] = None) -> tuple[int, str, str]:
|
|
96
91
|
try:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
92
|
+
result = subprocess.run(
|
|
93
|
+
['git', *args],
|
|
94
|
+
cwd=str(cwd) if cwd else None,
|
|
95
|
+
capture_output=True,
|
|
96
|
+
timeout=GIT_TIMEOUT,
|
|
97
|
+
)
|
|
98
|
+
return result.returncode, result.stdout.decode(), result.stderr.decode()
|
|
99
|
+
except subprocess.TimeoutExpired:
|
|
100
|
+
return 1, '', 'git timed out'
|
|
101
|
+
except Exception as e:
|
|
102
|
+
return 1, '', str(e)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
async def _git(args: list[str], cwd: Optional[Path] = None) -> tuple[int, str, str]:
|
|
106
|
+
return await asyncio.to_thread(_git_sync, args, cwd)
|
|
103
107
|
|
|
104
108
|
|
|
105
109
|
async def _repo_info(repo_path: Path) -> RepoInfo:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cyclo-manager
|
|
3
|
-
Version: 0.2.0.
|
|
3
|
+
Version: 0.2.0.dev1
|
|
4
4
|
Summary: cyclo_manager CLI: pip-installable launcher for cyclo_manager server and UI containers. Run 'cyclo_manager up' to start Docker stack.
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -80,7 +80,8 @@ def _create_host_agent() -> int:
|
|
|
80
80
|
)
|
|
81
81
|
return 1
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
current_user = os.environ.get('SUDO_USER') or os.environ.get('USER') or os.getlogin()
|
|
84
|
+
user_home = Path(f'/home/{current_user}') if current_user else Path.home()
|
|
84
85
|
service_content = f"""\
|
|
85
86
|
[Unit]
|
|
86
87
|
Description=Cyclo Host Agent
|
|
@@ -88,6 +89,7 @@ After=network.target
|
|
|
88
89
|
|
|
89
90
|
[Service]
|
|
90
91
|
Type=simple
|
|
92
|
+
User={current_user}
|
|
91
93
|
ExecStart={agent_exe}
|
|
92
94
|
Environment=HOME={user_home}
|
|
93
95
|
Restart=always
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cyclo-manager"
|
|
7
|
-
version = "0.2.0.
|
|
7
|
+
version = "0.2.0.dev1"
|
|
8
8
|
description = "cyclo_manager CLI: pip-installable launcher for cyclo_manager server and UI containers. Run 'cyclo_manager up' to start Docker stack."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "Apache-2.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_manager.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_manager.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cyclo_manager-0.2.0.dev0 → cyclo_manager-0.2.0.dev1}/cyclo_manager_cli/docker/docker-compose.yml
RENAMED
|
File without changes
|
|
File without changes
|