@@ -118,7 +118,8 @@ def setup(
118118) -> None :
119119 """Commit0 clone a repo split."""
120120 check_commit0_path ()
121- check_valid (repo_split , SPLIT )
121+ if "commit0" in dataset_name .split ("/" )[- 1 ].lower ():
122+ check_valid (repo_split , SPLIT )
122123
123124 base_dir = str (Path (base_dir ).resolve ())
124125
@@ -168,7 +169,8 @@ def build(
168169 check_commit0_path ()
169170
170171 commit0_config = read_commit0_config_file (commit0_config_file )
171- check_valid (commit0_config ["repo_split" ], SPLIT )
172+ if "commit0" in commit0_config ["dataset_name" ].split ("/" )[- 1 ].lower ():
173+ check_valid (commit0_config ["repo_split" ], SPLIT )
172174
173175 typer .echo (
174176 f"Building repository for split: { highlight (commit0_config ['repo_split' ], Colors .ORANGE )} "
@@ -199,7 +201,6 @@ def get_tests(
199201) -> None :
200202 """Get tests for a Commit0 repository."""
201203 check_commit0_path ()
202- check_valid (repo_name , SPLIT_ALL )
203204
204205 commit0 .harness .get_pytest_ids .main (repo_name , verbose = 1 )
205206
@@ -247,19 +248,23 @@ def test(
247248) -> None :
248249 """Run tests on a Commit0 repository."""
249250 check_commit0_path ()
251+ commit0_config = read_commit0_config_file (commit0_config_file )
250252 if repo_or_repo_path .endswith ("/" ):
251253 repo_or_repo_path = repo_or_repo_path [:- 1 ]
252- check_valid (repo_or_repo_path .split ("/" )[- 1 ], SPLIT_ALL )
253-
254- commit0_config = read_commit0_config_file (commit0_config_file )
254+ if "commit0" in commit0_config ["dataset_name" ].split ("/" )[- 1 ].lower ():
255+ check_valid (repo_or_repo_path .split ("/" )[- 1 ], SPLIT )
255256
256257 if reference :
257258 branch = "reference"
258- if branch is None and not reference :
259- git_path = os .path .join (
260- commit0_config ["base_dir" ], repo_or_repo_path .split ("/" )[- 1 ]
261- )
262- branch = get_active_branch (git_path )
259+ else :
260+ if "humaneval" not in commit0_config ["dataset_name" ].split ("/" )[- 1 ].lower ():
261+ if branch is None and not reference :
262+ git_path = os .path .join (
263+ commit0_config ["base_dir" ], repo_or_repo_path .split ("/" )[- 1 ]
264+ )
265+ branch = get_active_branch (git_path )
266+ else :
267+ branch = test_ids
263268
264269 if stdin :
265270 # Read test names from stdin
@@ -316,7 +321,8 @@ def evaluate(
316321 branch = "reference"
317322
318323 commit0_config = read_commit0_config_file (commit0_config_file )
319- check_valid (commit0_config ["repo_split" ], SPLIT )
324+ if "commit0" in commit0_config ["dataset_name" ].split ("/" )[- 1 ].lower ():
325+ check_valid (commit0_config ["repo_split" ], SPLIT )
320326
321327 typer .echo (f"Evaluating repository split: { commit0_config ['repo_split' ]} " )
322328 typer .echo (f"Branch: { branch } " )
@@ -391,7 +397,8 @@ def save(
391397 """Save Commit0 split you choose in Setup Stage to GitHub."""
392398 check_commit0_path ()
393399 commit0_config = read_commit0_config_file (commit0_config_file )
394- check_valid (commit0_config ["repo_split" ], SPLIT )
400+ if "commit0" in commit0_config ["dataset_name" ].split ("/" )[- 1 ].lower ():
401+ check_valid (commit0_config ["repo_split" ], SPLIT )
395402
396403 typer .echo (f"Saving repository split: { commit0_config ['repo_split' ]} " )
397404 typer .echo (f"Owner: { owner } " )
0 commit comments