First dev build

This commit is contained in:
2022-05-25 19:38:38 +02:00
parent 28505479ba
commit 4224960837
52 changed files with 166 additions and 148 deletions

View File

@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
"""
set-pip-urls CPL internal tool to set pip URL for CLI by environment
~~~~~~~~~~~~~~~~~~~
CPL internal tool to set pip URL for CLI by environment
:copyright: (c) 2020 - 2022 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
__title__ = 'set_pip_urls'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
__version__ = '2022.6.0'
from collections import namedtuple
# imports:
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
version_info = VersionInfo(major='2022', minor='6', micro='0')

View File

@@ -0,0 +1,16 @@
from cpl_core.application import ApplicationABC
from cpl_core.configuration import ConfigurationABC
from cpl_core.console import Console
from cpl_core.dependency_injection import ServiceProviderABC
class Application(ApplicationABC):
def __init__(self, config: ConfigurationABC, services: ServiceProviderABC):
ApplicationABC.__init__(self, config, services)
def configure(self):
pass
def main(self):
Console.write_line('Hello World', self._environment.environment_name)

View File

@@ -0,0 +1,7 @@
{
"PIPSettings": {
"production": "https://pip.sh-edraft.de",
"staging": "https://pip-exp.sh-edraft.de",
"development": "https://pip-dev.sh-edraft.de"
}
}

View File

@@ -0,0 +1,14 @@
from cpl_core.application import ApplicationBuilder
from set_pip_urls.application import Application
from set_pip_urls.startup import Startup
def main():
app_builder = ApplicationBuilder(Application)
app_builder.use_startup(Startup)
app_builder.build().run()
if __name__ == '__main__':
main()

View File

@@ -0,0 +1,41 @@
{
"ProjectSettings": {
"Name": "set-pip-urls",
"Version": {
"Major": "2022",
"Minor": "6",
"Micro": "0"
},
"Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de",
"Description": "CPL internal tool to set pip URL for CLI by environment",
"LongDescription": "CPL internal tool to set pip URL for CLI by environment",
"URL": "https://www.sh-edraft.de",
"CopyrightDate": "2020 - 2022",
"CopyrightName": "sh-edraft.de",
"LicenseName": "MIT",
"LicenseDescription": "MIT, see LICENSE for more details.",
"Dependencies": [
"cpl-core>=2022.6.16.dev1"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},
"Classifiers": []
},
"BuildSettings": {
"ProjectType": "console",
"SourcePath": "",
"OutputPath": "../../dist",
"Main": "set_pip_url.main",
"EntryPoint": "set-pip-url",
"IncludePackageData": false,
"Included": [],
"Excluded": [
"*/__pycache__",
"*/logs",
"*/tests"
],
"PackageData": {},
"ProjectReferences": []
}
}

View File

@@ -0,0 +1,16 @@
from cpl_core.application import StartupABC
from cpl_core.configuration import ConfigurationABC
from cpl_core.dependency_injection import ServiceProviderABC, ServiceCollectionABC
from cpl_core.environment import ApplicationEnvironment
class Startup(StartupABC):
def __init__(self):
StartupABC.__init__(self)
def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC:
return configuration
def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC:
return services.build_service_provider()