Skip to content

Commit f243719

Browse files
Changes in docs for release: v0.12.1
1 parent c212bd8 commit f243719

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

docs/cluster/cluster.html

+6-2
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ <h1 class="title">Module <code>codeflare_sdk.cluster.cluster</code></h1>
103103
&#34;&#34;&#34;
104104
self.config = config
105105
self.app_wrapper_yaml = self.create_app_wrapper()
106-
self.app_wrapper_name = self.app_wrapper_yaml.split(&#34;.&#34;)[0]
107106
self._job_submission_client = None
107+
self.app_wrapper_name = self.app_wrapper_yaml.replace(&#34;.yaml&#34;, &#34;&#34;).split(&#34;/&#34;)[
108+
-1
109+
]
108110

109111
@property
110112
def _client_headers(self):
@@ -1051,8 +1053,10 @@ <h2 class="section-title" id="header-classes">Classes</h2>
10511053
&#34;&#34;&#34;
10521054
self.config = config
10531055
self.app_wrapper_yaml = self.create_app_wrapper()
1054-
self.app_wrapper_name = self.app_wrapper_yaml.split(&#34;.&#34;)[0]
10551056
self._job_submission_client = None
1057+
self.app_wrapper_name = self.app_wrapper_yaml.replace(&#34;.yaml&#34;, &#34;&#34;).split(&#34;/&#34;)[
1058+
-1
1059+
]
10561060

10571061
@property
10581062
def _client_headers(self):

docs/utils/generate_yaml.html

+17-2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ <h1 class="title">Module <code>codeflare_sdk.utils.generate_yaml</code></h1>
5050

5151
import yaml
5252
import sys
53+
import os
5354
import argparse
5455
import uuid
5556
from kubernetes import client, config
@@ -537,8 +538,14 @@ <h1 class="title">Module <code>codeflare_sdk.utils.generate_yaml</code></h1>
537538

538539

539540
def write_user_appwrapper(user_yaml, output_file_name):
541+
# Create the directory if it doesn&#39;t exist
542+
directory_path = os.path.dirname(output_file_name)
543+
if not os.path.exists(directory_path):
544+
os.makedirs(directory_path)
545+
540546
with open(output_file_name, &#34;w&#34;) as outfile:
541547
yaml.dump(user_yaml, outfile, default_flow_style=False)
548+
542549
print(f&#34;Written to: {output_file_name}&#34;)
543550

544551

@@ -706,7 +713,8 @@ <h1 class="title">Module <code>codeflare_sdk.utils.generate_yaml</code></h1>
706713
if openshift_oauth:
707714
enable_openshift_oauth(user_yaml, cluster_name, namespace)
708715

709-
outfile = appwrapper_name + &#34;.yaml&#34;
716+
directory_path = os.path.expanduser(&#34;~/.codeflare/appwrapper/&#34;)
717+
outfile = os.path.join(directory_path, appwrapper_name + &#34;.yaml&#34;)
710718
if not mcad:
711719
write_components(user_yaml, outfile)
712720
else:
@@ -1019,7 +1027,8 @@ <h2 class="section-title" id="header-functions">Functions</h2>
10191027
if openshift_oauth:
10201028
enable_openshift_oauth(user_yaml, cluster_name, namespace)
10211029

1022-
outfile = appwrapper_name + &#34;.yaml&#34;
1030+
directory_path = os.path.expanduser(&#34;~/.codeflare/appwrapper/&#34;)
1031+
outfile = os.path.join(directory_path, appwrapper_name + &#34;.yaml&#34;)
10231032
if not mcad:
10241033
write_components(user_yaml, outfile)
10251034
else:
@@ -1541,8 +1550,14 @@ <h2 class="section-title" id="header-functions">Functions</h2>
15411550
<span>Expand source code</span>
15421551
</summary>
15431552
<pre><code class="python">def write_user_appwrapper(user_yaml, output_file_name):
1553+
# Create the directory if it doesn&#39;t exist
1554+
directory_path = os.path.dirname(output_file_name)
1555+
if not os.path.exists(directory_path):
1556+
os.makedirs(directory_path)
1557+
15441558
with open(output_file_name, &#34;w&#34;) as outfile:
15451559
yaml.dump(user_yaml, outfile, default_flow_style=False)
1560+
15461561
print(f&#34;Written to: {output_file_name}&#34;)</code></pre>
15471562
</details>
15481563
</dd>

0 commit comments

Comments
 (0)