From df2ec57ca1b5a5f6efdbdbdc5ca5b7a2852977d2 Mon Sep 17 00:00:00 2001 From: Daniel Pimenta Date: Sun, 15 Oct 2023 23:17:56 +0100 Subject: [PATCH] Update requirements --- README.md | 6 +++--- requirements.txt | 12 ++++++------ src/app.py | 13 +------------ 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 9fdadc6..f8cc1f5 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ vagrant ssh 3. Clone the repo ```sh -git clone https://github.com/EOEPCA/um-identity-apigit +git clone https://github.com/EOEPCA/um-identity-api ``` 4. Change local directory @@ -108,7 +108,7 @@ cd um-identity-api 5.1 Run locally with Python ```sh - pip install -r requirements.local.txt + pip install -r requirements.txt python -m "flask" run --host=0.0.0.0 --port=5566 ``` 5.2 Run locally with Docker @@ -182,4 +182,4 @@ Project Link: [https://github.com/EOEPCA/um-identity-api](https://github.com/EOE [issues-url]: https://github.com/EOEPCA/um-identity-api/issues [license-shield]: https://img.shields.io/github/license/EOEPCA/um-identity-apisvg?style=flat-square [license-url]: https://github.com/EOEPCA/um-identity-api/blob/master/LICENSE -[build-shield]: https://www.travis-ci.com/EOEPCA/um-identity-apisvg?branch=master +[build-shield]: https://www.travis-ci.com/EOEPCA/um-identity-apisvg?branch=master \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index fb5a4fd..464652f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,15 +1,15 @@ Flask==3.0.0 WellKnownHandler==0.2.0 -requests==2.25.1 +requests==2.31.0 flask-swagger-ui==4.11.1 -python-keycloak==3.2.0 -mock==5.0.2 -pyyaml==5.3.1 +python-keycloak==3.3.0 +mock==5.1.0 +pyyaml==6.0.1 elasticsearch==8.8.0 lxml==4.9.3 -configparser==5.3.0 +configparser==6.0.0 waitress==2.1.2 python-dotenv==1.0.0 retry==0.9.2 -flask-healthz==0.0.3 +flask-healthz==1.0.0 identityutils @ git+https://github.com/eoepca/um-identity-service@master \ No newline at end of file diff --git a/src/app.py b/src/app.py index b96c9f2..5978c57 100644 --- a/src/app.py +++ b/src/app.py @@ -23,17 +23,7 @@ logger.Logger.get_instance().load_configuration(os.path.join(os.path.dirname(__file__), "../conf/logging.yaml")) logger = logging.getLogger("IDENTITY_API") -mode = os.environ.get('FLASK_ENV') -logger.info("Starting app in mode: " + str(mode)) -if mode == 'develop': - config_file = "config.develop.ini" -elif mode == 'demo': - config_file = "config.demo.ini" -elif mode == 'production': - config_file = "config.production.ini" -else: - config_file = "config.ini" -config_path = os.path.join(os.path.dirname(__file__), "../conf/", config_file) +config_path = os.path.join(os.path.dirname(__file__), "../conf/config.ini") app = Flask(__name__) app.secret_key = ''.join(choice(ascii_lowercase) for _ in range(30)) # Random key @@ -60,7 +50,6 @@ def register_endpoints(config, keycloak): def keycloak_client(config): - logger.info("config: " + str(config)) auth_server_url = config.get("Keycloak", "auth_server_url") realm = config.get("Keycloak", "realm") logger.info("Starting Keycloak client for: " + str(auth_server_url) + " realm: " + str(realm))