@@ -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 :
@@ -127,7 +127,7 @@ def setup(
127127 typer .echo (f"Dataset split: { highlight (dataset_split , Colors .ORANGE )} " )
128128 typer .echo (f"Base directory: { highlight (base_dir , Colors .ORANGE )} " )
129129 typer .echo (
130- f"Commit0 dot file path: { highlight (commit0_dot_file_path , Colors .ORANGE )} "
130+ f"Commit0 dot file path: { highlight (commit0_config_file , Colors .ORANGE )} "
131131 )
132132
133133 commit0 .harness .setup .main (
@@ -138,8 +138,8 @@ def setup(
138138 )
139139
140140 # after successfully setup, write the commit0 dot file
141- write_commit0_dot_file (
142- commit0_dot_file_path ,
141+ write_commit0_config_file (
142+ commit0_config_file ,
143143 {
144144 "dataset_name" : dataset_name ,
145145 "dataset_split" : dataset_split ,
@@ -152,7 +152,7 @@ def setup(
152152@commit0_app .command ()
153153def build (
154154 num_workers : int = typer .Option (8 , help = "Number of workers" ),
155- commit0_dot_file_path : str = typer .Option (
155+ commit0_config_file : str = typer .Option (
156156 ".commit0.yaml" ,
157157 help = "Path to the commit0 dot file, where the setup config is stored" ,
158158 ),
@@ -167,7 +167,7 @@ def build(
167167 """Build Commit0 split you choose in Setup Stage."""
168168 check_commit0_path ()
169169
170- commit0_config = read_commit0_dot_file ( commit0_dot_file_path )
170+ commit0_config = read_commit0_config_file ( commit0_config_file )
171171 check_valid (commit0_config ["repo_split" ], SPLIT )
172172
173173 typer .echo (
@@ -228,7 +228,7 @@ def test(
228228 rebuild : bool = typer .Option (
229229 False , "--rebuild" , help = "Whether to rebuild an image"
230230 ),
231- commit0_dot_file_path : str = typer .Option (
231+ commit0_config_file : str = typer .Option (
232232 ".commit0.yaml" ,
233233 help = "Path to the commit0 dot file, where the setup config is stored" ,
234234 ),
@@ -251,7 +251,7 @@ def test(
251251 repo_or_repo_path = repo_or_repo_path [:- 1 ]
252252 check_valid (repo_or_repo_path .split ("/" )[- 1 ], SPLIT_ALL )
253253
254- commit0_config = read_commit0_dot_file ( commit0_dot_file_path )
254+ commit0_config = read_commit0_config_file ( commit0_config_file )
255255
256256 if reference :
257257 branch = "reference"
@@ -304,7 +304,7 @@ def evaluate(
304304 coverage : Annotated [
305305 bool , typer .Option ("--coverage" , help = "Whether to get coverage information" )
306306 ] = False ,
307- commit0_dot_file_path : str = typer .Option (
307+ commit0_config_file : str = typer .Option (
308308 ".commit0.yaml" ,
309309 help = "Path to the commit0 dot file, where the setup config is stored" ,
310310 ),
@@ -315,7 +315,7 @@ def evaluate(
315315 if reference :
316316 branch = "reference"
317317
318- commit0_config = read_commit0_dot_file ( commit0_dot_file_path )
318+ commit0_config = read_commit0_config_file ( commit0_config_file )
319319 check_valid (commit0_config ["repo_split" ], SPLIT )
320320
321321 typer .echo (f"Evaluating repository split: { commit0_config ['repo_split' ]} " )
@@ -344,7 +344,7 @@ def lint(
344344 files : Union [List [Path ], None ] = typer .Option (
345345 None , help = "Files to lint. If not provided, all files will be linted."
346346 ),
347- commit0_dot_file_path : str = typer .Option (
347+ commit0_config_file : str = typer .Option (
348348 ".commit0.yaml" ,
349349 help = "Path to the commit0 dot file, where the setup config is stored" ,
350350 ),
@@ -358,7 +358,7 @@ def lint(
358358) -> None :
359359 """Lint given files if provided, otherwise lint all files in the base directory."""
360360 check_commit0_path ()
361- commit0_config = read_commit0_dot_file ( commit0_dot_file_path )
361+ commit0_config = read_commit0_config_file ( commit0_config_file )
362362 appended_files = None
363363 if files is not None :
364364 appended_files = []
@@ -383,14 +383,14 @@ def save(
383383 owner : str = typer .Argument (..., help = "Owner of the repository" ),
384384 branch : str = typer .Argument (..., help = "Branch to save" ),
385385 github_token : str = typer .Option (None , help = "GitHub token for authentication" ),
386- commit0_dot_file_path : str = typer .Option (
386+ commit0_config_file : str = typer .Option (
387387 ".commit0.yaml" ,
388388 help = "Path to the commit0 dot file, where the setup config is stored" ,
389389 ),
390390) -> None :
391391 """Save Commit0 split you choose in Setup Stage to GitHub."""
392392 check_commit0_path ()
393- commit0_config = read_commit0_dot_file ( commit0_dot_file_path )
393+ commit0_config = read_commit0_config_file ( commit0_config_file )
394394 check_valid (commit0_config ["repo_split" ], SPLIT )
395395
396396 typer .echo (f"Saving repository split: { commit0_config ['repo_split' ]} " )
0 commit comments