Skip to content

Commit e6214e8

Browse files
committed
Preparing for deploy-samples.bat
1 parent ab75388 commit e6214e8

File tree

12 files changed

+33
-14
lines changed

12 files changed

+33
-14
lines changed

PyWebApi.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "PyWebApi.PyPI", "PyWebApi.P
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample", "Sample", "{F7AC17AC-4CBD-4DD8-94E5-21DC54244474}"
99
ProjectSection(SolutionItems) = preProject
10+
Sample\deploy-samples.bat = Sample\deploy-samples.bat
1011
Sample\publish-samples.bat = Sample\publish-samples.bat
1112
EndProjectSection
1213
EndProject

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,15 @@ Deploy User Modules/Scripts:
177177
Copy the user module and its dependent files to a planned path directory under `USER_SCRIPT_ROOT <user-script-root_>`_ in the server.
178178
This path (relative to `USER_SCRIPT_ROOT <user-script-root_>`_) determines what URL path the client should use to call the functions.
179179

180-
For example, if we copy the module mdx_task (``mdx_task.py`` and all dependent files) to the relative path ``utilities\mdxreader\`` (in Windows) or ``utilities/mdxreader/`` (in UNIX) under `USER_SCRIPT_ROOT <user-script-root_>`_,
181-
then the client should use ``http://ourteam.company.com/PyWebApi/pys/etl/utilities/mdxreader/mdx_task.run_query`` to invoke the ``run_query`` function of the ``mdx_task`` module.
180+
For example, if we copy the module mdx_task (``mdx_task.py`` and all dependent files) to the relative path ``samples\mdxreader\`` (in Windows) or ``samples/mdxreader/`` (in UNIX) under `USER_SCRIPT_ROOT <user-script-root_>`_,
181+
then the client should use ``http://ourteam.company.com/PyWebApi/pys/etl/samples/mdxreader/mdx_task.run_query`` to invoke the ``run_query`` function of the ``mdx_task`` module.
182182

183183
Breakdown:
184184

185185
- ``/PyWebApi`` -- the virtual/application directory (ApplicationPath) installed in IIS, and it's also the value of the appSettings item `SCRIPT_NAME <script-name_>`_ in ``web.config``;
186186
- ``/pys/`` -- the static segment in ``@route(path='/pys/<app_id>/<module_func:path>', ...)``;
187187
- ``etl`` -- matched by the ``<app_id>`` wildcard;
188-
- ``utilities/mdxreader/`` -- the relative path where the user module is located;
188+
- ``samples/mdxreader/`` -- the relative path where the user module is located;
189189
- ``mdx_task`` -- the user module (``mdx_task.py``);
190190
- ``run_query`` -- the module-level function to be invoked;
191191

@@ -222,7 +222,7 @@ Deploy User Modules/Scripts:
222222
223223
{
224224
"app_id": "etl",
225-
"action": "utilities/mdxreader/mdx_task.run_query",
225+
"action": "samples/mdxreader/mdx_task.run_query",
226226
"account": "user id/name or group account/role"
227227
}
228228
@@ -595,7 +595,7 @@ Sample User Apps/Modules/Scripts
595595

596596
Let's use an example to explain in detail.
597597

598-
1. An HTTP client sends a POST request to ``http://ourteam.company.com/PyWebApi/pys/etl/utilities/mdx_etl/db_mdx_db.start``
598+
1. An HTTP client sends a POST request to ``http://ourteam.company.com/PyWebApi/pys/etl/samples/mdx_etl/db_mdx_db.start``
599599
with a JSON payload:
600600

601601
.. code-block:: JSON

Sample/UserApps/MdxEtl/deploy.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@Echo off
22
CD /d "%~dp0"
33
IF "%~1"=="" (
4-
SET "DESTINATION=..\..\PyWebApi.IIS\user-script-root\utilities\mdx_etl"
4+
SET "DESTINATION=..\..\PyWebApi.IIS\user-script-root\samples\mdx_etl"
55
) ELSE (
66
SET "DESTINATION=%~1"
77
)

Sample/UserApps/MdxEtl/mdx_etl.swagger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,4 +166,4 @@ components:
166166

167167
servers:
168168
- description: (Please update the local-test base URL to your actual path)
169-
url: http://localhost/PyWebApi/pys/test_app/utilities/mdx_etl
169+
url: http://localhost/PyWebApi/pys/test_app/samples/mdx_etl

Sample/UserApps/MdxReader/deploy.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@Echo off
22
CD /d "%~dp0"
33
IF "%~1"=="" (
4-
SET "DESTINATION=..\..\PyWebApi.IIS\user-script-root\utilities\mdxreader"
4+
SET "DESTINATION=..\..\PyWebApi.IIS\user-script-root\samples\mdxreader"
55
) ELSE (
66
SET "DESTINATION=%~1"
77
)

Sample/UserApps/MdxReader/mdxreader.swagger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,4 @@ components:
146146

147147
servers:
148148
- description: (Please update the local-test base URL to your actual path)
149-
url: http://localhost/PyWebApi/pys/test_app/utilities/mdxreader
149+
url: http://localhost/PyWebApi/pys/test_app/samples/mdxreader

Sample/UserApps/PowerBIPusher/deploy.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@Echo off
22
CD /d "%~dp0"
33
IF "%~1"=="" (
4-
SET "DESTINATION=..\..\PyWebApi.IIS\user-script-root\utilities\powerbi_pusher"
4+
SET "DESTINATION=..\..\PyWebApi.IIS\user-script-root\samples\powerbi_pusher"
55
) ELSE (
66
SET "DESTINATION=%~1"
77
)

Sample/UserApps/PowerBIPusher/powerbi_pusher.swagger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,4 +276,4 @@ components:
276276

277277
servers:
278278
- description: (Please update the local-test base URL to your actual path)
279-
url: http://localhost/PyWebApi/pys/test_app/utilities/powerbi_pusher
279+
url: http://localhost/PyWebApi/pys/test_app/samples/powerbi_pusher

Sample/UserApps/ServicesGrouping/deploy.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@Echo off
22
CD /d "%~dp0"
33
IF "%~1"=="" (
4-
SET "DESTINATION=..\..\PyWebApi.IIS\user-script-root\utilities\services_grouping"
4+
SET "DESTINATION=..\..\PyWebApi.IIS\user-script-root\samples\services_grouping"
55
) ELSE (
66
SET "DESTINATION=%~1"
77
)

Sample/UserApps/ServicesGrouping/services_grouping.swagger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,4 @@ components:
128128

129129
servers:
130130
- description: (Please update the local-test base URL to your actual path)
131-
url: http://localhost/PyWebApi/pys/test_app/utilities/services_grouping
131+
url: http://localhost/PyWebApi/pys/test_app/samples/services_grouping

0 commit comments

Comments
 (0)