docstring/cmd

This commit is contained in:
Marc Beninca 2024-08-19 17:44:07 +02:00
parent 57a171ae0d
commit b41478a747
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -11,10 +11,12 @@ from spcd.util import browse
def spcd_browse_workspace() -> None: def spcd_browse_workspace() -> None:
"""Browse the current workspace for the project."""
browse(project.root) browse(project.root)
def spcd_build_project() -> None: def spcd_build_project() -> None:
"""Perform the actual building process."""
for extension in ["py", "sh"]: for extension in ["py", "sh"]:
path = Path(project.root) / f"build.{extension}" path = Path(project.root) / f"build.{extension}"
if path.exists(): if path.exists():
@ -25,12 +27,14 @@ def spcd_build_project() -> None:
def spcd_check_project() -> None: def spcd_check_project() -> None:
"""Check the project for anything wrong."""
ps.run("ruff", "check") ps.run("ruff", "check")
def spcd_synchronize( def spcd_synchronize(
target: str | None = None, source: str | None = None target: str | None = None, source: str | None = None
) -> None: ) -> None:
"""Synchronize output towards a target."""
if not target: if not target:
user = "cd" user = "cd"
host = env.SPCD_PROJECT_PATH host = env.SPCD_PROJECT_PATH