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 over from deprecated yaml roundtripdump. #360

Merged
merged 1 commit into from
Feb 20, 2025
Merged
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
12 changes: 4 additions & 8 deletions quartical/config/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import sys
import os
from loguru import logger
from ruamel.yaml import round_trip_dump
from ruamel.yaml import YAML
from omegaconf import OmegaConf as oc
from quartical.config.external import finalize_structure
from quartical.config.internal import additional_validation
Expand All @@ -26,13 +26,9 @@ def create_user_config():
config = oc.merge(config, *additional_config)

with open(config_file_path, 'w') as outfile:
round_trip_dump(
oc.to_container(config),
outfile,
default_flow_style=False,
width=60,
indent=2
)
yaml = YAML()

yaml.dump(oc.to_container(config), outfile)

logger.success(
f"{config_file_path} successfully generated. Go forth and calibrate!"
Expand Down
Loading