Skip to content

Commit 2e2b8a4

Browse files
Proper use of logging (#171)
Removed calls to logging setLogger and setHandler Remove unused imports. Co-authored-by: Casper Welzel Andersen <casper.w.andersen@sintef.no>
1 parent 6f949e5 commit 2e2b8a4

5 files changed

Lines changed: 0 additions & 13 deletions

File tree

oteapi_optimade/dlite/parse.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""OTEAPI strategy for parsing OPTIMADE structure resources to DLite instances."""
22
import logging
3-
import sys
43
from pathlib import Path
54
from typing import TYPE_CHECKING
65

@@ -22,8 +21,6 @@
2221

2322

2423
LOGGER = logging.getLogger("oteapi_optimade.dlite")
25-
LOGGER.setLevel(logging.DEBUG)
26-
LOGGER.addHandler(logging.StreamHandler(sys.stdout))
2724

2825

2926
@dataclass

oteapi_optimade/models/custom_types.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ class OPTIMADEParts(TypedDict, total=False):
4141
_OPTIMADE_ENDPOINT_REGEX = None
4242

4343
LOGGER = logging.getLogger("oteapi_optimade.models")
44-
LOGGER.setLevel(logging.DEBUG)
4544

4645

4746
def optimade_base_url_regex() -> "Pattern[str]":

oteapi_optimade/strategies/filter.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Demo filter strategy."""
22
import logging
3-
import sys
43
from typing import TYPE_CHECKING
54

65
from oteapi.models import SessionUpdate
@@ -15,8 +14,6 @@
1514

1615

1716
LOGGER = logging.getLogger("oteapi_optimade.strategies")
18-
LOGGER.setLevel(logging.DEBUG)
19-
LOGGER.addHandler(logging.StreamHandler(sys.stdout))
2017

2118

2219
@dataclass

oteapi_optimade/strategies/parse.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Demo strategy class for text/json."""
22
import json
33
import logging
4-
import sys
54
from typing import TYPE_CHECKING
65

76
from optimade.models import ErrorResponse, Success
@@ -21,8 +20,6 @@
2120

2221

2322
LOGGER = logging.getLogger("oteapi_optimade.strategies")
24-
LOGGER.setLevel(logging.DEBUG)
25-
LOGGER.addHandler(logging.StreamHandler(sys.stdout))
2623

2724

2825
@dataclass

oteapi_optimade/strategies/resource.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""OPTIMADE resource strategy."""
22
import logging
3-
import sys
43
from typing import TYPE_CHECKING
54
from urllib.parse import parse_qs
65

@@ -40,8 +39,6 @@
4039

4140

4241
LOGGER = logging.getLogger("oteapi_optimade.strategies")
43-
LOGGER.setLevel(logging.DEBUG)
44-
LOGGER.addHandler(logging.StreamHandler(sys.stdout))
4542

4643

4744
def use_dlite(access_service: str, use_dlite_flag: bool) -> bool:

0 commit comments

Comments
 (0)