other top bc's

This commit is contained in:
2026-02-05 11:50:00 +01:00
parent af9a15ccb0
commit 840bd2940d
4 changed files with 93 additions and 13 deletions

View File

@@ -20,8 +20,6 @@ from speaking_styles import SPEAKING_STYLES
RESULTS_FILE = 'data/exports/debug/JPMC_Chase Brand Personality_Quant Round 1_February 2, 2026_Labels.csv'
QSF_FILE = 'data/exports/OneDrive_2026-01-21/Soft Launch Data/JPMC_Chase_Brand_Personality_Quant_Round_1.qsf'
BEST_CHOSEN_CHARACTER = "the_coach"
# %%
# CLI argument parsing for batch automation
@@ -50,6 +48,8 @@ def parse_cli_args():
parser.add_argument(f'--{filter_name}', type=str, default=None, help=f'JSON list of {filter_name} values')
parser.add_argument('--filter-name', type=str, default=None, help='Name for this filter combination (used for .txt description file)')
parser.add_argument('--figures-dir', type=str, default=f'figures/statistical_significance/{Path(RESULTS_FILE).parts[2]}', help='Override the default figures directory')
parser.add_argument('--best-character', type=str, default="the_coach", help='Slug of the best chosen character (default: "the_coach")')
# Only parse if running as script (not in Jupyter/interactive)
try:
@@ -57,7 +57,7 @@ def parse_cli_args():
get_ipython() # noqa: F821 # type: ignore
# Return namespace with all filters set to None
no_filters = {f: None for f in FILTER_CONFIG}
return argparse.Namespace(**no_filters, filter_name=None)
return argparse.Namespace(**no_filters, filter_name=None, figures_dir=f'figures/statistical_significance/{Path(RESULTS_FILE).parts[2]}', best_character="the_coach")
except NameError:
args = parser.parse_args()
# Parse JSON strings to lists
@@ -67,11 +67,12 @@ def parse_cli_args():
return args
cli_args = parse_cli_args()
BEST_CHOSEN_CHARACTER = cli_args.best_character
# %%
S = QualtricsSurvey(RESULTS_FILE, QSF_FILE)
S = QualtricsSurvey(RESULTS_FILE, QSF_FILE, figures_dir=cli_args.figures_dir)
try:
data_all = S.load_data()
except NotImplementedError as e: