podojo-cli 1.35.1__tar.gz → 1.37.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.
Files changed (40) hide show
  1. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/CHANGELOG.md +18 -0
  2. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/PKG-INFO +6 -2
  3. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/README.md +5 -1
  4. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/pyproject.toml +1 -1
  5. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/commands/aiinterviews.py +88 -38
  6. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/tests/test_aiinterviews.py +133 -0
  7. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/uv.lock +1 -1
  8. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/.github/workflows/publish.yml +0 -0
  9. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/.gitignore +0 -0
  10. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/CLAUDE.md +0 -0
  11. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/LICENSE +0 -0
  12. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/__init__.py +0 -0
  13. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/client.py +0 -0
  14. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/commands/__init__.py +0 -0
  15. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/commands/auth.py +0 -0
  16. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/commands/interviews.py +0 -0
  17. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/commands/projects.py +0 -0
  18. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/commands/showreel.py +0 -0
  19. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/commands/synth.py +0 -0
  20. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/commands/transcripts.py +0 -0
  21. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/commands/usertests.py +0 -0
  22. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/commands/videos.py +0 -0
  23. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/config.py +0 -0
  24. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/main.py +0 -0
  25. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/oauth.py +0 -0
  26. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/synth/__init__.py +0 -0
  27. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/synth/driver.py +0 -0
  28. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/synth/session.py +0 -0
  29. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/tables.py +0 -0
  30. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/version_check.py +0 -0
  31. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/video/__init__.py +0 -0
  32. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/src/podojo_cli/video/showreel.py +0 -0
  33. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/tests/conftest.py +0 -0
  34. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/tests/test_auth.py +0 -0
  35. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/tests/test_interviews.py +0 -0
  36. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/tests/test_projects.py +0 -0
  37. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/tests/test_showreel.py +0 -0
  38. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/tests/test_transcripts.py +0 -0
  39. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/tests/test_usertests.py +0 -0
  40. {podojo_cli-1.35.1 → podojo_cli-1.37.0}/tests/test_videos.py +0 -0
@@ -5,6 +5,24 @@ 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.37.0] - 2026-12-01
9
+
10
+ ### Added
11
+ - AI interview questions can be conditional: set `show_if` on a question to have
12
+ the interviewer ask it only of participants who answered a screening question
13
+ with one of the given options, e.g. `show_if: {question: 0, options: [1, 2]}`.
14
+ At least one question must have no `show_if`. `podojo aiinterviews validate`
15
+ checks the condition and `podojo aiinterviews example` shows it.
16
+
17
+ ## [1.36.0] - 2026-11-30
18
+
19
+ ### Added
20
+ - AI interview screening questions can have an "Other" option with a text
21
+ field: set `free_text: true` on one option per question. Participants who
22
+ pick it type their own answer, which is recorded with the session.
23
+ `podojo aiinterviews validate` checks the flag and
24
+ `podojo aiinterviews example` shows it.
25
+
8
26
  ## [1.35.1] - 2026-11-26
9
27
 
10
28
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: podojo-cli
3
- Version: 1.35.1
3
+ Version: 1.37.0
4
4
  Summary: CLI for the Podojo user research platform
5
5
  Project-URL: Homepage, https://github.com/podojo/cli-podojo
6
6
  Project-URL: Source, https://github.com/podojo/cli-podojo
@@ -193,7 +193,11 @@ pick a qualifying option see the study's `rejection_message` and never reach
193
193
  the voice interview. A question can carry a `show_if` condition to appear only
194
194
  when an earlier question was answered with specific options. Each closed
195
195
  question can also carry a `subtitle` — optional secondary text shown under the
196
- question on the participant's screen. See
196
+ question on the participant's screen. One option per question can set
197
+ `free_text: true` to act as an "Other" option: participants who pick it type
198
+ their own answer, which is recorded with the session. An interview question
199
+ can carry a `show_if` as well: the interviewer then asks it only of participants
200
+ who answered a closed question with one of the given options. See
197
201
  `podojo aiinterviews example` for the exact shape.
198
202
 
199
203
  ### Synthetic participants
@@ -161,7 +161,11 @@ pick a qualifying option see the study's `rejection_message` and never reach
161
161
  the voice interview. A question can carry a `show_if` condition to appear only
162
162
  when an earlier question was answered with specific options. Each closed
163
163
  question can also carry a `subtitle` — optional secondary text shown under the
164
- question on the participant's screen. See
164
+ question on the participant's screen. One option per question can set
165
+ `free_text: true` to act as an "Other" option: participants who pick it type
166
+ their own answer, which is recorded with the session. An interview question
167
+ can carry a `show_if` as well: the interviewer then asks it only of participants
168
+ who answered a closed question with one of the given options. See
165
169
  `podojo aiinterviews example` for the exact shape.
166
170
 
167
171
  ### Synthetic participants
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "podojo-cli"
3
- version = "1.35.1"
3
+ version = "1.37.0"
4
4
  description = "CLI for the Podojo user research platform"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -49,6 +49,12 @@ EXAMPLE_YAML = """\
49
49
  # image_file: a path to a local image (uploaded to Podojo storage on
50
50
  # create/update; relative paths resolve against this YAML
51
51
  # file's location)
52
+ # show_if (optional) ask this question only of participants who
53
+ # answered a screening question with one of the given
54
+ # options, e.g. `show_if: {question: 0, options: [1, 2]}` —
55
+ # 0-based indices into screening_questions and that
56
+ # question's options. Everyone else never hears it. At least
57
+ # one question must have no show_if.
52
58
  #
53
59
  # Each screening question (optional closed questions, answered on screen
54
60
  # before the voice interview starts; answers are recorded with the session):
@@ -69,7 +75,10 @@ EXAMPLE_YAML = """\
69
75
  # into screening_questions and that question's options
70
76
  # options (required, at least 2) each with `text`; `qualifies: true`
71
77
  # marks the accepted answers of a screener question and is
72
- # ignored on plain closed questions
78
+ # ignored on plain closed questions. One option per question
79
+ # may set `free_text: true` (an "Other" option): participants
80
+ # who pick it type their own answer, which is recorded with
81
+ # the session
73
82
 
74
83
  interview_id: checkout-experience-v1
75
84
  title: Checkout Experience Research
@@ -151,6 +160,8 @@ screening_questions:
151
160
  - text: Forced account creation
152
161
  - text: Missing payment options
153
162
  - text: Delivery time
163
+ - text: Other
164
+ free_text: true
154
165
 
155
166
  # Optional: shown to participants whose screener answers don't qualify
156
167
  rejection_message: >
@@ -182,9 +193,46 @@ questions:
182
193
  before entering your details?
183
194
  max_follow_ups: 1
184
195
  image_file: ./screenshots/checkout-page.png
196
+
197
+ # Asked only of participants who shop online at least once a month
198
+ # (screening question 0, options 2 and 3)
199
+ - section: Shopping Habits
200
+ text: >
201
+ You shop online regularly. Which store do you find easiest to check
202
+ out with, and what makes it easy?
203
+ max_follow_ups: 2
204
+ show_if:
205
+ question: 0
206
+ options: [2, 3]
185
207
  """
186
208
 
187
209
 
210
+ def _show_if_errors(label: str, show_if, screening_questions, allowed: int, target: str) -> list[str]:
211
+ """Errors for one show_if. It may point at the first `allowed` screening
212
+ questions; `target` names those in the message."""
213
+ if not isinstance(show_if, dict):
214
+ return [f"{label}: 'show_if' must be a mapping with 'question' and 'options'"]
215
+ errors = []
216
+ ref = show_if.get("question")
217
+ if isinstance(ref, bool) or not isinstance(ref, int) or not 0 <= ref < allowed:
218
+ errors.append(f"{label}: 'show_if.question' must be the 0-based index of {target}")
219
+ ref = None
220
+ ref_options = show_if.get("options")
221
+ if not isinstance(ref_options, list) or len(ref_options) == 0:
222
+ errors.append(f"{label}: 'show_if.options' must list at least one option index")
223
+ elif ref is not None:
224
+ trigger = screening_questions[ref]
225
+ trigger_options = trigger.get("options") if isinstance(trigger, dict) else None
226
+ limit = len(trigger_options) if isinstance(trigger_options, list) else 0
227
+ for index in ref_options:
228
+ if isinstance(index, bool) or not isinstance(index, int) or not 0 <= index < limit:
229
+ errors.append(
230
+ f"{label}: 'show_if.options' index {index} is out of range for "
231
+ f"screening question {ref + 1}"
232
+ )
233
+ return errors
234
+
235
+
188
236
  def validate_ai_interview_data(data: dict) -> list[str]:
189
237
  """Validate AI interview YAML data, return list of error strings."""
190
238
  errors = []
@@ -202,6 +250,9 @@ def validate_ai_interview_data(data: dict) -> list[str]:
202
250
  if follow_up_style is not None and follow_up_style not in ("guide", "participant"):
203
251
  errors.append("'follow_up_style' must be 'guide' or 'participant'")
204
252
 
253
+ screening_questions = data.get("screening_questions")
254
+ closed_questions = screening_questions if isinstance(screening_questions, list) else []
255
+
205
256
  questions = data.get("questions")
206
257
  if questions is not None:
207
258
  if not isinstance(questions, list):
@@ -209,6 +260,11 @@ def validate_ai_interview_data(data: dict) -> list[str]:
209
260
  elif len(questions) == 0:
210
261
  errors.append("'questions' must contain at least one question")
211
262
  else:
263
+ if all(isinstance(q, dict) and q.get("show_if") is not None for q in questions):
264
+ errors.append(
265
+ "At least one question must have no 'show_if', so every participant "
266
+ "is asked something"
267
+ )
212
268
  for i, question in enumerate(questions, 1):
213
269
  if not isinstance(question, dict):
214
270
  errors.append(f"Question {i}: must be a mapping with 'text'")
@@ -225,8 +281,17 @@ def validate_ai_interview_data(data: dict) -> list[str]:
225
281
  errors.append(
226
282
  f"Question {i}: 'max_follow_ups' must be an integer >= 0, got '{max_follow_ups}'"
227
283
  )
284
+ if question.get("show_if") is not None:
285
+ errors.extend(
286
+ _show_if_errors(
287
+ f"Question {i}",
288
+ question["show_if"],
289
+ closed_questions,
290
+ len(closed_questions),
291
+ "a screening question",
292
+ )
293
+ )
228
294
 
229
- screening_questions = data.get("screening_questions")
230
295
  if screening_questions is not None:
231
296
  if not isinstance(screening_questions, list):
232
297
  errors.append("'screening_questions' must be a list")
@@ -251,43 +316,16 @@ def validate_ai_interview_data(data: dict) -> list[str]:
251
316
  if not isinstance(screener, bool):
252
317
  errors.append(f"Screening question {i}: 'screener' must be true or false")
253
318
  screener = False
254
- show_if = question.get("show_if")
255
- if show_if is not None:
256
- if not isinstance(show_if, dict):
257
- errors.append(
258
- f"Screening question {i}: 'show_if' must be a mapping with "
259
- "'question' and 'options'"
319
+ if question.get("show_if") is not None:
320
+ errors.extend(
321
+ _show_if_errors(
322
+ f"Screening question {i}",
323
+ question["show_if"],
324
+ screening_questions,
325
+ i - 1,
326
+ "an earlier screening question",
260
327
  )
261
- else:
262
- ref = show_if.get("question")
263
- if isinstance(ref, bool) or not isinstance(ref, int) or not 0 <= ref < i - 1:
264
- errors.append(
265
- f"Screening question {i}: 'show_if.question' must be the 0-based "
266
- "index of an earlier screening question"
267
- )
268
- ref = None
269
- ref_options = show_if.get("options")
270
- if not isinstance(ref_options, list) or len(ref_options) == 0:
271
- errors.append(
272
- f"Screening question {i}: 'show_if.options' must list at least "
273
- "one option index"
274
- )
275
- elif ref is not None:
276
- trigger = screening_questions[ref]
277
- trigger_options = (
278
- trigger.get("options") if isinstance(trigger, dict) else None
279
- )
280
- limit = len(trigger_options) if isinstance(trigger_options, list) else 0
281
- for index in ref_options:
282
- if (
283
- isinstance(index, bool)
284
- or not isinstance(index, int)
285
- or not 0 <= index < limit
286
- ):
287
- errors.append(
288
- f"Screening question {i}: 'show_if.options' index "
289
- f"{index} is out of range for screening question {ref + 1}"
290
- )
328
+ )
291
329
  options = question.get("options")
292
330
  if not isinstance(options, list) or len(options) < 2:
293
331
  errors.append(f"Screening question {i}: 'options' must list at least 2 options")
@@ -314,6 +352,7 @@ def validate_ai_interview_data(data: dict) -> list[str]:
314
352
  f"{len(options)} options"
315
353
  )
316
354
  qualifying = 0
355
+ free_text_options = 0
317
356
  for j, option in enumerate(options, 1):
318
357
  if not isinstance(option, dict) or "text" not in option:
319
358
  errors.append(
@@ -327,6 +366,17 @@ def validate_ai_interview_data(data: dict) -> list[str]:
327
366
  )
328
367
  elif qualifies:
329
368
  qualifying += 1
369
+ free_text = option.get("free_text", False)
370
+ if not isinstance(free_text, bool):
371
+ errors.append(
372
+ f"Screening question {i}, option {j}: 'free_text' must be true or false"
373
+ )
374
+ elif free_text:
375
+ free_text_options += 1
376
+ if free_text_options > 1:
377
+ errors.append(
378
+ f"Screening question {i}: only one option can have 'free_text: true'"
379
+ )
330
380
  if screener and qualifying == 0:
331
381
  errors.append(
332
382
  f"Screening question {i}: needs at least one option with 'qualifies: true'"
@@ -748,6 +748,84 @@ def test_validate_show_if_needs_at_least_one_option(runner, tmp_path):
748
748
  assert "'show_if.options' must list at least" in result.output
749
749
 
750
750
 
751
+ CONDITIONAL_QUESTION_YAML = """\
752
+ interview_id: test-interview-1
753
+ title: Test AI Interview
754
+ screening_questions:
755
+ - text: How often do you shop online?
756
+ options:
757
+ - text: Rarely
758
+ - text: Monthly
759
+ - text: Weekly
760
+ questions:
761
+ - text: Walk me through your last purchase.
762
+ - text: Which store is easiest to check out with?
763
+ show_if:
764
+ question: 0
765
+ options: {options}
766
+ """
767
+
768
+
769
+ def _validate_conditional(runner, tmp_path, yaml_text):
770
+ yaml_file = tmp_path / "interview.yaml"
771
+ yaml_file.write_text(yaml_text)
772
+ return runner.invoke(app, ["aiinterviews", "validate", str(yaml_file)])
773
+
774
+
775
+ def test_validate_accepts_show_if_on_a_question(runner, tmp_path):
776
+ result = _validate_conditional(
777
+ runner, tmp_path, CONDITIONAL_QUESTION_YAML.format(options="[1, 2]")
778
+ )
779
+
780
+ assert result.exit_code == 0
781
+
782
+
783
+ def test_validate_question_show_if_option_out_of_range(runner, tmp_path):
784
+ result = _validate_conditional(
785
+ runner, tmp_path, CONDITIONAL_QUESTION_YAML.format(options="[3]")
786
+ )
787
+
788
+ assert result.exit_code == 1
789
+ assert "Question 2: 'show_if.options' index 3 is out of range" in result.output
790
+
791
+
792
+ def test_validate_question_show_if_needs_an_existing_screening_question(runner, tmp_path):
793
+ result = _validate_conditional(
794
+ runner,
795
+ tmp_path,
796
+ CONDITIONAL_QUESTION_YAML.format(options="[0]").replace("question: 0", "question: 1"),
797
+ )
798
+
799
+ assert result.exit_code == 1
800
+ assert "Question 2: 'show_if.question' must be the 0-based index of a screening" in result.output
801
+
802
+
803
+ def test_validate_question_show_if_without_screening_questions(runner, tmp_path):
804
+ result = _validate_conditional(
805
+ runner,
806
+ tmp_path,
807
+ VALID_AI_INTERVIEW_YAML + " show_if:\n question: 0\n options: [0]\n",
808
+ )
809
+
810
+ assert result.exit_code == 1
811
+ assert "Question 2: 'show_if.question' must be the 0-based index of a screening" in result.output
812
+
813
+
814
+ def test_validate_needs_one_question_without_show_if(runner, tmp_path):
815
+ result = _validate_conditional(
816
+ runner,
817
+ tmp_path,
818
+ CONDITIONAL_QUESTION_YAML.format(options="[1]").replace(
819
+ " - text: Walk me through your last purchase.\n",
820
+ " - text: Walk me through your last purchase.\n"
821
+ " show_if:\n question: 0\n options: [0]\n",
822
+ ),
823
+ )
824
+
825
+ assert result.exit_code == 1
826
+ assert "At least one question must have no 'show_if'" in result.output
827
+
828
+
751
829
  def test_validate_screening_multi_select_must_be_bool(runner, tmp_path):
752
830
  yaml_file = tmp_path / "interview.yaml"
753
831
  yaml_file.write_text(
@@ -907,6 +985,61 @@ def test_validate_screening_option_qualifies_must_be_bool(runner, tmp_path):
907
985
  assert "'qualifies' must be true or false" in result.output
908
986
 
909
987
 
988
+ def test_validate_accepts_one_free_text_option(runner, tmp_path):
989
+ yaml_file = tmp_path / "interview.yaml"
990
+ yaml_file.write_text(
991
+ VALID_AI_INTERVIEW_YAML
992
+ + "screening_questions:\n"
993
+ + " - text: Q\n"
994
+ + " options:\n"
995
+ + " - text: A\n"
996
+ + " - text: Other\n"
997
+ + " free_text: true\n"
998
+ )
999
+
1000
+ result = runner.invoke(app, ["aiinterviews", "validate", str(yaml_file)])
1001
+
1002
+ assert result.exit_code == 0
1003
+
1004
+
1005
+ def test_validate_rejects_two_free_text_options(runner, tmp_path):
1006
+ yaml_file = tmp_path / "interview.yaml"
1007
+ yaml_file.write_text(
1008
+ VALID_AI_INTERVIEW_YAML
1009
+ + "screening_questions:\n"
1010
+ + " - text: Q\n"
1011
+ + " options:\n"
1012
+ + " - text: A\n"
1013
+ + " - text: Other\n"
1014
+ + " free_text: true\n"
1015
+ + " - text: Something else\n"
1016
+ + " free_text: true\n"
1017
+ )
1018
+
1019
+ result = runner.invoke(app, ["aiinterviews", "validate", str(yaml_file)])
1020
+
1021
+ assert result.exit_code == 1
1022
+ assert "only one option can have 'free_text: true'" in result.output
1023
+
1024
+
1025
+ def test_validate_screening_option_free_text_must_be_bool(runner, tmp_path):
1026
+ yaml_file = tmp_path / "interview.yaml"
1027
+ yaml_file.write_text(
1028
+ VALID_AI_INTERVIEW_YAML
1029
+ + "screening_questions:\n"
1030
+ + " - text: Q\n"
1031
+ + " options:\n"
1032
+ + " - text: A\n"
1033
+ + " - text: Other\n"
1034
+ + " free_text: yep\n"
1035
+ )
1036
+
1037
+ result = runner.invoke(app, ["aiinterviews", "validate", str(yaml_file)])
1038
+
1039
+ assert result.exit_code == 1
1040
+ assert "'free_text' must be true or false" in result.output
1041
+
1042
+
910
1043
  def test_example(runner):
911
1044
  result = runner.invoke(app, ["aiinterviews", "example"])
912
1045
 
@@ -438,7 +438,7 @@ wheels = [
438
438
 
439
439
  [[package]]
440
440
  name = "podojo-cli"
441
- version = "1.35.1"
441
+ version = "1.37.0"
442
442
  source = { editable = "." }
443
443
  dependencies = [
444
444
  { name = "httpx" },
File without changes
File without changes
File without changes