Skip to content

Commit

Permalink
dont use ruamel directyl
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlehoff committed Feb 16, 2024
1 parent d5153dc commit 02546f0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions validphys2/src/validphys/commondataparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@

import numpy as np
import pandas as pd
from ruamel import yaml
from validobj import ValidationError, parse_input
from validobj.custom import Parser

# We cannot use ruamel directly due to the ambiguity ruamel.yaml / ruamel_yaml
# of some versions which are pinned in some of the conda packages we use...
from reportengine.compat import yaml
from validphys.coredata import KIN_NAMES, CommonData
from validphys.datafiles import new_to_legacy_map, path_commondata
from validphys.plotoptions.plottingoptions import PlottingOptions, labeler_functions
Expand All @@ -57,9 +59,10 @@
# If libyaml is available, use the C loader to speed up some of the read
# https://pyyaml.org/wiki/LibYAML
# libyaml is avaialble for most linux distributionso
from ruamel.yaml import CLoader as Loader
except ImportError:
from ruamel.yaml import Loader
Loader = yaml.CLoader
except AttributeError:
# fallback to the slow loader
Loader = yaml.Loader


def _quick_yaml_load(filepath):
Expand Down

0 comments on commit 02546f0

Please sign in to comment.