Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GEOPY-2020: run the Geoapps error context of geoapps utils for data preparation too. #113

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions geoapps_utils/driver/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

from __future__ import annotations

import logging
from abc import ABC, abstractmethod
from pathlib import Path
from warnings import warn

from geoh5py import Workspace
from geoh5py.objects import ObjectBase
Expand All @@ -23,6 +23,9 @@
from geoapps_utils.utils.importing import GeoAppsError


logger = logging.getLogger()


class BaseDriver(ABC):
"""
# todo: Get rid of BaseParams to have a more robust DriverClass
Expand Down Expand Up @@ -122,7 +125,7 @@ def start(cls, filepath: str | Path, driver_class=None, **kwargs):

return driver
except GeoAppsError as error:
warn(f"\n\nApplicationError: {error}\n\n")
logger.warning("\n\nApplicationError: %s\n\n", error)
return None

def add_ui_json(self, entity: ObjectBase):
Expand Down