From 8fabfedbecdb2164068be3fdbcdca4be6a0eb639 Mon Sep 17 00:00:00 2001 From: Par Date: Mon, 31 Aug 2020 11:16:50 +0700 Subject: [PATCH 1/6] Bump MarkupSafe to v1.1.1 to address issue w/ setuptools Ref.Issue: https://github.com/pallets/markupsafe/issues/116 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index af2376e97..7a0111637 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,5 @@ click==6.7 Flask==1.0.2 itsdangerous==0.24 Jinja2>=2.10.1 -MarkupSafe==1.0 +MarkupSafe==1.1.1 Werkzeug==0.15.5 From 5868b2fa03595c9e3048fcea9c5fb8d9ca9ff6e0 Mon Sep 17 00:00:00 2001 From: Par Date: Mon, 31 Aug 2020 13:09:55 +0700 Subject: [PATCH 2/6] Add Running Instructions --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 319b556d1..181051a80 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,17 @@ When you submit a pull request, a CLA-bot automatically determines whether you n * This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). * For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or * Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + +## Running Instrcutions + +Execute the following commands: + +```shell +virtualenv env +source env/bin/activate +pip install -r requirements.txt +export FLASK_APP=startup.py +flask run +``` + +The server will serve at http://127.0.0.1:5000/ \ No newline at end of file From 38a798305c85fe5ce93cc9125aac8e1a1af209b2 Mon Sep 17 00:00:00 2001 From: Par Date: Mon, 31 Aug 2020 13:29:01 +0700 Subject: [PATCH 3/6] Add test instrcution --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 181051a80..ff8c1462a 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ When you submit a pull request, a CLA-bot automatically determines whether you n * For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or * Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. -## Running Instrcutions +## Running Instructions Execute the following commands: @@ -33,4 +33,13 @@ export FLASK_APP=startup.py flask run ``` -The server will serve at http://127.0.0.1:5000/ \ No newline at end of file +The server will serve at http://127.0.0.1:5000/ + +### Test + +Execute the following commands: + +```shell +pip install pytest +pytest test* --doctest-modules --junit-xml=junit/test-results.xml +``` \ No newline at end of file From e8b4aec94f0c44a28fe17fa7b4b1fccd56be9d7b Mon Sep 17 00:00:00 2001 From: Par Date: Mon, 31 Aug 2020 13:33:20 +0700 Subject: [PATCH 4/6] Ignore test XML report --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 45e7bbe6d..934d2adbb 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ coverage.xml *.cover .hypothesis/ .pytest_cache/ +*test*.xml # Translations *.mo From cd81daa93ea789c34fb084bbe1417fbc29de7205 Mon Sep 17 00:00:00 2001 From: Par Date: Mon, 31 Aug 2020 13:36:57 +0700 Subject: [PATCH 5/6] Remove doctest and update junit path --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ff8c1462a..c7c7ea5c4 100644 --- a/README.md +++ b/README.md @@ -41,5 +41,5 @@ Execute the following commands: ```shell pip install pytest -pytest test* --doctest-modules --junit-xml=junit/test-results.xml +pytest test* --junit-xml=test-results.xml ``` \ No newline at end of file From 404eb55c8b4c6de9c4c527afa09644ecfca7579d Mon Sep 17 00:00:00 2001 From: Par Date: Mon, 31 Aug 2020 14:19:38 +0700 Subject: [PATCH 6/6] Update running instructions to use gunicorn --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c7c7ea5c4..8cb31ee12 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,11 @@ Execute the following commands: virtualenv env source env/bin/activate pip install -r requirements.txt -export FLASK_APP=startup.py -flask run +pip install gunicorn +gunicorn --bind=0.0.0.0 --workers=4 startup:app ``` -The server will serve at http://127.0.0.1:5000/ +The server will serve at http://127.0.0.1:8000/ ### Test @@ -41,5 +41,5 @@ Execute the following commands: ```shell pip install pytest -pytest test* --junit-xml=test-results.xml +pytest test*.py --junit-xml=test-results.xml ``` \ No newline at end of file