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

Add yaml include support #3133

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Add yaml include support #3133

wants to merge 6 commits into from

Conversation

yhwen
Copy link
Collaborator

@yhwen yhwen commented Jan 7, 2025

Fixes # .

Description

Added the support for yaml to include another yaml configuration file.

YAML does not naturally support any kind of "import" or "include" statement to include another yaml file. Adding this to support the yaml config in the format like: (include could be single file, or a list of include files.)

....
include: 1.yml

or:
include: [1.yml, 2.yml]

The "include" can be used at any level. Also support recursively include.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Quick tests passed locally by running ./runtest.sh.
  • In-line docstrings updated.
  • Documentation updated.

Copy link
Collaborator

@chesterxgchen chesterxgchen left a comment

Choose a reason for hiding this comment

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

Should add description and unit tests to show how this supposed to be used ?

@yanchengnv
Copy link
Collaborator

Please explain why this feature is needed.

@yhwen
Copy link
Collaborator Author

yhwen commented Jan 17, 2025

Please explain why this feature is needed.

Added the description of how to use the "include". Also include the example in the unit_test.

api_version: 3
name: example_project

include: 1.yml

participants:

  • name: server
    port: 123
    include: [1.yml]
  • name: client
    port: 234
    include: 2.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants