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

[feat] Enable YAML configuration files #3370

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

vkarak
Copy link
Contributor

@vkarak vkarak commented Jan 29, 2025

This PR introduces YAML configuration files and deprecates raw JSON configuration files.

Check the updated docs for more details:

  • docs/config_reference.rst
  • docs/manpage.rst

Closes #3322.

Todos

  • Issue deprecation warning when a JSON configuration file is loaded.

@vkarak vkarak added this to the ReFrame 4.8 milestone Jan 29, 2025
@vkarak vkarak requested review from ekouts, victorusu and teojgo January 29, 2025 18:15
@vkarak vkarak self-assigned this Jan 29, 2025
@vkarak vkarak force-pushed the feat/yaml-config branch 3 times, most recently from c154779 to 72fe599 Compare January 29, 2025 19:12
=====================

One advantage of ReFrame's configuration is that it is programmable, especially if you are using the Python files.
Since the configuration is loaded a Python module, you can generate parts of the configuration dynamically.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Since the configuration is loaded a Python module, you can generate parts of the configuration dynamically.
Since the configuration is loaded as a Python module, you can generate parts of the configuration dynamically.

Since the configuration is loaded a Python module, you can generate parts of the configuration dynamically.

The YAML configuration on the other hand is more static, although not fully.
Code generation can still be used with the YAML configuration as it is treated as Jinja2 template, where ReFrame provides the following bindings:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Code generation can still be used with the YAML configuration as it is treated as Jinja2 template, where ReFrame provides the following bindings:
Code generation can still be used with the YAML configuration as it is treated as a Jinja2 template, where ReFrame provides the following bindings:

- ``sh(<command>)``: Retrieve the standard output of a shell command.
The command must be successful.

These are two examples YAML logging configuration that uses one of those bindings:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
These are two examples YAML logging configuration that uses one of those bindings:
These are two examples of YAML logging configuration that uses one of those bindings:


Apart from Python, ReFrame's configuration can be specified in a YAML file.
The advantage is a more compact configuration, but it's not fully programmable as is the Python configuration.
Below is the same configuration file presetend above, but in YAML:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Below is the same configuration file presetend above, but in YAML:
Below is the same configuration file presented above, but in YAML:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Support for YAML configs
2 participants