Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeAeich committed Jul 10, 2024
2 parents aeb0e44 + e790298 commit 13691f4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/code_quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
with:
os: ${{ job.os }}
python-version: '3.11'
poetry-install-options: "--only=types --no-root"
poetry-export-options: "--only=types"
poetry-install-options: "--with=types --no-root"
poetry-export-options: "--with=types"

- name: Check types
run: poetry run mypy tesk/
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ requires = ["poetry-core"]
skips = [
"B321", # FTP-related functions are being called.
"B402", # A FTP-related module is being imported.
"B108" # Insecure usage of temp file/directory, false positive.
]

[tool.poetry]
Expand Down
12 changes: 9 additions & 3 deletions tesk/app.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""API server entry point."""

import logging
import os
from pathlib import Path

from connexion import FlaskApp
from foca import Foca

from tesk.utils import get_config_path

logger = logging.getLogger(__name__)


Expand All @@ -24,7 +24,13 @@ def init_app() -> FlaskApp:
Raises:
FileNotFoundError: If the configuration file is not found.
"""
config_path = get_config_path()
# Determine the configuration path
if config_path_env := os.getenv("TESK_FOCA_CONFIG_PATH"):
config_path = Path(config_path_env).resolve()
else:
config_path = (
Path(__file__).parents[1] / "deployment" / "config.yaml"
).resolve()

# Check if the configuration file exists
if not config_path.exists():
Expand Down

0 comments on commit 13691f4

Please sign in to comment.