cleanup in view of docker builds

This commit is contained in:
2024-07-26 13:13:36 +02:00
parent 2863c99d7c
commit 2736a89f70
11 changed files with 809 additions and 10127 deletions

View File

@@ -1,6 +1,6 @@
import logging.config
from pathlib import Path
import os
import logging
PARAMETERS_DIR = Path('src/parameters')
AMENITY_SELECTORS_PATH = PARAMETERS_DIR / 'amenity_selectors.yaml'
@@ -12,8 +12,15 @@ OPTIMIZER_PARAMETERS_PATH = PARAMETERS_DIR / 'optimizer_parameters.yaml'
cache_dir_string = os.getenv('OSM_CACHE_DIR', './cache')
OSM_CACHE_DIR = Path(cache_dir_string)
logger = logging.getLogger(__name__)
logging.basicConfig(
level = logging.INFO,
format = '%(asctime)s - %(name)s\t- %(levelname)s\t- %(message)s'
)
import logging
import yaml
LOGGING_CONFIG = Path('log_config.yaml')
config = yaml.safe_load(LOGGING_CONFIG.read_text())
logging.config.dictConfig(config)
# if we are in a debug session, set the log level to debug
if os.getenv('DEBUG', False):
logging.getLogger().setLevel(logging.DEBUG)