wexample-wex-addon-app 0.0.2__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.
- wexample-wex-addon-app-0.0.2/PKG-INFO +16 -0
- wexample-wex-addon-app-0.0.2/README.md +3 -0
- wexample-wex-addon-app-0.0.2/setup.cfg +4 -0
- wexample-wex-addon-app-0.0.2/setup.py +21 -0
- wexample-wex-addon-app-0.0.2/tests/__init__.py +0 -0
- wexample-wex-addon-app-0.0.2/wexample_wex_addon_app/__init__.py +0 -0
- wexample-wex-addon-app-0.0.2/wexample_wex_addon_app/const/__init__.py +0 -0
- wexample-wex-addon-app-0.0.2/wexample_wex_addon_app/const/globals.py +9 -0
- wexample-wex-addon-app-0.0.2/wexample_wex_addon_app/const/types.py +20 -0
- wexample-wex-addon-app-0.0.2/wexample_wex_addon_app/options_values/__init__.py +0 -0
- wexample-wex-addon-app-0.0.2/wexample_wex_addon_app/options_values/readme_content_option_value.py +13 -0
- wexample-wex-addon-app-0.0.2/wexample_wex_addon_app/utils/AppDirectoryStructure.py +64 -0
- wexample-wex-addon-app-0.0.2/wexample_wex_addon_app/utils/__init__.py +0 -0
- wexample-wex-addon-app-0.0.2/wexample_wex_addon_app.egg-info/PKG-INFO +16 -0
- wexample-wex-addon-app-0.0.2/wexample_wex_addon_app.egg-info/SOURCES.txt +16 -0
- wexample-wex-addon-app-0.0.2/wexample_wex_addon_app.egg-info/__init__.py +0 -0
- wexample-wex-addon-app-0.0.2/wexample_wex_addon_app.egg-info/dependency_links.txt +1 -0
- wexample-wex-addon-app-0.0.2/wexample_wex_addon_app.egg-info/top_level.txt +2 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: wexample-wex-addon-app
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: App management with wex
|
|
5
|
+
Home-page: https://github.com/wexample/python-wex-addon-app
|
|
6
|
+
Author: weeger
|
|
7
|
+
Author-email: contact@wexample.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.6
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# Wex app default
|
|
15
|
+
|
|
16
|
+
App management default
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name='wexample-wex-addon-app',
|
|
5
|
+
version=open('version.txt').read(),
|
|
6
|
+
author='weeger',
|
|
7
|
+
author_email='contact@wexample.com',
|
|
8
|
+
description='App management with wex',
|
|
9
|
+
long_description=open('README.md').read(),
|
|
10
|
+
long_description_content_type='text/markdown',
|
|
11
|
+
url='https://github.com/wexample/python-wex-addon-app',
|
|
12
|
+
packages=find_packages(),
|
|
13
|
+
classifiers=[
|
|
14
|
+
'Programming Language :: Python :: 3',
|
|
15
|
+
'License :: OSI Approved :: MIT License',
|
|
16
|
+
'Operating System :: OS Independent',
|
|
17
|
+
],
|
|
18
|
+
install_requires=[
|
|
19
|
+
],
|
|
20
|
+
python_requires='>=3.6',
|
|
21
|
+
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from wexample_wex_core.const.globals import CORE_COMMAND_NAME
|
|
2
|
+
|
|
3
|
+
APP_DIR_APP_DATA_NAME: str = f".{CORE_COMMAND_NAME}"
|
|
4
|
+
APP_ENV_DEV: str = "dev"
|
|
5
|
+
APP_ENV_LOCAL: str = "local"
|
|
6
|
+
APP_ENV_PROD: str = "prod"
|
|
7
|
+
APP_ENV_TEST: str = "test"
|
|
8
|
+
APP_FILE_APP_CONFIG: str = "config.yml"
|
|
9
|
+
APP_FILE_APP_ENV: str = ".env"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from typing import TypedDict, Optional, List, Dict
|
|
2
|
+
|
|
3
|
+
from wexample_helpers.const.types import StringKeysDict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class AppConfig(TypedDict):
|
|
7
|
+
branch: Optional[str]
|
|
8
|
+
domain_main: str
|
|
9
|
+
domain_tld: str
|
|
10
|
+
domains: List[str]
|
|
11
|
+
domains_string: str
|
|
12
|
+
env: StringKeysDict
|
|
13
|
+
name: str
|
|
14
|
+
host: Dict[str, str]
|
|
15
|
+
password: Dict[str, str]
|
|
16
|
+
path: Dict[str, str]
|
|
17
|
+
server: StringKeysDict
|
|
18
|
+
service: StringKeysDict
|
|
19
|
+
started: bool
|
|
20
|
+
user: Dict[str, str | int]
|
|
File without changes
|
wexample-wex-addon-app-0.0.2/wexample_wex_addon_app/options_values/readme_content_option_value.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from wexample_filestate.const.types_state_items import TargetFileOrDirectory
|
|
2
|
+
from wexample_filestate.options_values.aggregated_templates_option_value import AggregatedTemplatesOptionValue
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class ReadmeContentOptionValue(AggregatedTemplatesOptionValue):
|
|
6
|
+
def render(self, target: TargetFileOrDirectory, current_value: str) -> str:
|
|
7
|
+
self.templates = [
|
|
8
|
+
f'# {target.parent.get_name()}' ,
|
|
9
|
+
'## Introduction',
|
|
10
|
+
'## License'
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
return super().render(target, current_value)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
from wexample_filestate.const.enums import DiskItemType
|
|
4
|
+
from wexample_filestate.const.types import StateItemConfig
|
|
5
|
+
from wexample_filestate.options_values.content_filter.trim_content_filter import TrimContentFilter
|
|
6
|
+
from wexample_filestate.options_values.content_option_value import ContentOptionValue
|
|
7
|
+
from wexample_helpers.const.types import *
|
|
8
|
+
|
|
9
|
+
from wexample_wex_addon_app.const.globals import (
|
|
10
|
+
APP_FILE_APP_CONFIG,
|
|
11
|
+
APP_FILE_APP_ENV,
|
|
12
|
+
)
|
|
13
|
+
from wexample_wex_addon_app.options_values.readme_content_option_value import ReadmeContentOptionValue
|
|
14
|
+
from wexample_wex_core.utils.workdir import Workdir
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class AppDirectoryStructure(Workdir):
|
|
18
|
+
def build_config(self, config: Optional[StateItemConfig] = None) -> StateItemConfig:
|
|
19
|
+
config = super().build_config(config)
|
|
20
|
+
children = config["children"]
|
|
21
|
+
|
|
22
|
+
children.append({
|
|
23
|
+
"name": 'README.md',
|
|
24
|
+
"type": DiskItemType.FILE,
|
|
25
|
+
"should_exist": True,
|
|
26
|
+
"default_content": ReadmeContentOptionValue(
|
|
27
|
+
templates=[],
|
|
28
|
+
parameters={}
|
|
29
|
+
),
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
children.append({
|
|
33
|
+
"name": 'version.txt',
|
|
34
|
+
"type": DiskItemType.FILE,
|
|
35
|
+
"should_exist": True,
|
|
36
|
+
"default_content": f"0.0.1",
|
|
37
|
+
"content": ContentOptionValue(filters=[TrimContentFilter()])
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
return config or {}
|
|
41
|
+
|
|
42
|
+
def build_setup_config(self, config: Optional[StateItemConfig] = None) -> StateItemConfig:
|
|
43
|
+
config = super().build_setup_config(config)
|
|
44
|
+
children = config["children"]
|
|
45
|
+
|
|
46
|
+
children.append({
|
|
47
|
+
"name": APP_FILE_APP_CONFIG,
|
|
48
|
+
"type": DiskItemType.FILE,
|
|
49
|
+
"should_exist": True
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
children.append({
|
|
53
|
+
"name": APP_FILE_APP_ENV,
|
|
54
|
+
"type": DiskItemType.DIRECTORY,
|
|
55
|
+
"should_exist": True,
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
children.append({
|
|
59
|
+
"name": "tmp",
|
|
60
|
+
"type": DiskItemType.DIRECTORY,
|
|
61
|
+
"should_exist": True
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
return config
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: wexample-wex-addon-app
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: App management with wex
|
|
5
|
+
Home-page: https://github.com/wexample/python-wex-addon-app
|
|
6
|
+
Author: weeger
|
|
7
|
+
Author-email: contact@wexample.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.6
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# Wex app default
|
|
15
|
+
|
|
16
|
+
App management default
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
setup.py
|
|
3
|
+
tests/__init__.py
|
|
4
|
+
wexample_wex_addon_app/__init__.py
|
|
5
|
+
wexample_wex_addon_app.egg-info/PKG-INFO
|
|
6
|
+
wexample_wex_addon_app.egg-info/SOURCES.txt
|
|
7
|
+
wexample_wex_addon_app.egg-info/__init__.py
|
|
8
|
+
wexample_wex_addon_app.egg-info/dependency_links.txt
|
|
9
|
+
wexample_wex_addon_app.egg-info/top_level.txt
|
|
10
|
+
wexample_wex_addon_app/const/__init__.py
|
|
11
|
+
wexample_wex_addon_app/const/globals.py
|
|
12
|
+
wexample_wex_addon_app/const/types.py
|
|
13
|
+
wexample_wex_addon_app/options_values/__init__.py
|
|
14
|
+
wexample_wex_addon_app/options_values/readme_content_option_value.py
|
|
15
|
+
wexample_wex_addon_app/utils/AppDirectoryStructure.py
|
|
16
|
+
wexample_wex_addon_app/utils/__init__.py
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|