Skip to content

Commit

Permalink
Fixed yaml.load warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SeBecker committed Mar 9, 2020
1 parent ff37533 commit e669c78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 3 additions & 4 deletions grmpy/read/read.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""The module contains the main function of the init file import process."""
import yaml

from grmpy.read.read_auxiliary import create_attr_dict_sim
from grmpy.read.read_auxiliary import create_attr_dict_est
from grmpy.check.check import check_presence_init
from grmpy.read.read_auxiliary import create_attr_dict_est, create_attr_dict_sim


def read(file, semipar=False, include_constant=False):
Expand All @@ -15,7 +14,7 @@ def read(file, semipar=False, include_constant=False):

# Load the initialization file
with open(file) as y:
init_dict = yaml.load(y)
init_dict = yaml.load(y, Loader=yaml.FullLoader)

# Process the initialization file
attr_dict = create_attr_dict_est(init_dict, semipar, include_constant)
Expand All @@ -32,7 +31,7 @@ def read_simulation(file):

# Load the initialization file
with open(file) as y:
init_dict = yaml.load(y)
init_dict = yaml.load(y, Loader=yaml.FullLoader)

# Process the initialization file
attr_dict = create_attr_dict_sim(init_dict)
Expand Down
2 changes: 2 additions & 0 deletions grmpy/test/test_unit.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""The module provides unit tests for different aspects of the simulation process."""
import numpy as np
import pandas as pd
import pytest

from grmpy.check.auxiliary import read_data
from grmpy.estimate.estimate import fit
Expand Down Expand Up @@ -354,6 +355,7 @@ def test12():
np.testing.assert_equal(columns, real_column_values)


@pytest.mark.filterwarnings("ignore::RuntimeWarning")
def test13():
"""This test checks if functions that affect the estimation output adjustment work as
intended.
Expand Down

0 comments on commit e669c78

Please sign in to comment.