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

Change deprecated functionlogger to null_logger #106

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_compute_avg.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
import numpy as np
import numpy.ma as ma
import xtgeo
from xtgeo.common import XTGeoDialog
from xtgeo.common import XTGeoDialog, null_logger
from xtgeo.surface import RegularSurface
from xtgeoviz import quickplot

from ._export_via_fmudataio import export_avg_map_dataio

xtg = XTGeoDialog()
logger = xtg.functionlogger(__name__)
logger = null_logger(__name__)


def get_avg(config, specd, propd, dates, zonation, zoned, filterarray):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_compute_hcpfz.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import numpy.ma as ma
from xtgeo.common import XTGeoDialog
from xtgeo.common import XTGeoDialog, null_logger

xtg = XTGeoDialog()

logger = xtg.functionlogger(__name__)
logger = null_logger(__name__)


def get_hcpfz(config, initd, restartd, dates, hcmode, filterarray):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_configparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import sys

import yaml
from xtgeo.common import XTGeoDialog
from xtgeo.common import XTGeoDialog, null_logger

from grid3d_maps.avghc._loader import ConstructorError, YamlXLoader

xtg = XTGeoDialog()

logger = xtg.functionlogger(__name__)
logger = null_logger(__name__)


def parse_args(args, appname, appdescr):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_export_via_fmudataio.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

import fmu.dataio as dataio
from fmu.config import utilities as ut
from xtgeo.common import XTGeoDialog
from xtgeo.common import XTGeoDialog, null_logger

xtg = XTGeoDialog()

logger = xtg.functionlogger(__name__)
logger = null_logger(__name__)


def _get_global_config(thisconfig):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_get_grid_props.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import xtgeo

# from xtgeo.common.exceptions import KeywordNotFoundError
from xtgeo.common import XTGeoDialog
from xtgeo.common import XTGeoDialog, null_logger
from xtgeo.common.exceptions import DateNotFoundError, KeywordFoundNoDateError

xtg = XTGeoDialog()

logger = xtg.functionlogger(__name__)
logger = null_logger(__name__)

# Heavy need for reprogramming...:
# pylint: disable=logging-format-interpolation
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_get_zonation_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import numpy as np
import xtgeo
from xtgeo.common import XTGeoDialog
from xtgeo.common import XTGeoDialog, null_logger

xtg = XTGeoDialog()

logger = xtg.functionlogger(__name__)
logger = null_logger(__name__)


def zonation(config, grd):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_hc_plotmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

import numpy as np
import xtgeo
from xtgeo.common import XTGeoDialog
from xtgeo.common import XTGeoDialog, null_logger
from xtgeo.surface import RegularSurface
from xtgeoviz import quickplot

from ._export_via_fmudataio import export_hc_map_dataio

xtg = XTGeoDialog()

logger = xtg.functionlogger(__name__)
logger = null_logger(__name__)


def do_hc_mapping(config, initd, hcpfzd, zonation, zoned, hcmode):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
from collections import OrderedDict

import yaml
from xtgeo.common import XTGeoDialog
from xtgeo.common import XTGeoDialog, null_logger
from yaml.constructor import ConstructorError
from yaml.nodes import MappingNode

file_types = (io.IOBase,)

xtg = XTGeoDialog()
logger = xtg.functionlogger(__name__)
logger = null_logger(__name__)


class YamlXLoader(yaml.Loader):
Expand Down
3 changes: 2 additions & 1 deletion src/grid3d_maps/avghc/_mapsettings.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import copy

import xtgeo
from xtgeo.common import null_logger

xtg = xtgeo.common.XTGeoDialog()

logger = xtg.functionlogger(__name__)
logger = null_logger(__name__)


def check_mapsettings(config, grd):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/contact/_compute_contact.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import numpy as np
import xtgeo
from xtgeo.common import XTGeoDialog
from xtgeo.common import XTGeoDialog, null_logger
from xtgeo.surface import RegularSurface

xtg = XTGeoDialog()
logger = xtg.functionlogger(__name__)
logger = null_logger(__name__)


def gridmap_contact(config, specd, propd, dates):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/contact/_get_grid_props.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
import xtgeo

# from xtgeo.common.exceptions import KeywordNotFoundError
from xtgeo.common import XTGeoDialog
from xtgeo.common import XTGeoDialog, null_logger
from xtgeo.common.exceptions import DateNotFoundError, KeywordFoundNoDateError

xtg = XTGeoDialog()

logger = xtg.functionlogger(__name__)
logger = null_logger(__name__)


def files_to_import(config, appname):
Expand Down