python
dev_tool.commands.python
log = logging.getLogger(__name__)
module-attribute
PythonCommandGroup
Bases: CommandGroup
A command group for Python operations.
This class provides commands for setting up Python environments, managing dependencies, running scripts, and executing tests and coverage analysis.
The constructor for the PythonCommandGroup class.
This method initializes the command group with required services and registers all command methods.
Parameters:
-
coverage(CoverageService) –The coverage service for code coverage analysis.
-
django(DjangoService) –The Django service for Django operations.
-
docker(DockerService) –The Docker service for container management.
-
portal(PortalService) –The Stratus Portal service for connecting to our API.
-
postgres(PostgresService) –The PostgreSQL service for database operations.
-
python(PythonService) –The Python service for Python operations.
-
scripting(ScriptingService) –The scripting service for running Python scripts.
-
unittest(UnitTestService) –The unittest service for running tests.
Source code in dev_tool/commands/python.py
coverage = coverage
instance-attribute
django = django
instance-attribute
docker = docker
instance-attribute
portal = portal
instance-attribute
postgres = postgres
instance-attribute
python = python
instance-attribute
scripting = scripting
instance-attribute
unittest = unittest
instance-attribute
__str__
The string representation of the command group.
This method returns the category name for the command group.
Returns:
-
str–The category name as a string.
rebuild_project
A command that opens a submenu for project setup options.
This method returns a menu for project-related commands.
Returns:
-
Menu–A submenu for project setup options.
Source code in dev_tool/commands/python.py
package_management
A command that opens a submenu for package management options.
This method returns a menu for package-related commands.
Returns:
-
Menu–A submenu for package management options.
Source code in dev_tool/commands/python.py
run_python_script
A command that opens a submenu for running Python scripts.
This method returns a menu for selecting and running Python scripts.
Returns:
-
Menu–A submenu for selecting and running Python scripts.
Source code in dev_tool/commands/python.py
testing
A command that opens a submenu for testing options.
This method returns a menu for test-related commands.
Returns:
-
Menu–A submenu for testing options.