diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index cbbd6be..a01ff88 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -38,6 +38,10 @@ jobs: pip install -r cf/requirements.txt pip install -r cfintraday/requirements.txt + + pip install -r cfconfigbuilder/requirements.txt + pip install -r cfconfigbuilderps/requirements.txt + pip install -r cfintradaysqlview/requirements.txt pip install -r tests/requirements-test.txt - name: Lint with flake8 diff --git a/cfconfigbuilder/main.py b/cfconfigbuilder/main.py index afd2d23..7be44d0 100644 --- a/cfconfigbuilder/main.py +++ b/cfconfigbuilder/main.py @@ -4,7 +4,7 @@ import json import os import logging - +from flask import make_response, jsonify class FlattenerDatasetConfigStorage(object): def __init__(self): @@ -217,3 +217,7 @@ def build_ga_flattener_config(request): json_config = config.add_intraday_params_into_config(json_config) store.upload_config(config=json_config) # upload config file to GCS bucket logging.info(f"build_ga_flattener_config: {json.dumps(json_config)}") + + # Return a JSON response with a success message + response_data = {"message": "Configuration has been built and uploaded successfully."} + return make_response(jsonify(response_data), 200) diff --git a/cfconfigbuilder/requirements.txt b/cfconfigbuilder/requirements.txt index 53c0364..ec5392e 100644 --- a/cfconfigbuilder/requirements.txt +++ b/cfconfigbuilder/requirements.txt @@ -1,3 +1,4 @@ google-api-python-client~=2.106.0 google-cloud-storage~=2.13.0 -google-cloud-bigquery~=3.13.0 \ No newline at end of file +google-cloud-bigquery~=3.13.0 +flask~=3.0.0 \ No newline at end of file