2021.4.7 #29

Merged
edraft merged 9 commits from 2021.4.7 into 2021.4.post1 2021-04-13 15:47:25 +02:00
11 changed files with 46 additions and 0 deletions
Showing only changes of commit 7eca382cb3 - Show all commits

View File

@ -28,6 +28,12 @@ class AddService(CommandABC):
@property @property
def help_message(self) -> str: def help_message(self) -> str:
return textwrap.dedent("""\ return textwrap.dedent("""\
Adds a project reference to given project.
usage: cpl add <source-project> <target-project>
arguments:
source-project: Name of the project to which the reference has to be
target-project: Name of the project to be referenced
""") """)
@staticmethod @staticmethod

View File

@ -18,6 +18,8 @@ class BuildService(CommandABC):
@property @property
def help_message(self) -> str: def help_message(self) -> str:
return textwrap.dedent("""\ return textwrap.dedent("""\
Copies an python app into an output directory named build/ at the given output path. Must be executed within a CPL workspace or project directory
usage: cpl build
""") """)
def run(self, args: list[str]): def run(self, args: list[str]):

View File

@ -22,6 +22,11 @@ class HelpService(CommandABC):
@property @property
def help_message(self) -> str: def help_message(self) -> str:
return textwrap.dedent("""\ return textwrap.dedent("""\
Lists available command and their short descriptions.
usage: cpl help <command>
Arguments:
command The command to display the help message for
""") """)
def run(self, args: list[str]): def run(self, args: list[str]):

View File

@ -43,6 +43,11 @@ class InstallService(CommandABC):
@property @property
def help_message(self) -> str: def help_message(self) -> str:
return textwrap.dedent("""\ return textwrap.dedent("""\
Installs given package via pip
usage: cpl install <package>
Arguments:
package The package to install
""") """)
def _install_project(self): def _install_project(self):

View File

@ -50,6 +50,16 @@ class NewService(CommandABC):
@property @property
def help_message(self) -> str: def help_message(self) -> str:
return textwrap.dedent("""\ return textwrap.dedent("""\
Generates a workspace and initial project or add a project to workspace.
usage: cpl new <type> <name>
Arguments:
type The project type of the initial project
name Name of the workspace or the project
Types:
console
library
""") """)
@staticmethod @staticmethod

View File

@ -18,6 +18,8 @@ class PublishService(CommandABC):
@property @property
def help_message(self) -> str: def help_message(self) -> str:
return textwrap.dedent("""\ return textwrap.dedent("""\
Prepares files for publish into an output directory named dist/ at the given output path and executes setup.py.
usage: cpl publish
""") """)
def run(self, args: list[str]): def run(self, args: list[str]):

View File

@ -29,6 +29,11 @@ class RemoveService(CommandABC):
@property @property
def help_message(self) -> str: def help_message(self) -> str:
return textwrap.dedent("""\ return textwrap.dedent("""\
Removes a project from workspace.
usage: cpl add <project>
Arguments:
project The name of the project to delete
""") """)
@staticmethod @staticmethod

View File

@ -18,6 +18,8 @@ class StartService(CommandABC):
@property @property
def help_message(self) -> str: def help_message(self) -> str:
return textwrap.dedent("""\ return textwrap.dedent("""\
Starts your application, restarting on file changes.
usage: cpl start
""") """)
def run(self, args: list[str]): def run(self, args: list[str]):

View File

@ -35,6 +35,11 @@ class UninstallService(CommandABC):
@property @property
def help_message(self) -> str: def help_message(self) -> str:
return textwrap.dedent("""\ return textwrap.dedent("""\
Uninstalls given package via pip
usage: cpl uninstall <package>
Arguments:
package The package to uninstall
""") """)
def run(self, args: list[str]): def run(self, args: list[str]):

View File

@ -42,6 +42,8 @@ class UpdateService(CommandABC):
@property @property
def help_message(self) -> str: def help_message(self) -> str:
return textwrap.dedent("""\ return textwrap.dedent("""\
Updates the CPL and project dependencies.
usage: cpl update
""") """)
def _collect_project_dependencies(self) -> list[tuple]: def _collect_project_dependencies(self) -> list[tuple]:

View File

@ -22,6 +22,8 @@ class VersionService(CommandABC):
@property @property
def help_message(self) -> str: def help_message(self) -> str:
return textwrap.dedent("""\ return textwrap.dedent("""\
Lists the version of CPL, CPL CLI and all installed packages from pip.
usage: cpl version
""") """)
def run(self, args: list[str]): def run(self, args: list[str]):