mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 09:57:26 +03:00 
			
		
		
		
	use current working dir as default throughout
This commit is contained in:
		
							parent
							
								
									b228111925
								
							
						
					
					
						commit
						a46b76f188
					
				| 
						 | 
					@ -88,7 +88,7 @@ def project_clone_cli(
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@project_cli.command("init")
 | 
					@project_cli.command("init")
 | 
				
			||||||
def project_init_cli(
 | 
					def project_init_cli(
 | 
				
			||||||
    path: Path = Arg(..., help="Path to cloned project", exists=True, file_okay=False),
 | 
					    path: Path = Arg(Path.cwd(), help="Path to cloned project. Defaults to current working directory.", exists=True, file_okay=False),
 | 
				
			||||||
    git: bool = Opt(False, "--git", "-G", help="Initialize project as a Git repo"),
 | 
					    git: bool = Opt(False, "--git", "-G", help="Initialize project as a Git repo"),
 | 
				
			||||||
    force: bool = Opt(False, "--force", "-F", help="Force initiziation"),
 | 
					    force: bool = Opt(False, "--force", "-F", help="Force initiziation"),
 | 
				
			||||||
):
 | 
					):
 | 
				
			||||||
| 
						 | 
					@ -104,7 +104,7 @@ def project_init_cli(
 | 
				
			||||||
@project_cli.command("assets")
 | 
					@project_cli.command("assets")
 | 
				
			||||||
def project_assets_cli(
 | 
					def project_assets_cli(
 | 
				
			||||||
    # fmt: off
 | 
					    # fmt: off
 | 
				
			||||||
    project_dir: Path = Arg(..., help="Path to cloned project", exists=True, file_okay=False),
 | 
					    project_dir: Path = Arg(Path.cwd(), help="Path to cloned project. Defaults to current working directory.", exists=True, file_okay=False),
 | 
				
			||||||
    # fmt: on
 | 
					    # fmt: on
 | 
				
			||||||
):
 | 
					):
 | 
				
			||||||
    """Use DVC (Data Version Control) to fetch project assets. Assets are
 | 
					    """Use DVC (Data Version Control) to fetch project assets. Assets are
 | 
				
			||||||
| 
						 | 
					@ -125,7 +125,7 @@ def project_assets_cli(
 | 
				
			||||||
def project_run_all_cli(
 | 
					def project_run_all_cli(
 | 
				
			||||||
    # fmt: off
 | 
					    # fmt: off
 | 
				
			||||||
    ctx: typer.Context,
 | 
					    ctx: typer.Context,
 | 
				
			||||||
    project_dir: Path = Arg(..., help="Location of project directory", exists=True, file_okay=False),
 | 
					    project_dir: Path = Arg(Path.cwd(), help="Location of project directory. Defaults to current working directory.", exists=True, file_okay=False),
 | 
				
			||||||
    show_help: bool = Opt(False, "--help", help="Show help message and available subcommands")
 | 
					    show_help: bool = Opt(False, "--help", help="Show help message and available subcommands")
 | 
				
			||||||
    # fmt: on
 | 
					    # fmt: on
 | 
				
			||||||
):
 | 
					):
 | 
				
			||||||
| 
						 | 
					@ -149,7 +149,7 @@ def project_run_all_cli(
 | 
				
			||||||
def project_run_cli(
 | 
					def project_run_cli(
 | 
				
			||||||
    # fmt: off
 | 
					    # fmt: off
 | 
				
			||||||
    ctx: typer.Context,
 | 
					    ctx: typer.Context,
 | 
				
			||||||
    project_dir: Path = Arg(..., help="Location of project directory", exists=True, file_okay=False),
 | 
					    project_dir: Path = Arg(Path.cwd(), help="Location of project directory. Defaults to current working directory.", exists=True, file_okay=False),
 | 
				
			||||||
    subcommand: str = Arg(None, help="Name of command defined in project config"),
 | 
					    subcommand: str = Arg(None, help="Name of command defined in project config"),
 | 
				
			||||||
    show_help: bool = Opt(False, "--help", help="Show help message and available subcommands")
 | 
					    show_help: bool = Opt(False, "--help", help="Show help message and available subcommands")
 | 
				
			||||||
    # fmt: on
 | 
					    # fmt: on
 | 
				
			||||||
| 
						 | 
					@ -173,7 +173,7 @@ def project_run_cli(
 | 
				
			||||||
@project_cli.command("exec", hidden=True)
 | 
					@project_cli.command("exec", hidden=True)
 | 
				
			||||||
def project_exec_cli(
 | 
					def project_exec_cli(
 | 
				
			||||||
    # fmt: off
 | 
					    # fmt: off
 | 
				
			||||||
    project_dir: Path = Arg(..., help="Location of project directory", exists=True, file_okay=False),
 | 
					    project_dir: Path = Arg(Path.cwd(), help="Location of project directory. Defaults to current working directory.", exists=True, file_okay=False),
 | 
				
			||||||
    subcommand: str = Arg(..., help="Name of command defined in project config"),
 | 
					    subcommand: str = Arg(..., help="Name of command defined in project config"),
 | 
				
			||||||
    # fmt: on
 | 
					    # fmt: on
 | 
				
			||||||
):
 | 
					):
 | 
				
			||||||
| 
						 | 
					@ -188,7 +188,7 @@ def project_exec_cli(
 | 
				
			||||||
@project_cli.command("update-dvc")
 | 
					@project_cli.command("update-dvc")
 | 
				
			||||||
def project_update_dvc_cli(
 | 
					def project_update_dvc_cli(
 | 
				
			||||||
    # fmt: off
 | 
					    # fmt: off
 | 
				
			||||||
    project_dir: Path = Arg(..., help="Location of project directory", exists=True, file_okay=False),
 | 
					    project_dir: Path = Arg(Path.cwd(), help="Location of project directory. Defaults to current working directory.", exists=True, file_okay=False),
 | 
				
			||||||
    verbose: bool = Opt(False, "--verbose", "-V", help="Print more info"),
 | 
					    verbose: bool = Opt(False, "--verbose", "-V", help="Print more info"),
 | 
				
			||||||
    force: bool = Opt(False, "--force", "-F", help="Force update DVC config"),
 | 
					    force: bool = Opt(False, "--force", "-F", help="Force update DVC config"),
 | 
				
			||||||
    # fmt: on
 | 
					    # fmt: on
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user