podojo-cli 1.27.0__tar.gz → 1.28.0__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.
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/CHANGELOG.md +20 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/PKG-INFO +1 -1
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/pyproject.toml +1 -1
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/client.py +6 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/commands/aiinterviews.py +30 -5
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/tests/test_aiinterviews.py +57 -3
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/uv.lock +1 -1
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/.github/workflows/publish.yml +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/.gitignore +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/CLAUDE.md +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/LICENSE +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/README.md +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/__init__.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/commands/__init__.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/commands/auth.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/commands/interviews.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/commands/projects.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/commands/showreel.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/commands/synth.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/commands/transcripts.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/commands/usertests.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/commands/videos.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/config.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/main.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/synth/__init__.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/synth/driver.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/synth/session.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/version_check.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/video/__init__.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/src/podojo_cli/video/showreel.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/tests/conftest.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/tests/test_auth.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/tests/test_interviews.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/tests/test_projects.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/tests/test_showreel.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/tests/test_transcripts.py +0 -0
- {podojo_cli-1.27.0 → podojo_cli-1.28.0}/tests/test_usertests.py +0 -0
|
@@ -5,6 +5,26 @@ All notable changes to the Podojo CLI will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org).
|
|
7
7
|
|
|
8
|
+
## [1.28.0] - 2026-10-29
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- German AI interviews: with `language: de`, Podojo translates what
|
|
12
|
+
participants see and hear when the study is saved, and again whenever that
|
|
13
|
+
English changes. `create` and `update` show a spinner while saving and a
|
|
14
|
+
note when a translation was generated. The translation isn't part of the
|
|
15
|
+
YAML: `get` leaves it out, and it is reviewed on the study's page in Podojo.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- `create` and `update` wait up to 2 minutes for the API, since saving a
|
|
19
|
+
German study includes the translation.
|
|
20
|
+
|
|
21
|
+
## [1.27.1] - 2026-10-29
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
- AI interview `language` is now a language code, `en` or `de`, and the
|
|
25
|
+
example config uses `language: en`. The API still accepts older values such
|
|
26
|
+
as `en-GB`, `de-DE` or `English` and stores them as `en` / `de`.
|
|
27
|
+
|
|
8
28
|
## [1.27.0] - 2026-10-27
|
|
9
29
|
|
|
10
30
|
### Added
|
|
@@ -195,11 +195,16 @@ class PodojoClient:
|
|
|
195
195
|
r.raise_for_status()
|
|
196
196
|
return r.json()
|
|
197
197
|
|
|
198
|
+
# Saving a non-English study waits for the server to translate it: about
|
|
199
|
+
# 15s for a large study, retried once on failure.
|
|
200
|
+
AI_INTERVIEW_WRITE_TIMEOUT = httpx.Timeout(120.0)
|
|
201
|
+
|
|
198
202
|
def create_ai_interview(self, data: dict) -> dict:
|
|
199
203
|
r = httpx.post(
|
|
200
204
|
f"{self.base_url}/ai-interviews",
|
|
201
205
|
json=data,
|
|
202
206
|
headers=self._headers(),
|
|
207
|
+
timeout=self.AI_INTERVIEW_WRITE_TIMEOUT,
|
|
203
208
|
)
|
|
204
209
|
r.raise_for_status()
|
|
205
210
|
return r.json()
|
|
@@ -209,6 +214,7 @@ class PodojoClient:
|
|
|
209
214
|
f"{self.base_url}/ai-interviews/{interview_id}",
|
|
210
215
|
json=data,
|
|
211
216
|
headers=self._headers(),
|
|
217
|
+
timeout=self.AI_INTERVIEW_WRITE_TIMEOUT,
|
|
212
218
|
)
|
|
213
219
|
r.raise_for_status()
|
|
214
220
|
return r.json()
|
|
@@ -25,7 +25,14 @@ EXAMPLE_YAML = """\
|
|
|
25
25
|
# thank-you screen — no closing text to author.
|
|
26
26
|
#
|
|
27
27
|
# Required fields: interview_id, title, questions
|
|
28
|
-
#
|
|
28
|
+
#
|
|
29
|
+
# Write the study in English. With language: de, Podojo translates what
|
|
30
|
+
# participants see and hear (title, welcome/rejection message, question texts,
|
|
31
|
+
# screening questions and options) when the study is saved, and again whenever
|
|
32
|
+
# that English changes. The translation isn't part of this file; review it on
|
|
33
|
+
# the study's page in Podojo.
|
|
34
|
+
#
|
|
35
|
+
# Optional fields: language (en or de, default en), project_name, overview,
|
|
29
36
|
# decision, screening_questions, welcome_message,
|
|
30
37
|
# rejection_message, live, collect_contact, max_responses
|
|
31
38
|
#
|
|
@@ -64,7 +71,7 @@ EXAMPLE_YAML = """\
|
|
|
64
71
|
|
|
65
72
|
interview_id: checkout-experience-v1
|
|
66
73
|
title: Checkout Experience Research
|
|
67
|
-
language: en
|
|
74
|
+
language: en
|
|
68
75
|
|
|
69
76
|
# Optional: link interview to a project
|
|
70
77
|
project_name: checkout-redesign-q1
|
|
@@ -380,6 +387,20 @@ def _format_api_error(e: httpx.HTTPStatusError) -> str:
|
|
|
380
387
|
return e.response.text
|
|
381
388
|
|
|
382
389
|
|
|
390
|
+
def _saving(data: dict):
|
|
391
|
+
"""Spinner while the API saves; a non-English study is translated first."""
|
|
392
|
+
if data.get("language", "en") == "en":
|
|
393
|
+
return err_console.status("Saving…")
|
|
394
|
+
return err_console.status("Saving and translating (this can take a minute)…")
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
def _print_translation_note(result: dict) -> None:
|
|
398
|
+
if result.get("translation_regenerated"):
|
|
399
|
+
console.print(
|
|
400
|
+
" The translation was generated from the English — review it on the study's page in Podojo."
|
|
401
|
+
)
|
|
402
|
+
|
|
403
|
+
|
|
383
404
|
def _ai_interviews_url() -> str:
|
|
384
405
|
return load_config()["ai_interviews_url"].rstrip("/")
|
|
385
406
|
|
|
@@ -447,7 +468,7 @@ def get_ai_interview(
|
|
|
447
468
|
# Remove server-managed fields for a clean editable output
|
|
448
469
|
group = interview.pop("group", "")
|
|
449
470
|
response_count = interview.pop("response_count", 0) or 0
|
|
450
|
-
for key in ("id", "created_at", "created_by", "last_updated"):
|
|
471
|
+
for key in ("id", "created_at", "created_by", "last_updated", "translations"):
|
|
451
472
|
interview.pop(key, None)
|
|
452
473
|
|
|
453
474
|
# Plain stdout, so `get > file.yaml` round-trips: rich would hard-wrap long
|
|
@@ -481,7 +502,8 @@ def create_ai_interview(
|
|
|
481
502
|
client = PodojoClient()
|
|
482
503
|
_resolve_image_files(data, from_file.parent, client)
|
|
483
504
|
try:
|
|
484
|
-
|
|
505
|
+
with _saving(data):
|
|
506
|
+
result = client.create_ai_interview(data)
|
|
485
507
|
except httpx.HTTPStatusError as e:
|
|
486
508
|
if e.response.status_code == 409:
|
|
487
509
|
console.print(f"[red]Error:[/red] AI interview '{data.get('interview_id')}' already exists")
|
|
@@ -492,6 +514,7 @@ def create_ai_interview(
|
|
|
492
514
|
interview_id = result.get("interview_id", "")
|
|
493
515
|
group = result.get("group", "")
|
|
494
516
|
console.print(f"[green]Created AI interview:[/green] {interview_id}")
|
|
517
|
+
_print_translation_note(result)
|
|
495
518
|
if group:
|
|
496
519
|
base = _ai_interviews_url()
|
|
497
520
|
console.print(f" Preview: {base}/preview/{group}/{interview_id}")
|
|
@@ -509,7 +532,8 @@ def update_ai_interview(
|
|
|
509
532
|
client = PodojoClient()
|
|
510
533
|
_resolve_image_files(data, from_file.parent, client)
|
|
511
534
|
try:
|
|
512
|
-
|
|
535
|
+
with _saving(data):
|
|
536
|
+
result = client.update_ai_interview(interview_id, data)
|
|
513
537
|
except httpx.HTTPStatusError as e:
|
|
514
538
|
if e.response.status_code == 404:
|
|
515
539
|
console.print(f"[red]Error:[/red] AI interview '{interview_id}' not found")
|
|
@@ -518,6 +542,7 @@ def update_ai_interview(
|
|
|
518
542
|
raise typer.Exit(1)
|
|
519
543
|
|
|
520
544
|
console.print(f"[green]Updated AI interview:[/green] {result.get('interview_id', interview_id)}")
|
|
545
|
+
_print_translation_note(result)
|
|
521
546
|
|
|
522
547
|
|
|
523
548
|
@app.command("delete")
|
|
@@ -21,7 +21,7 @@ LIST_RESPONSE = {
|
|
|
21
21
|
"id": "abc1",
|
|
22
22
|
"interview_id": "ai-1",
|
|
23
23
|
"title": "Interview One",
|
|
24
|
-
"language": "en
|
|
24
|
+
"language": "en",
|
|
25
25
|
"question_count": 3,
|
|
26
26
|
"project_name": "proj-1",
|
|
27
27
|
"live": True,
|
|
@@ -35,7 +35,7 @@ LIST_RESPONSE = {
|
|
|
35
35
|
"id": "abc2",
|
|
36
36
|
"interview_id": "ai-2",
|
|
37
37
|
"title": "Interview Two",
|
|
38
|
-
"language": "de
|
|
38
|
+
"language": "de",
|
|
39
39
|
"question_count": 5,
|
|
40
40
|
"project_name": "proj-2",
|
|
41
41
|
"live": False,
|
|
@@ -53,7 +53,7 @@ GET_RESPONSE = {
|
|
|
53
53
|
"id": "abc123",
|
|
54
54
|
"interview_id": "ai-1",
|
|
55
55
|
"title": "Interview One",
|
|
56
|
-
"language": "en
|
|
56
|
+
"language": "en",
|
|
57
57
|
"project_name": "proj-1",
|
|
58
58
|
"overview": "Study overview",
|
|
59
59
|
"decision": "Improve the thing",
|
|
@@ -134,6 +134,19 @@ def test_get_ai_interview_stdout_round_trips(runner, httpx_mock):
|
|
|
134
134
|
assert "Responses: 7 / 20" in result.stderr
|
|
135
135
|
|
|
136
136
|
|
|
137
|
+
def test_get_ai_interview_leaves_out_translations(runner, httpx_mock):
|
|
138
|
+
httpx_mock.add_response(
|
|
139
|
+
url="http://test.local/api/v1/ai-interviews/ai-1",
|
|
140
|
+
json={**GET_RESPONSE, "language": "de", "translations": {"de": {"title": "Interview Eins"}}},
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
result = runner.invoke(app, ["aiinterviews", "get", "ai-1"])
|
|
144
|
+
|
|
145
|
+
data = yaml.safe_load(result.stdout)
|
|
146
|
+
assert data["language"] == "de"
|
|
147
|
+
assert "translations" not in data
|
|
148
|
+
|
|
149
|
+
|
|
137
150
|
def test_get_ai_interview_not_found(runner, httpx_mock):
|
|
138
151
|
httpx_mock.add_response(
|
|
139
152
|
url="http://test.local/api/v1/ai-interviews/nonexistent",
|
|
@@ -308,6 +321,47 @@ def test_update_ai_interview(runner, httpx_mock, tmp_path):
|
|
|
308
321
|
assert "Updated AI interview" in result.output
|
|
309
322
|
|
|
310
323
|
|
|
324
|
+
def test_create_german_ai_interview_notes_the_translation(runner, httpx_mock, tmp_path):
|
|
325
|
+
yaml_file = tmp_path / "interview.yaml"
|
|
326
|
+
yaml_file.write_text(VALID_AI_INTERVIEW_YAML + "language: de\n")
|
|
327
|
+
|
|
328
|
+
httpx_mock.add_response(
|
|
329
|
+
url="http://test.local/api/v1/ai-interviews",
|
|
330
|
+
method="POST",
|
|
331
|
+
json={
|
|
332
|
+
"id": "abc123",
|
|
333
|
+
"interview_id": "test-interview-1",
|
|
334
|
+
"title": "Test AI Interview",
|
|
335
|
+
"group": "test-group",
|
|
336
|
+
"translation_regenerated": True,
|
|
337
|
+
},
|
|
338
|
+
)
|
|
339
|
+
|
|
340
|
+
result = runner.invoke(app, ["aiinterviews", "create", "-f", str(yaml_file)])
|
|
341
|
+
|
|
342
|
+
assert result.exit_code == 0
|
|
343
|
+
assert "review it on the study's page" in result.output
|
|
344
|
+
# The save waits for the translation, so the default 5s timeout won't do.
|
|
345
|
+
assert httpx_mock.get_request().extensions["timeout"]["read"] == 120.0
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
def test_update_without_new_translation_prints_no_note(runner, httpx_mock, tmp_path):
|
|
349
|
+
yaml_file = tmp_path / "update.yaml"
|
|
350
|
+
yaml_file.write_text("live: true\n")
|
|
351
|
+
|
|
352
|
+
httpx_mock.add_response(
|
|
353
|
+
url="http://test.local/api/v1/ai-interviews/ai-1",
|
|
354
|
+
method="PUT",
|
|
355
|
+
json={"interview_id": "ai-1", "live": True, "translation_regenerated": False},
|
|
356
|
+
)
|
|
357
|
+
|
|
358
|
+
result = runner.invoke(app, ["aiinterviews", "update", "ai-1", "-f", str(yaml_file)])
|
|
359
|
+
|
|
360
|
+
assert result.exit_code == 0
|
|
361
|
+
assert "translation" not in result.output
|
|
362
|
+
assert httpx_mock.get_request().extensions["timeout"]["read"] == 120.0
|
|
363
|
+
|
|
364
|
+
|
|
311
365
|
def test_update_ai_interview_not_found(runner, httpx_mock, tmp_path):
|
|
312
366
|
yaml_file = tmp_path / "update.yaml"
|
|
313
367
|
yaml_file.write_text("title: Updated Title\n")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|