@@ -86,12 +86,12 @@ def check_valid(one: str, total: Union[list[str], dict[str, list[str]]]) -> None
8686 )
8787
8888
89- def write_commit0_dot_file (dot_file_path : str , config : dict ) -> None :
89+ def write_commit0_config_file (dot_file_path : str , config : dict ) -> None :
9090 with open (dot_file_path , "w" ) as f :
9191 yaml .dump (config , f , default_flow_style = False )
9292
9393
94- def read_commit0_dot_file (dot_file_path : str ) -> dict :
94+ def read_commit0_config_file (dot_file_path : str ) -> dict :
9595 # Check if the file exists before attempting to read it
9696 if not os .path .exists (dot_file_path ):
9797 raise FileNotFoundError (
@@ -112,7 +112,7 @@ def setup(
112112 ),
113113 dataset_split : str = typer .Option ("test" , help = "Split of the Huggingface dataset" ),
114114 base_dir : str = typer .Option ("repos/" , help = "Base directory to clone repos to" ),
115- commit0_dot_file_path : str = typer .Option (
115+ commit0_config_file : str = typer .Option (
116116 ".commit0.yaml" , help = "Storing path for stateful commit0 configs"
117117 ),
118118) -> None :
@@ -128,7 +128,7 @@ def setup(
128128 typer .echo (f"Dataset split: { highlight (dataset_split , Colors .ORANGE )} " )
129129 typer .echo (f"Base directory: { highlight (base_dir , Colors .ORANGE )} " )
130130 typer .echo (
131- f"Commit0 dot file path: { highlight (commit0_dot_file_path , Colors .ORANGE )} "
131+ f"Commit0 dot file path: { highlight (commit0_config_file , Colors .ORANGE )} "
132132 )
133133
134134 commit0 .harness .setup .main (
@@ -139,8 +139,8 @@ def setup(
139139 )
140140
141141 # after successfully setup, write the commit0 dot file
142- write_commit0_dot_file (
143- commit0_dot_file_path ,
142+ write_commit0_config_file (
143+ commit0_config_file ,
144144 {
145145 "dataset_name" : dataset_name ,
146146 "dataset_split" : dataset_split ,
@@ -153,7 +153,7 @@ def setup(
153153@commit0_app .command ()
154154def build (
155155 num_workers : int = typer .Option (8 , help = "Number of workers" ),
156- commit0_dot_file_path : str = typer .Option (
156+ commit0_config_file : str = typer .Option (
157157 ".commit0.yaml" ,
158158 help = "Path to the commit0 dot file, where the setup config is stored" ,
159159 ),
@@ -168,7 +168,7 @@ def build(
168168 """Build Commit0 split you choose in Setup Stage."""
169169 check_commit0_path ()
170170
171- commit0_config = read_commit0_dot_file (commit0_dot_file_path )
171+ commit0_config = read_commit0_dot_file (commit0_config_file )
172172 if "commit0" in commit0_config ["dataset_name" ].lower ():
173173 check_valid (commit0_config ["repo_split" ], SPLIT )
174174
@@ -230,7 +230,7 @@ def test(
230230 rebuild : bool = typer .Option (
231231 False , "--rebuild" , help = "Whether to rebuild an image"
232232 ),
233- commit0_dot_file_path : str = typer .Option (
233+ commit0_config_file : str = typer .Option (
234234 ".commit0.yaml" ,
235235 help = "Path to the commit0 dot file, where the setup config is stored" ,
236236 ),
@@ -249,7 +249,7 @@ def test(
249249) -> None :
250250 """Run tests on a Commit0 repository."""
251251 check_commit0_path ()
252- commit0_config = read_commit0_dot_file ( commit0_dot_file_path )
252+ commit0_config = read_commit0_config_file ( commit0_config_file )
253253 if repo_or_repo_path .endswith ("/" ):
254254 repo_or_repo_path = repo_or_repo_path [:- 1 ]
255255 if "commit0" in commit0_config ["dataset_name" ].lower ():
@@ -306,7 +306,7 @@ def evaluate(
306306 coverage : Annotated [
307307 bool , typer .Option ("--coverage" , help = "Whether to get coverage information" )
308308 ] = False ,
309- commit0_dot_file_path : str = typer .Option (
309+ commit0_config_file : str = typer .Option (
310310 ".commit0.yaml" ,
311311 help = "Path to the commit0 dot file, where the setup config is stored" ,
312312 ),
@@ -317,7 +317,7 @@ def evaluate(
317317 if reference :
318318 branch = "reference"
319319
320- commit0_config = read_commit0_dot_file ( commit0_dot_file_path )
320+ commit0_config = read_commit0_config_file ( commit0_config_file )
321321 if "commit0" in commit0_config ["dataset_name" ].lower ():
322322 check_valid (commit0_config ["repo_split" ], SPLIT )
323323
@@ -347,7 +347,7 @@ def lint(
347347 files : Union [List [Path ], None ] = typer .Option (
348348 None , help = "Files to lint. If not provided, all files will be linted."
349349 ),
350- commit0_dot_file_path : str = typer .Option (
350+ commit0_config_file : str = typer .Option (
351351 ".commit0.yaml" ,
352352 help = "Path to the commit0 dot file, where the setup config is stored" ,
353353 ),
@@ -361,7 +361,7 @@ def lint(
361361) -> None :
362362 """Lint given files if provided, otherwise lint all files in the base directory."""
363363 check_commit0_path ()
364- commit0_config = read_commit0_dot_file ( commit0_dot_file_path )
364+ commit0_config = read_commit0_config_file ( commit0_config_file )
365365 appended_files = None
366366 if files is not None :
367367 appended_files = []
@@ -386,14 +386,14 @@ def save(
386386 owner : str = typer .Argument (..., help = "Owner of the repository" ),
387387 branch : str = typer .Argument (..., help = "Branch to save" ),
388388 github_token : str = typer .Option (None , help = "GitHub token for authentication" ),
389- commit0_dot_file_path : str = typer .Option (
389+ commit0_config_file : str = typer .Option (
390390 ".commit0.yaml" ,
391391 help = "Path to the commit0 dot file, where the setup config is stored" ,
392392 ),
393393) -> None :
394394 """Save Commit0 split you choose in Setup Stage to GitHub."""
395395 check_commit0_path ()
396- commit0_config = read_commit0_dot_file ( commit0_dot_file_path )
396+ commit0_config = read_commit0_config_file ( commit0_config_file )
397397 if "commit0" in commit0_config ["dataset_name" ].lower ():
398398 check_valid (commit0_config ["repo_split" ], SPLIT )
399399
0 commit comments