Skip to content

Commit

Permalink
configure loggers across all files explicitly (#50)
Browse files Browse the repository at this point in the history
* consolidate quality checks for stop id

* proper quotes

* setup logger and disable local tracing
  • Loading branch information
hamima-halim authored Jan 11, 2024
1 parent e7823d8 commit dd8fbe8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
8 changes: 6 additions & 2 deletions src/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
import pathlib
from util import output_dir_path
from ddtrace import tracer
import logging

logger = logging.getLogger(__name__)
from config import CONFIG
from logger import set_up_logging


logger = set_up_logging(__name__)
tracer.enabled = CONFIG["DATADOG_TRACE_ENABLED"]

CSV_FILENAME = "events.csv"
CSV_FIELDS = [
Expand Down
9 changes: 6 additions & 3 deletions src/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
from datetime import date, datetime
from typing import Tuple
import pandas as pd
import logging
from ddtrace import tracer
import warnings

from config import CONFIG
from constants import BUS_STOPS, ROUTES_CR, ROUTES_RAPID
import gtfs
import disk
import gtfs
from logger import set_up_logging
import util

logger = logging.getLogger(__name__)
logger = set_up_logging(__name__)
tracer.enabled = CONFIG["DATADOG_TRACE_ENABLED"]


EVENT_TYPE_MAP = {
# use the first instance of this signal as departure
Expand Down
9 changes: 7 additions & 2 deletions src/gtfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@
from urllib.parse import urljoin
from ddtrace import tracer
from typing import List, Tuple
import logging

logger = logging.getLogger(__name__)
from config import CONFIG
from logger import set_up_logging


logger = set_up_logging(__name__)
tracer.enabled = CONFIG["DATADOG_TRACE_ENABLED"]


MAIN_DIR = pathlib.Path("./data/gtfs_archives/")
MAIN_DIR.mkdir(parents=True, exist_ok=True)
Expand Down

0 comments on commit dd8fbe8

Please sign in to comment.