Skip to content

Commit

Permalink
API change in Ruamel >=0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
DrYak authored and Beerenwinkel TechnicalIdentity committed Dec 26, 2023
1 parent e8897d4 commit 9a3e502
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion workflow/envs/timeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ dependencies:
- python
- numpy
- pandas
- ruamel.yaml
- ruamel.yaml>=0.15
- regex
10 changes: 4 additions & 6 deletions workflow/scripts/file_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,8 @@ def main():
datefmt = None
if args.config_file:
with open(args.config_file, "r") as stream:
try:
reg_data = ruamel.yaml.load(stream, Loader=ruamel.yaml.Loader)
except yaml.YAMLError as exc:
print(exc)
sys.exit(1)
yaml = ruamel.yaml.YAML(typ='rt')
reg_data = yaml.load(stream)
if "sample" in reg_data:
rxsam = regex.compile(reg_data.get("sample"))
if "batch" in reg_data:
Expand Down Expand Up @@ -266,7 +263,8 @@ def main():

if args.out_loc:
with open(args.out_loc, "w") as outf:
ruamel.yaml.round_trip_dump(
yaml = ruamel.yaml.YAML()
yaml.dump(
{
"locations_list": list(
set(
Expand Down

0 comments on commit 9a3e502

Please sign in to comment.