Skip to content

Commit

Permalink
Merge pull request #7 from Geode-solutions/fix/relative_import_bug
Browse files Browse the repository at this point in the history
fix(relative import): bug in prod
  • Loading branch information
JulienChampagnol authored Jun 24, 2024
2 parents f179adb + 5390d02 commit 2fdf4a5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.10"
- name: Test
run: |
pip install -r requirements.txt
pip install .
pip install pytest
pytest
build:
Expand Down
Empty file removed __init__.py
Empty file.
1 change: 0 additions & 1 deletion src/geodeapp_back/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
from .config import *
20 changes: 8 additions & 12 deletions src/geodeapp_back/app.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
""" Packages """

# Global packages
import os
import dotenv
import time

# Third parties
import flask
import flask_cors
import time


from opengeodeweb_back import geode_functions
from opengeodeweb_back.routes import blueprint_routes

from werkzeug.exceptions import HTTPException

from werkzeug.exceptions import HTTPException

from .config import *
from opengeodeweb_back.geode_functions import handle_exception
# Local libraries
from geodeapp_back import config


if os.path.isfile("./.env"):
Expand Down Expand Up @@ -61,9 +57,9 @@ def kill_task():


if FLASK_DEBUG == False:
app.config.from_object(ProdConfig)
app.config.from_object(config.ProdConfig)
else:
app.config.from_object(DevConfig)
app.config.from_object(config.DevConfig)

ID = app.config.get("ID")
PORT = int(app.config.get("PORT"))
Expand All @@ -88,7 +84,7 @@ def kill_task():

@app.errorhandler(HTTPException)
def errorhandler(e):
return handle_exception(e)
return geode_functions.handle_exception(e)

@app.route("/", methods=["POST"])
def root():
Expand Down

0 comments on commit 2fdf4a5

Please sign in to comment.