Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dscc-admin-ch committed Jun 5, 2024
1 parent bb64ed5 commit 5319d3c
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
16 changes: 8 additions & 8 deletions html/_modules/lomas_server/private_dataset/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ <h1>Source code for lomas_server.private_dataset.utils</h1><div class="highlight
<span class="n">s3_parameters</span><span class="p">[</span><span class="s2">&quot;s3_endpoint&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">admin_database</span><span class="o">.</span><span class="n">get_dataset_field</span><span class="p">(</span>
<span class="n">dataset_name</span><span class="p">,</span> <span class="s2">&quot;endpoint_url&quot;</span>
<span class="p">)</span>
<span class="n">s3_parameters</span><span class="p">[</span>
<span class="s2">&quot;s3_aws_access_key_id&quot;</span>
<span class="p">]</span> <span class="o">=</span> <span class="n">admin_database</span><span class="o">.</span><span class="n">get_dataset_field</span><span class="p">(</span>
<span class="n">dataset_name</span><span class="p">,</span> <span class="s2">&quot;aws_access_key_id&quot;</span>
<span class="n">s3_parameters</span><span class="p">[</span><span class="s2">&quot;s3_aws_access_key_id&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
<span class="n">admin_database</span><span class="o">.</span><span class="n">get_dataset_field</span><span class="p">(</span>
<span class="n">dataset_name</span><span class="p">,</span> <span class="s2">&quot;aws_access_key_id&quot;</span>
<span class="p">)</span>
<span class="p">)</span>
<span class="n">s3_parameters</span><span class="p">[</span>
<span class="s2">&quot;aws_secret_access_key&quot;</span>
<span class="p">]</span> <span class="o">=</span> <span class="n">admin_database</span><span class="o">.</span><span class="n">get_dataset_field</span><span class="p">(</span>
<span class="n">dataset_name</span><span class="p">,</span> <span class="s2">&quot;aws_secret_access_key&quot;</span>
<span class="n">s3_parameters</span><span class="p">[</span><span class="s2">&quot;aws_secret_access_key&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
<span class="n">admin_database</span><span class="o">.</span><span class="n">get_dataset_field</span><span class="p">(</span>
<span class="n">dataset_name</span><span class="p">,</span> <span class="s2">&quot;aws_secret_access_key&quot;</span>
<span class="p">)</span>
<span class="p">)</span>
<span class="n">private_db</span> <span class="o">=</span> <span class="n">S3Dataset</span><span class="p">(</span><span class="n">ds_metadata</span><span class="p">,</span> <span class="n">s3_parameters</span><span class="p">)</span>
<span class="k">case</span><span class="w"> </span><span class="k">_</span><span class="p">:</span>
Expand Down
6 changes: 3 additions & 3 deletions html/_modules/lomas_server/tests/test_api.html
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ <h1>Source code for lomas_server.tests.test_api</h1><div class="highlight"><pre>

<span class="c1"># Expect to fail: query does not make sense</span>
<span class="n">input_smartnoise</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="n">example_smartnoise_sql</span><span class="p">)</span>
<span class="n">input_smartnoise</span><span class="p">[</span>
<span class="s2">&quot;query_str&quot;</span>
<span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;SELECT AVG(bill) FROM df&quot;</span> <span class="c1"># no &#39;bill&#39; column</span>
<span class="n">input_smartnoise</span><span class="p">[</span><span class="s2">&quot;query_str&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
<span class="s2">&quot;SELECT AVG(bill) FROM df&quot;</span> <span class="c1"># no &#39;bill&#39; column</span>
<span class="p">)</span>
<span class="n">response</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">post</span><span class="p">(</span>
<span class="s2">&quot;/smartnoise_query&quot;</span><span class="p">,</span>
<span class="n">json</span><span class="o">=</span><span class="n">input_smartnoise</span><span class="p">,</span>
Expand Down
6 changes: 3 additions & 3 deletions html/_modules/lomas_server/utils/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ <h1>Source code for lomas_server.utils.utils</h1><div class="highlight"><pre>
<span class="n">response</span> <span class="o">=</span> <span class="n">StreamingResponse</span><span class="p">(</span>
<span class="nb">iter</span><span class="p">([</span><span class="n">stream</span><span class="o">.</span><span class="n">getvalue</span><span class="p">()]),</span> <span class="n">media_type</span><span class="o">=</span><span class="s2">&quot;text/csv&quot;</span>
<span class="p">)</span>
<span class="n">response</span><span class="o">.</span><span class="n">headers</span><span class="p">[</span>
<span class="s2">&quot;Content-Disposition&quot;</span>
<span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;attachment; filename=synthetic_data.csv&quot;</span>
<span class="n">response</span><span class="o">.</span><span class="n">headers</span><span class="p">[</span><span class="s2">&quot;Content-Disposition&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
<span class="s2">&quot;attachment; filename=synthetic_data.csv&quot;</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">response</span></div>


Expand Down
8 changes: 4 additions & 4 deletions html/notebooks/demo_kubernetes_admin_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "29cbe847",
"id": "855b8429",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -53,7 +53,7 @@
},
{
"cell_type": "markdown",
"id": "75de91e3",
"id": "5b6a95a0",
"metadata": {},
"source": [
"#### Since the service has been deployed in the demo 1, the URL should be accessible."
Expand Down Expand Up @@ -392,7 +392,7 @@
},
{
"cell_type": "markdown",
"id": "779913d2",
"id": "6fe87b7c",
"metadata": {},
"source": [
"### Archives of queries"
Expand All @@ -401,7 +401,7 @@
{
"cell_type": "code",
"execution_count": 11,
"id": "855935a1",
"id": "9327cb42",
"metadata": {},
"outputs": [
{
Expand Down
10 changes: 5 additions & 5 deletions html/notebooks/demo_kubernetes_deployment_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "e63d9531",
"id": "fa5558c2",
"metadata": {},
"outputs": [
{
Expand All @@ -47,7 +47,7 @@
},
{
"cell_type": "markdown",
"id": "f8579bb9",
"id": "365a9b39",
"metadata": {},
"source": [
"### Server"
Expand Down Expand Up @@ -254,7 +254,7 @@
},
{
"cell_type": "markdown",
"id": "adc82a88",
"id": "999dcabf",
"metadata": {},
"source": [
"#### Update `values.yaml` file\n",
Expand Down Expand Up @@ -291,7 +291,7 @@
},
{
"cell_type": "markdown",
"id": "e0e74c83",
"id": "ee7e8601",
"metadata": {},
"source": [
"#### Access the client environment through the url and use the password defined in the values file."
Expand All @@ -308,7 +308,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "f3197413",
"id": "83e48147",
"metadata": {},
"outputs": [],
"source": [
Expand Down
4 changes: 2 additions & 2 deletions html/notebooks/kubernetes_deployment_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
},
{
"cell_type": "markdown",
"id": "ed606014",
"id": "45e01cbc",
"metadata": {},
"source": [
"Again, one needs to update the `values.yaml` file with the desired values. The important fields are `ingress.hosts[0].host` and `ingress.tls.hosts[0]` for the url, `password` for the user session and `image.repository` for specifying the previously built image. Make sure to change the `nameOverride`, `fullnameOverride` and url when deploying multiple client images.\n",
Expand All @@ -221,7 +221,7 @@
},
{
"cell_type": "markdown",
"id": "c747bb5c",
"id": "1fe4e66b",
"metadata": {},
"source": [
"The user session should now be available at the specified url, just type the password and you are in!\n",
Expand Down

0 comments on commit 5319d3c

Please sign in to comment.