runledger-cli 0.1.0__tar.gz → 0.1.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: runledger-cli
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Zero‑instrumentation experiment registry CLI
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -0,0 +1,28 @@
1
+ services:
2
+ postgres:
3
+ image: postgres:16
4
+ environment:
5
+ POSTGRES_DB: runledger
6
+ POSTGRES_USER: runledger
7
+ POSTGRES_PASSWORD: runledger
8
+ ports:
9
+ - "5432:5432"
10
+ healthcheck:
11
+ test: ["CMD-SHELL", "pg_isready -U runledger"]
12
+ interval: 5s
13
+ timeout: 5s
14
+ retries: 5
15
+
16
+ app:
17
+ image: ahmedrafatdev/runledger:latest
18
+ ports:
19
+ # Only accessible from this machine (localhost). Any local user can connect;
20
+ # for shared servers, add authentication or a reverse proxy.
21
+ - "127.0.0.1:8080:8080"
22
+ environment:
23
+ SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/runledger
24
+ SPRING_DATASOURCE_USERNAME: runledger
25
+ SPRING_DATASOURCE_PASSWORD: runledger
26
+ depends_on:
27
+ postgres:
28
+ condition: service_healthy
@@ -48,7 +48,7 @@ except Exception:
48
48
  # Configuration
49
49
  # ------------------------------------------------------------
50
50
  API_BASE = "http://localhost:8080/api/runs"
51
- COMPOSE_FILE = os.path.join(os.path.dirname(__file__), "..", "docker-compose.yml")
51
+ COMPOSE_FILE = os.path.join(os.path.dirname(__file__), "docker-compose.yml")
52
52
  HEALTH_URL = "http://localhost:8080/actuator/health"
53
53
  PAGE_SIZE = 10
54
54
 
@@ -104,6 +104,11 @@ def stop_backend():
104
104
  else:
105
105
  console.print("[red]Cannot find docker-compose.yml[/red]")
106
106
 
107
+ def ensure_backend():
108
+ """Start the backend if it's not already running."""
109
+ if not backend_running():
110
+ start_backend()
111
+
107
112
  # ------------------------------------------------------------
108
113
  # Ingestion
109
114
  # ------------------------------------------------------------
@@ -1166,6 +1171,7 @@ def main():
1166
1171
  has_data = False
1167
1172
 
1168
1173
  if not has_data:
1174
+ ensure_backend()
1169
1175
  from cli.guided import run_guided_search
1170
1176
  run_guided_search()
1171
1177
  else:
@@ -1267,6 +1273,7 @@ def main():
1267
1273
  elif args.command == "aggregate":
1268
1274
  cli_aggregate(args)
1269
1275
  elif args.command == "guided":
1276
+ ensure_backend()
1270
1277
  from cli.guided import run_guided_search
1271
1278
  run_guided_search()
1272
1279
  else:
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "runledger-cli"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "Zero‑instrumentation experiment registry CLI"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -16,4 +16,7 @@ dependencies = [
16
16
  runledger = "cli.ledger:main"
17
17
 
18
18
  [tool.setuptools.packages.find]
19
- include = ["cli", "cli.*"]
19
+ include = ["cli", "cli.*"]
20
+
21
+ [tool.setuptools.package-data]
22
+ cli = ["docker-compose.yml"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: runledger-cli
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Zero‑instrumentation experiment registry CLI
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,7 @@
1
1
  README.md
2
2
  pyproject.toml
3
3
  cli/__init__.py
4
+ cli/docker-compose.yml
4
5
  cli/guided.py
5
6
  cli/ledger.py
6
7
  cli/tests/__init__.py
File without changes
File without changes