Changed project files of general test project
This commit is contained in:
		
							
								
								
									
										57
									
								
								cpl.json
									
									
									
									
									
								
							
							
						
						
									
										57
									
								
								cpl.json
									
									
									
									
									
								
							@@ -1,57 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "ProjectSettings": {
 | 
			
		||||
    "Name": "sh_cpl",
 | 
			
		||||
    "Version": {
 | 
			
		||||
      "Major": "2021",
 | 
			
		||||
      "Minor": "4",
 | 
			
		||||
      "Micro": "post1"
 | 
			
		||||
    },
 | 
			
		||||
    "Author": "Sven Heidemann",
 | 
			
		||||
    "AuthorEmail": "sven.heidemann@sh-edraft.de",
 | 
			
		||||
    "Description": "sh-edraft Common Python library",
 | 
			
		||||
    "LongDescription": "sh-edraft Common Python library",
 | 
			
		||||
    "URL": "https://www.sh-edraft.de",
 | 
			
		||||
    "CopyrightDate": "2020 - 2021",
 | 
			
		||||
    "CopyrightName": "sh-edraft.de",
 | 
			
		||||
    "LicenseName": "MIT",
 | 
			
		||||
    "LicenseDescription": "MIT, see LICENSE for more details.",
 | 
			
		||||
    "Dependencies": [
 | 
			
		||||
      "colorama==0.4.4",
 | 
			
		||||
      "mysql-connector==2.2.9",
 | 
			
		||||
      "psutil==5.8.0",
 | 
			
		||||
      "packaging==20.9",
 | 
			
		||||
      "pyfiglet==0.8.post1",
 | 
			
		||||
      "pynput==1.7.3",
 | 
			
		||||
      "SQLAlchemy==1.4.3",
 | 
			
		||||
      "setuptools==54.2.0",
 | 
			
		||||
      "tabulate==0.8.9",
 | 
			
		||||
      "termcolor==1.1.0",
 | 
			
		||||
      "watchdog==2.0.2",
 | 
			
		||||
      "wheel==0.36.2"
 | 
			
		||||
    ],
 | 
			
		||||
    "PythonVersion": ">=3.8",
 | 
			
		||||
    "PythonPath": {},
 | 
			
		||||
    "Classifiers": []
 | 
			
		||||
  },
 | 
			
		||||
  "BuildSettings": {
 | 
			
		||||
    "ProjectType": "library",
 | 
			
		||||
    "SourcePath": "src",
 | 
			
		||||
    "OutputPath": "dist",
 | 
			
		||||
    "Main": "cpl_cli.main",
 | 
			
		||||
    "EntryPoint": "cpl",
 | 
			
		||||
    "IncludePackageData": true,
 | 
			
		||||
    "Included": [
 | 
			
		||||
      "*/templates"
 | 
			
		||||
    ],
 | 
			
		||||
    "Excluded": [
 | 
			
		||||
      "*/__pycache__",
 | 
			
		||||
      "*/logs",
 | 
			
		||||
      "*/tests"
 | 
			
		||||
    ],
 | 
			
		||||
    "PackageData": {
 | 
			
		||||
      "cpl_cli": [
 | 
			
		||||
        "*.json"
 | 
			
		||||
      ]
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -50,13 +50,6 @@ class LiveServerThread(threading.Thread):
 | 
			
		||||
            Console.error('Entry point main.py not found')
 | 
			
		||||
            return
 | 
			
		||||
 | 
			
		||||
        Console.set_foreground_color(ForegroundColorEnum.green)
 | 
			
		||||
        Console.write_line('Read successfully')
 | 
			
		||||
        Console.set_foreground_color(ForegroundColorEnum.cyan)
 | 
			
		||||
        now = datetime.now()
 | 
			
		||||
        Console.write_line(f'Started at {now.strftime("%Y-%m-%d %H:%M:%S")}\n\n')
 | 
			
		||||
        Console.set_foreground_color(ForegroundColorEnum.default)
 | 
			
		||||
 | 
			
		||||
        env_vars = os.environ
 | 
			
		||||
        if sys.platform == 'win32':
 | 
			
		||||
            env_vars['PYTHONPATH'] = f'{os.path.dirname(src_path)};' \
 | 
			
		||||
@@ -65,5 +58,12 @@ class LiveServerThread(threading.Thread):
 | 
			
		||||
            env_vars['PYTHONPATH'] = f'{os.path.dirname(src_path)}:' \
 | 
			
		||||
                                     f'{os.path.join(os.path.dirname(src_path), self._build_settings.source_path)}'
 | 
			
		||||
 | 
			
		||||
        Console.set_foreground_color(ForegroundColorEnum.green)
 | 
			
		||||
        Console.write_line('Read successfully')
 | 
			
		||||
        Console.set_foreground_color(ForegroundColorEnum.cyan)
 | 
			
		||||
        now = datetime.now()
 | 
			
		||||
        Console.write_line(f'Started at {now.strftime("%Y-%m-%d %H:%M:%S")}\n\n')
 | 
			
		||||
        Console.set_foreground_color(ForegroundColorEnum.default)
 | 
			
		||||
 | 
			
		||||
        self._command = [sys.executable, self._main, ''.join(self._args)]
 | 
			
		||||
        subprocess.run(self._command, env=env_vars)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								src/tests/custom/general/cpl-workspace.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								src/tests/custom/general/cpl-workspace.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
{
 | 
			
		||||
  "Workspace": {
 | 
			
		||||
    "DefaultProject": "general",
 | 
			
		||||
    "Projects": {
 | 
			
		||||
      "general": "src/general/general.json"
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -8,7 +8,7 @@ from cpl.dependency_injection.service_provider_abc import ServiceProviderABC
 | 
			
		||||
from cpl.logging.logger_abc import LoggerABC
 | 
			
		||||
from cpl.mailing.email import EMail
 | 
			
		||||
from cpl.mailing.email_client_abc import EMailClientABC
 | 
			
		||||
from tests.custom.general.test_service import TestService
 | 
			
		||||
from test_service import TestService
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Application(ApplicationABC):
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
from cpl.application.application_builder import ApplicationBuilder
 | 
			
		||||
from tests.custom.general.application import Application
 | 
			
		||||
from tests.custom.general.startup import Startup
 | 
			
		||||
from application import Application
 | 
			
		||||
from startup import Startup
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def main():
 | 
			
		||||
@@ -6,7 +6,7 @@ from cpl.logging.logger_service import Logger
 | 
			
		||||
from cpl.logging.logger_abc import LoggerABC
 | 
			
		||||
from cpl.mailing.email_client_service import EMailClient
 | 
			
		||||
from cpl.mailing.email_client_abc import EMailClientABC
 | 
			
		||||
from tests.custom.general.test_service import TestService
 | 
			
		||||
from test_service import TestService
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Startup(StartupABC):
 | 
			
		||||
@@ -20,7 +20,6 @@ class Startup(StartupABC):
 | 
			
		||||
    def configure_configuration(self) -> ConfigurationABC:
 | 
			
		||||
        self._configuration.add_environment_variables('PYTHON_')
 | 
			
		||||
        self._configuration.add_environment_variables('CPL_')
 | 
			
		||||
        self._configuration.add_console_arguments()
 | 
			
		||||
        self._configuration.add_json_file(f'appsettings.json')
 | 
			
		||||
        self._configuration.add_json_file(f'appsettings.{self._configuration.environment.environment_name}.json')
 | 
			
		||||
        self._configuration.add_json_file(f'appsettings.{self._configuration.environment.host_name}.json', optional=True)
 | 
			
		||||
		Reference in New Issue
	
	Block a user