arkitekt-next 0.8.42__py3-none-any.whl → 0.8.43__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.
Potentially problematic release.
This version of arkitekt-next might be problematic. Click here for more details.
- arkitekt_next/cli/commands/gen/init.py +31 -12
- {arkitekt_next-0.8.42.dist-info → arkitekt_next-0.8.43.dist-info}/METADATA +1 -1
- {arkitekt_next-0.8.42.dist-info → arkitekt_next-0.8.43.dist-info}/RECORD +6 -6
- {arkitekt_next-0.8.42.dist-info → arkitekt_next-0.8.43.dist-info}/LICENSE +0 -0
- {arkitekt_next-0.8.42.dist-info → arkitekt_next-0.8.43.dist-info}/WHEEL +0 -0
- {arkitekt_next-0.8.42.dist-info → arkitekt_next-0.8.43.dist-info}/entry_points.txt +0 -0
|
@@ -55,6 +55,7 @@ def init(ctx, boring, services, config, documents, schemas, path, seperate_doc_d
|
|
|
55
55
|
|
|
56
56
|
chosen_services = registry.service_builders
|
|
57
57
|
|
|
58
|
+
|
|
58
59
|
if services:
|
|
59
60
|
chosen_services = {
|
|
60
61
|
key: service
|
|
@@ -70,6 +71,19 @@ def init(ctx, boring, services, config, documents, schemas, path, seperate_doc_d
|
|
|
70
71
|
chosen_services = {service: chosen_services[service]}
|
|
71
72
|
|
|
72
73
|
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
if os.path.exists(config):
|
|
77
|
+
if click.confirm(
|
|
78
|
+
f"GraphQL Config file already exists. Do you want to merge your choices?"
|
|
79
|
+
):
|
|
80
|
+
file = yaml.load(open(config, "r"), Loader=yaml.FullLoader)
|
|
81
|
+
projects = file.get("projects", {})
|
|
82
|
+
click.echo(f"Merging {",".join(chosen_services.keys())} in {",".join(projects.keys())}...")
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
has_done_something = False
|
|
86
|
+
|
|
73
87
|
|
|
74
88
|
for key, service in chosen_services.items():
|
|
75
89
|
try:
|
|
@@ -80,6 +94,13 @@ def init(ctx, boring, services, config, documents, schemas, path, seperate_doc_d
|
|
|
80
94
|
get_console(ctx).print(f"[red]No schema or project found for {key} [/]")
|
|
81
95
|
continue
|
|
82
96
|
|
|
97
|
+
if key in projects:
|
|
98
|
+
get_console(ctx).print(f"[red]Project {key} already exists [/]")
|
|
99
|
+
if not click.confirm("Do you want to overwrite it?"):
|
|
100
|
+
continue
|
|
101
|
+
|
|
102
|
+
has_done_something = True
|
|
103
|
+
|
|
83
104
|
if documents:
|
|
84
105
|
os.makedirs(os.path.join(app_documents, key), exist_ok=True)
|
|
85
106
|
if seperate_doc_dirs:
|
|
@@ -119,15 +140,13 @@ def init(ctx, boring, services, config, documents, schemas, path, seperate_doc_d
|
|
|
119
140
|
except Exception as e:
|
|
120
141
|
raise ClickException(f"Failed to initialize project for {key}. Error: {e}") from e
|
|
121
142
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
)
|
|
133
|
-
get_console(ctx).print(f"Config file written to {graph_config_path}")
|
|
143
|
+
|
|
144
|
+
if has_done_something:
|
|
145
|
+
graph_config_path = os.path.join(app_directory, config)
|
|
146
|
+
yaml.safe_dump(
|
|
147
|
+
{"projects": projects}, open(graph_config_path, "w"), sort_keys=False
|
|
148
|
+
)
|
|
149
|
+
get_console(ctx).print(f"Config file written to {graph_config_path}")
|
|
150
|
+
else:
|
|
151
|
+
get_console(ctx).print("No projects initialized")
|
|
152
|
+
get_console(ctx).print("Exiting...")
|
|
@@ -52,7 +52,7 @@ arkitekt_next/cli/commands/call/main.py,sha256=SdxlvSgA17-M_gwItiFU_srbh-CNdHpCT
|
|
|
52
52
|
arkitekt_next/cli/commands/call/remote.py,sha256=Id6t1nUdXmERx9wbutEhvryUMAM80_G4HVHkhYZosTE,2097
|
|
53
53
|
arkitekt_next/cli/commands/gen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
54
|
arkitekt_next/cli/commands/gen/compile.py,sha256=F0rAeBL4WWLdBGQRxVNqe5Bjek_SovhNO5rKrMEhj_4,1457
|
|
55
|
-
arkitekt_next/cli/commands/gen/init.py,sha256=
|
|
55
|
+
arkitekt_next/cli/commands/gen/init.py,sha256=Zuvx02qRN9HQs6OkDB2h2usdRHiPmYb5rocK5sWeP2s,4887
|
|
56
56
|
arkitekt_next/cli/commands/gen/main.py,sha256=_BdkcsXoWY5_3gmboq2e0pGYM6lAnwqQgBAyxmvdf6U,947
|
|
57
57
|
arkitekt_next/cli/commands/gen/watch.py,sha256=nf4QckdTJOWxvKoeNRwvC4rXQ4xhIx8LCDDJzpPhcY8,1189
|
|
58
58
|
arkitekt_next/cli/commands/init/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -132,8 +132,8 @@ arkitekt_next/qt/utils.py,sha256=MgBPtPmCSBkIuATov3UgREESwxAHh77lWNNxyE7Qs48,773
|
|
|
132
132
|
arkitekt_next/service_registry.py,sha256=oga1_fy7clwtcQO7XcSzWlyu2d5dna9H79uKLv8fKI0,6119
|
|
133
133
|
arkitekt_next/tqdm.py,sha256=lQcJI5Q6Py7Gy88hOCiJujjPEEGd8G2k1mOVJJ6oYe8,1531
|
|
134
134
|
arkitekt_next/utils.py,sha256=QETdzn_GIMSw6LdaXL89bqvqp9MGwEBK8Lj54MpnMwc,2396
|
|
135
|
-
arkitekt_next-0.8.
|
|
136
|
-
arkitekt_next-0.8.
|
|
137
|
-
arkitekt_next-0.8.
|
|
138
|
-
arkitekt_next-0.8.
|
|
139
|
-
arkitekt_next-0.8.
|
|
135
|
+
arkitekt_next-0.8.43.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
|
|
136
|
+
arkitekt_next-0.8.43.dist-info/METADATA,sha256=nDN6-T9qyNtDmLwTtTCBM1dMl6HUE3xGpYIrnp1xUAg,6210
|
|
137
|
+
arkitekt_next-0.8.43.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
138
|
+
arkitekt_next-0.8.43.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
|
|
139
|
+
arkitekt_next-0.8.43.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|