py-app-dev 2.2.0__tar.gz → 2.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py-app-dev
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: My application development modules.
5
5
  Home-page: https://github.com/cuinixam/python-app-dev
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "py-app-dev"
3
- version = "2.2.0"
3
+ version = "2.3.0"
4
4
  description = "My application development modules."
5
5
  authors = ["cuinixam <me@cuinixam.com>"]
6
6
  license = "MIT"
@@ -0,0 +1 @@
1
+ __version__ = "2.3.0"
@@ -10,6 +10,9 @@ from .logging import logger
10
10
 
11
11
 
12
12
  class Runnable(ABC):
13
+ def __init__(self, needs_dependency_management: bool = True) -> None:
14
+ self.needs_dependency_management = needs_dependency_management
15
+
13
16
  @abstractmethod
14
17
  def run(self) -> int:
15
18
  """Run and return exit code."""
@@ -115,6 +118,12 @@ class Executor:
115
118
  return RunInfoStatus.MATCH
116
119
 
117
120
  def execute(self, runnable: Runnable) -> int:
121
+ if not runnable.needs_dependency_management:
122
+ logger.info(f"Runnable '{runnable.get_name()}' does not need dependency management. Executing directly.")
123
+ if self.dry_run:
124
+ return 0
125
+ return runnable.run()
126
+
118
127
  run_info_status = self.previous_run_info_matches(runnable)
119
128
  if run_info_status.should_run:
120
129
  logger.info(f"Runnable '{runnable.get_name()}' must run. {run_info_status.message}")
@@ -1 +0,0 @@
1
- __version__ = "2.2.0"
File without changes
File without changes