quipus-generate 0.1.3__tar.gz → 0.1.4__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.
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/LICENSE +0 -0
- {quipus_generate-0.1.3/quipus_generate.egg-info → quipus_generate-0.1.4}/PKG-INFO +1 -1
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/README.md +0 -0
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/amautta_project/__init__.py +0 -0
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/amautta_project/cli.py +3 -0
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/amautta_project/docker_modified.py +0 -0
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/amautta_project/entity_generator.py +0 -0
- quipus_generate-0.1.4/amautta_project/git_generator.py +77 -0
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/amautta_project/microservice_generator.py +2 -2
- {quipus_generate-0.1.3 → quipus_generate-0.1.4/quipus_generate.egg-info}/PKG-INFO +1 -1
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/quipus_generate.egg-info/SOURCES.txt +1 -0
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/setup.py +1 -1
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/amautta_project/main_modified.py +0 -0
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/amautta_project/migration_generator.py +0 -0
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/amautta_project/proyect_generator.py +0 -0
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/amautta_project/readme_modified.py +0 -0
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/amautta_project/site_generator.py +0 -0
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/quipus_generate.egg-info/dependency_links.txt +0 -0
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/quipus_generate.egg-info/entry_points.txt +0 -0
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/quipus_generate.egg-info/requires.txt +0 -0
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/quipus_generate.egg-info/top_level.txt +0 -0
- {quipus_generate-0.1.3 → quipus_generate-0.1.4}/setup.cfg +0 -0
File without changes
|
File without changes
|
File without changes
|
@@ -6,6 +6,7 @@ from amautta_project.migration_generator import create as migration
|
|
6
6
|
from amautta_project.readme_modified import modify as readme_modify
|
7
7
|
from amautta_project.main_modified import modify as main_modify
|
8
8
|
from amautta_project.proyect_generator import create as project
|
9
|
+
from amautta_project.git_generator import create as git_create
|
9
10
|
from amautta_project.entity_generator import create as entity
|
10
11
|
from amautta_project.site_generator import create as site
|
11
12
|
|
@@ -29,6 +30,7 @@ def main():
|
|
29
30
|
|
30
31
|
if args.accion == "init":
|
31
32
|
project(args.name)
|
33
|
+
git_create("init", args.name)
|
32
34
|
|
33
35
|
elif args.accion == "microservice":
|
34
36
|
microservice(args.name)
|
@@ -38,6 +40,7 @@ def main():
|
|
38
40
|
migration(args.entity, args.name)
|
39
41
|
main_modify(args.entity, args.name)
|
40
42
|
readme_modify(args.entity, args.name)
|
43
|
+
git_create("microservice", args.name)
|
41
44
|
|
42
45
|
elif args.accion == "entity":
|
43
46
|
entity(args.name)
|
File without changes
|
File without changes
|
@@ -0,0 +1,77 @@
|
|
1
|
+
from pathlib import Path
|
2
|
+
import subprocess
|
3
|
+
import os
|
4
|
+
|
5
|
+
def run_command(command, cwd=None):
|
6
|
+
subprocess.run(
|
7
|
+
command,
|
8
|
+
cwd=cwd,
|
9
|
+
shell=True,
|
10
|
+
check=True,
|
11
|
+
stdout=subprocess.DEVNULL, # No mostrar salida estándar
|
12
|
+
)
|
13
|
+
|
14
|
+
def create(proccess, name):
|
15
|
+
if proccess == "init":
|
16
|
+
gitignore = (
|
17
|
+
".env\n"
|
18
|
+
".DS_Store\n"
|
19
|
+
".vscode/\n"
|
20
|
+
".idea/\n"
|
21
|
+
"example_entity\n"
|
22
|
+
"nginx/sites/example_entity.conf\n"
|
23
|
+
)
|
24
|
+
elif proccess == "microservice":
|
25
|
+
gitignore = (
|
26
|
+
"# Entornos virtuales\n"
|
27
|
+
"venv/\n"
|
28
|
+
".env/\n"
|
29
|
+
"\n"
|
30
|
+
"# Archivos de Python compilados\n"
|
31
|
+
"__pycache__/\n"
|
32
|
+
"*.py[cod]\n"
|
33
|
+
"*.pyo\n"
|
34
|
+
"\n"
|
35
|
+
"# Configuración de IDE\n"
|
36
|
+
".vscode/\n"
|
37
|
+
".idea/\n"
|
38
|
+
"\n"
|
39
|
+
"# Archivos temporales\n"
|
40
|
+
"*.log\n"
|
41
|
+
".DS_Store\n"
|
42
|
+
"\n"
|
43
|
+
"# Build\n"
|
44
|
+
"dist/\n"
|
45
|
+
"build/\n"
|
46
|
+
"*.egg-info/\n"
|
47
|
+
"\n"
|
48
|
+
"# Archivos de configuración de Docker\n"
|
49
|
+
"Dockerfile\n"
|
50
|
+
".dockerignore\n"
|
51
|
+
)
|
52
|
+
|
53
|
+
archivos = {
|
54
|
+
".gitignore": gitignore,
|
55
|
+
}
|
56
|
+
|
57
|
+
# Crear archivos
|
58
|
+
for archivo, content in archivos.items():
|
59
|
+
ruta_archivo = os.path.join(name, archivo)
|
60
|
+
with open(ruta_archivo, "w") as f:
|
61
|
+
f.write(content)
|
62
|
+
|
63
|
+
if proccess == "init":
|
64
|
+
tipo = "proyecto"
|
65
|
+
elif proccess == "microservice":
|
66
|
+
tipo = "microservicio"
|
67
|
+
|
68
|
+
print(f"✅ Se creo el archivo .gitignore para el {tipo} '{name}' con éxito.")
|
69
|
+
|
70
|
+
# Ejecutar comandos de git en el directorio del proyecto
|
71
|
+
run_command("git init", cwd=name)
|
72
|
+
run_command("git add .", cwd=name)
|
73
|
+
run_command("git commit -m 'Initial commit'", cwd=name)
|
74
|
+
run_command("git branch -M main", cwd=name)
|
75
|
+
|
76
|
+
print(f"✅ Se inicializó el repositorio git para el {tipo} '{name}' con éxito.")
|
77
|
+
|
@@ -6,7 +6,7 @@ def create(name):
|
|
6
6
|
# si no esta ubicado en la carpeta del proyecto que debe contemerr un docker-compose.yml para toda la ejecucion
|
7
7
|
if not os.path.isfile("docker-compose.yml"):
|
8
8
|
print("ℹ️ No se encuentra en la carpeta del proyecto.")
|
9
|
-
sys.exit()
|
9
|
+
#sys.exit()
|
10
10
|
|
11
11
|
estructura = [
|
12
12
|
"app/components/filter/domain/value_objects",
|
@@ -422,7 +422,7 @@ def create(name):
|
|
422
422
|
for carpeta in estructura:
|
423
423
|
os.makedirs(os.path.join(name, carpeta), exist_ok=True)
|
424
424
|
|
425
|
-
# Crear archivos
|
425
|
+
# Crear archivos
|
426
426
|
for archivo, content in archivos.items():
|
427
427
|
ruta_archivo = os.path.join(name, archivo)
|
428
428
|
with open(ruta_archivo, "w") as f:
|
@@ -5,6 +5,7 @@ amautta_project/__init__.py
|
|
5
5
|
amautta_project/cli.py
|
6
6
|
amautta_project/docker_modified.py
|
7
7
|
amautta_project/entity_generator.py
|
8
|
+
amautta_project/git_generator.py
|
8
9
|
amautta_project/main_modified.py
|
9
10
|
amautta_project/microservice_generator.py
|
10
11
|
amautta_project/migration_generator.py
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{quipus_generate-0.1.3 → quipus_generate-0.1.4}/quipus_generate.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|