forgepy-cli 1.0.0__py3-none-any.whl
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.
- builders/__init__.py +0 -0
- builders/base_builder.py +17 -0
- builders/file_builder.py +31 -0
- builders/folder_builder.py +30 -0
- builders/python_tools_builder.py +64 -0
- cli/__init__.py +3 -0
- cli/command.py +52 -0
- cli/commands/__init__.py +32 -0
- cli/commands/component_command.py +177 -0
- cli/commands/config_command.py +174 -0
- cli/commands/create_command.py +161 -0
- cli/commands/list_command.py +40 -0
- cli/commands/version_command.py +29 -0
- cli/dispatcher.py +61 -0
- cli/parser.py +84 -0
- components/__init__.py +1 -0
- components/base_component.py +30 -0
- components/component_context.py +21 -0
- components/component_installer.py +44 -0
- components/component_manifest.py +102 -0
- components/component_metadata.py +50 -0
- components/component_registry.py +74 -0
- components/component_state.py +243 -0
- components/component_validation.py +88 -0
- components/github_actions_component.py +75 -0
- components/pytest_component.py +40 -0
- components/ruff_component.py +40 -0
- config/__init__.py +0 -0
- config/default_structure.py +18 -0
- config/user_config.py +238 -0
- config/version.py +16 -0
- core/__init__.py +0 -0
- core/environment_builder.py +33 -0
- core/git_builder.py +90 -0
- core/project_generator.py +125 -0
- core/requirements_installer.py +50 -0
- core/vscode_builder.py +103 -0
- forgepy_cli-1.0.0.dist-info/METADATA +176 -0
- forgepy_cli-1.0.0.dist-info/RECORD +74 -0
- forgepy_cli-1.0.0.dist-info/WHEEL +5 -0
- forgepy_cli-1.0.0.dist-info/entry_points.txt +2 -0
- forgepy_cli-1.0.0.dist-info/licenses/LICENSE +21 -0
- forgepy_cli-1.0.0.dist-info/top_level.txt +8 -0
- main.py +20 -0
- models/__init__.py +1 -0
- models/project_config.py +87 -0
- templates/__init__.py +0 -0
- templates/app_template.py +20 -0
- templates/basic/basic_files.py +23 -0
- templates/basic/basic_template.py +32 -0
- templates/changelog_template.py +15 -0
- templates/cli/cli_files.py +70 -0
- templates/cli/cli_template.py +55 -0
- templates/env_template.py +20 -0
- templates/gitignore_template.py +27 -0
- templates/library/library_files.py +28 -0
- templates/library/library_template.py +56 -0
- templates/license_template.py +21 -0
- templates/pyproject_template.py +15 -0
- templates/readme_template.py +15 -0
- templates/requirements_template.py +13 -0
- templates/template_engine/base_template.py +58 -0
- templates/template_engine/file_template.py +76 -0
- templates/template_engine/package_name.py +30 -0
- templates/template_engine/template_context.py +24 -0
- templates/template_engine/template_files.py +10 -0
- templates/template_engine/template_metadata.py +59 -0
- templates/template_engine/template_registry.py +107 -0
- templates/template_manager.py +58 -0
- templates/vscode/__init__.py +0 -0
- templates/vscode/extensions_template.py +32 -0
- templates/vscode/launch_template.py +41 -0
- templates/vscode/settings_template.py +37 -0
- templates/vscode/tasks_template.py +66 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""
|
|
2
|
+
==================================================
|
|
3
|
+
ForgePy
|
|
4
|
+
Author : Rendy Zou
|
|
5
|
+
Module : VSCode Settings Template
|
|
6
|
+
==================================================
|
|
7
|
+
|
|
8
|
+
Deskripsi:
|
|
9
|
+
- Template settings.json untuk Visual Studio Code.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import json
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def build() -> str:
|
|
16
|
+
|
|
17
|
+
settings = {
|
|
18
|
+
"python.defaultInterpreterPath": ".venv\\Scripts\\python.exe",
|
|
19
|
+
|
|
20
|
+
"python.analysis.typeCheckingMode": "basic",
|
|
21
|
+
|
|
22
|
+
"python.analysis.autoImportCompletions": True,
|
|
23
|
+
|
|
24
|
+
"editor.formatOnSave": True,
|
|
25
|
+
|
|
26
|
+
"editor.tabSize": 4,
|
|
27
|
+
|
|
28
|
+
"files.trimTrailingWhitespace": True,
|
|
29
|
+
|
|
30
|
+
"files.insertFinalNewline": True,
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return json.dumps(
|
|
34
|
+
settings,
|
|
35
|
+
indent=4,
|
|
36
|
+
ensure_ascii=False,
|
|
37
|
+
)
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""
|
|
2
|
+
==================================================
|
|
3
|
+
ForgePy
|
|
4
|
+
Author : Rendy Zou
|
|
5
|
+
Module : VSCode Tasks Template
|
|
6
|
+
==================================================
|
|
7
|
+
|
|
8
|
+
Deskripsi:
|
|
9
|
+
- Template tasks.json untuk Visual Studio Code.
|
|
10
|
+
- Menyediakan task aplikasi jika tersedia dan install dependencies.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import json
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def build(entry_point: str | None = "app.py") -> str:
|
|
17
|
+
|
|
18
|
+
tasks = []
|
|
19
|
+
|
|
20
|
+
if entry_point is not None:
|
|
21
|
+
tasks.append(
|
|
22
|
+
{
|
|
23
|
+
"label": "Run Application",
|
|
24
|
+
"type": "shell",
|
|
25
|
+
"command": "${workspaceFolder}\\.venv\\Scripts\\python.exe",
|
|
26
|
+
"args": [
|
|
27
|
+
entry_point
|
|
28
|
+
],
|
|
29
|
+
"group": {
|
|
30
|
+
"kind": "build",
|
|
31
|
+
"isDefault": True
|
|
32
|
+
},
|
|
33
|
+
"presentation": {
|
|
34
|
+
"reveal": "always"
|
|
35
|
+
},
|
|
36
|
+
"problemMatcher": []
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
tasks.append(
|
|
41
|
+
{
|
|
42
|
+
"label": "Install Requirements",
|
|
43
|
+
"type": "shell",
|
|
44
|
+
"command": "${workspaceFolder}\\.venv\\Scripts\\pip.exe",
|
|
45
|
+
"args": [
|
|
46
|
+
"install",
|
|
47
|
+
"-r",
|
|
48
|
+
"requirements.txt"
|
|
49
|
+
],
|
|
50
|
+
"presentation": {
|
|
51
|
+
"reveal": "always"
|
|
52
|
+
},
|
|
53
|
+
"problemMatcher": []
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
task_configuration = {
|
|
58
|
+
"version": "2.0.0",
|
|
59
|
+
"tasks": tasks,
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return json.dumps(
|
|
63
|
+
task_configuration,
|
|
64
|
+
indent=4,
|
|
65
|
+
ensure_ascii=False,
|
|
66
|
+
)
|