Commit 963b9815 authored by Pierre Carbonnelle's avatar Pierre Carbonnelle
Browse files

rename folder to idp_web_server

parent 0cd2eeb9
Pipeline #457478192 passed with stages
in 6 minutes and 23 seconds
......@@ -9,31 +9,31 @@ automatic_scaling:
handlers:
- url: /$
static_files: idp_server/static/index.html
static_files: idp_web_server/static/index.html
require_matching_file: false
upload: idp_server/static/index.html
upload: idp_web_server/static/index.html
secure: always
http_headers:
Strict-Transport-Security: max-age=31536000; includeSubDomains
- url: /IDE
static_files: idp_server/static/index.html
static_files: idp_web_server/static/index.html
require_matching_file: false
upload: idp_server/static/index.html
upload: idp_web_server/static/index.html
secure: always
http_headers:
Strict-Transport-Security: max-age=31536000; includeSubDomains
- url: /examples/(.*)
static_files: idp_server/examples/\1
static_files: idp_web_server/examples/\1
require_matching_file: false
upload: idp_server/examples/.*
upload: idp_web_server/examples/.*
- url: /assets//(.*) # to fix bug in client
static_files: idp_server/static/assets/\1
static_files: idp_web_server/static/assets/\1
require_matching_file: false
upload: idp_server/static/assets/.*
upload: idp_web_server/static/assets/.*
- url: /assets/(.*)
static_files: idp_server/static/assets/\1
static_files: idp_web_server/static/assets/\1
require_matching_file: false
upload: idp_server/static/assets/.*
upload: idp_web_server/static/assets/.*
- url: /meta
script: auto
secure: always
......@@ -51,9 +51,9 @@ handlers:
secure: always
redirect_http_response_code: '301'
- url: /(.*)
static_files: idp_server/static/\1
static_files: idp_web_server/static/\1
require_matching_file: false
upload: idp_server/static/.*
upload: idp_web_server/static/.*
secure: always
http_headers:
Strict-Transport-Security: max-age=31536000; includeSubDomains
......
......@@ -47,14 +47,14 @@ def query_user(query, default="y", get=False):
run('python3 test.py generate')
update_statics = query_user("Update the '/IDP-Z3/idp_server/static' folder? (Y/n) ")
update_statics = query_user("Update the '/IDP-Z3/idp_web_server/static' folder? (Y/n) ")
if update_statics:
require_clean_work_tree("idp_web_client")
# Generate static and commit.
run('npm run-script build', cwd='idp_web_client', check=True)
print("Copying to static folder ...")
copy_tree('idp_web_client/dist/', './idp_server/static')
copy_tree('idp_web_client/dist/', './idp_web_server/static')
# Check if web-IDP-Z3 is on latest version and clean.
# branch = get('git rev-parse --abbrev-ref HEAD', cwd="idp_web_client")
......
......@@ -16,7 +16,7 @@ The interactions with the server are controlled by [idp.service.ts](https://gitl
The [AppSettings file](https://gitlab.com/krr/IDP-Z3/blob/main/idp_web_client/src/services/AppSettings.ts) contains important settings, such as the address of the IDP-Z3 sample theories.
The web clients are sent to the browser by the IDP-Z3 server as static files.
The static files are generated by the `/IDP-Z3/deploy.py` script as part of the deployment, and saved in the `/IDP-Z3/idp_server/static` folder.
The static files are generated by the `/IDP-Z3/deploy.py` script as part of the deployment, and saved in the `/IDP-Z3/idp_web_server/static` folder.
See the Appendix of [Development and deployment guide](https://gitlab.com/krr/IDP-Z3/-/wikis/Development-and-deployment-guide) on the wiki for a discussion on how to set-up your environment to develop web clients.
......@@ -32,9 +32,9 @@ We use the following sphinx extensions: [Mermaid (diagrams)](https://pypi.org/pr
## IDP-Z3 server
The code for the IDP-Z3 server is in the `/idp_server` folder.
The code for the IDP-Z3 server is in the `/idp_web_server` folder.
The IDP-Z3 server is written in python 3.8, using the [Flask framework](https://flask.palletsprojects.com/en/1.1.x/).  Pages are served by `/idp_server/rest.py`.  Static files are served from the `/idp_server/static` directory, including the compiled version of the client software.
The IDP-Z3 server is written in python 3.8, using the [Flask framework](https://flask.palletsprojects.com/en/1.1.x/).  Pages are served by `/idp_web_server/rest.py`.  Static files are served from the `/idp_web_server/static` directory, including the compiled version of the client software.
At start-up, and every time the idp code is changed on the client, the idp code is sent to the `/meta` URL by the client.  The server responds with the list of symbols to be displayed. A subsequent call (`/eval`) returns the questions to be displayed. After that, when the user clicks on a GUI element, information is sent to the `/eval` URL, and the server responds as necessary. 
......
.. _server_inferences:
idp_server.Inferences
idp_web_server.Inferences
===============================
.. automodule:: idp_server.Inferences
.. automodule:: idp_web_server.Inferences
:members:
:noindex:
.. _server_io:
idp_server.IO
idp_web_server.IO
=======================
.. automodule:: idp_server.IO
.. automodule:: idp_web_server.IO
:members:
:noindex:
.. _server_rest:
idp_server.rest
idp_web_server.rest
=========================
.. automodule:: idp_server.rest
.. automodule:: idp_web_server.rest
:members:
:noindex:
.. _server_state:
idp_server.State
idp_web_server.State
==========================
.. automodule:: idp_server.State
.. automodule:: idp_web_server.State
:members:
:noindex:
......@@ -40,5 +40,5 @@ You may want to check the `Development and deployment guide <https://gitlab.com/
Architecture.md
idp_engine.rst
idp_server.rst
idp_web_server.rst
......@@ -13,7 +13,7 @@
import os
import sys
sys.path.insert(0, os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('../idp_server/'))
sys.path.insert(0, os.path.abspath('../idp_web_server/'))
sys.path.insert(0, os.path.abspath('../idp_engine/'))
# -- Project information -----------------------------------------------------
......
``idp_server`` module
``idp_web_server`` module
=====================
.. toctree::
......
......@@ -25,7 +25,7 @@ Steps to release an anonymized version of the code:
* replace copyright text in all source code (see below)
* remove unnecessary code in deploy.sh
* run ./deploy.sh without deployment to GAE, Heroku
* in IDP-Z3/idp_server/static/assets/
* in IDP-Z3/idp_web_server/static/assets/
* delete KU Leuven Logo.png
* delete Interactive_Consultant.mp4
* copy IDP-Z3 to anon
......
......@@ -45,7 +45,7 @@ X use 2 machines with different max_concurrent_requests: one for static, the oth
* `gsutil mb gs://interactive-consultant`
* `gsutil defacl set public-read gs://interactive-consultant`
- use [--deploy-url in ng guild](https://stackoverflow.com/questions/46613816/how-to-deploy-angular-4-front-end-to-cdn)
* sync bucket ? `gsutil -m rsync -r ./idp_server/static gs://interactive-consultant/`
* sync bucket ? `gsutil -m rsync -r ./idp_web_server/static gs://interactive-consultant/`
* [font CORS issue](https://stackoverflow.com/questions/33242062/google-cloud-storage-fonts-cors-issue)
* use http instead of https ? no fix
* cors-config.json ? OK `gsutil cors set cors-config.json gs://interactive-consultant\`
......
from idp_server.rest import app
from idp_web_server.rest import app
if __name__ == '__main__':
app.run(debug=True)
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment