diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2020-09-10 13:26:06 +0530 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2020-09-10 13:26:06 +0530 |
commit | 85555704cee850f2145ad5b2bc3afe66bfbd5e82 (patch) | |
tree | 6043c8841562de5f32204712f2549b62ac0eb969 | |
parent | 84f602230b2ff6a3b9acabdf3c94be5810f64961 (diff) |
added CI badge and added sentry tracking
-rw-r--r-- | .github/workflows/test-backend.yaml | 2 | ||||
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | app/__init__.py | 11 | ||||
-rw-r--r-- | app/views.py | 3 | ||||
-rw-r--r-- | requirements.txt | 1 |
5 files changed, 17 insertions, 6 deletions
diff --git a/.github/workflows/test-backend.yaml b/.github/workflows/test-backend.yaml index d2b80c6..f3b8fc7 100644 --- a/.github/workflows/test-backend.yaml +++ b/.github/workflows/test-backend.yaml @@ -27,4 +27,4 @@ jobs: - name: Run Backend Test run: cd tests && python backendTest.py - name: Remove sample data - run: cd tests && pyton removeSample.py + run: cd tests && python removeSample.py @@ -1,15 +1,11 @@ # Curie-Web -![Backend Tessts](https://github.com/navanchauhan/Curie-Web/workflows/Test%20Backend/badge.svg) -![Database Tests](https://github.com/navanchauhan/Curie-Web/workflows/Test%20Database/badge.svg) -[![DeepSource](https://static.deepsource.io/deepsource-badge-dark-mini.svg)](https://deepsource.io/gh/navanchauhan/Curie-Web/?ref=repository-badge) +![Database and Backend](https://github.com/navanchauhan/Curie-Web/workflows/Test%20Database%20and%20Backend/badge.svg) Tested on: * macOS 10.15 (Catalina) * Ubuntu 20.04 - Raspberry Pi 4 -**Do Not Forget To Change DB Host configuration!** - ## 1. Installing Dependencies ### 1.1 Docker diff --git a/app/__init__.py b/app/__init__.py index dd2f7ff..7f09da5 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -1,5 +1,16 @@ from flask import Flask +import sentry_sdk +from sentry_sdk.integrations.flask import FlaskIntegration + +""" +sentry_sdk.init( + dsn="https://7bc9916920c041479b69db97bdb279fa@o126149.ingest.sentry.io/5424142", + integrations=[FlaskIntegration()], + traces_sample_rate=1.0 +) +""" + import configparser config = configparser.ConfigParser() config.read('config.ini') diff --git a/app/views.py b/app/views.py index 1cbc3ec..ef3c2ba 100644 --- a/app/views.py +++ b/app/views.py @@ -387,6 +387,9 @@ def send_text_file(file_name): file_dot_text = file_name + '.txt' return app.send_static_file(file_dot_text) +@app.route('/debug-sentry') +def trigger_error(): + division_by_zero = 1 / 0 @app.after_request def add_header(response): diff --git a/requirements.txt b/requirements.txt index fc71d29..8a89797 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,3 +25,4 @@ wget lifelines scikit-plot pymed +sentry-sdk[flask]
\ No newline at end of file |