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

Support custom !include directive in config files #834

Merged
merged 3 commits into from
Aug 28, 2020
Merged

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Aug 27, 2020

This change leverage a custom constructor in PyYAML to support a new !include directive for including YAML content from another file. The directive's argument is a relative URL path from the currently loading YAML file.

I found this approach to be substantially cleaner to implement than plumbing knowledge of the base_url through the index object and into the build file parsing logic to take the same approach as was taken to reference the build files from the index.

The main motivation is to reduce the size of the build file for the CI performance jobs by pushing the plot configuration into a separate (possibly common) file. I'd also like to take advantage of it in the Benchmark plugin configuration, where we'll need to specify a JSON schema.

This change leverage a custom constructor in PyYAML to support a new
`!include` directive for including YAML content from another file. The
directive's argument is a relative URL path from the currently loading
YAML file.
@dirk-thomas
Copy link
Member

Please update the docs to mention that these yaml files are loaded with a custom loader and how to use !include.

@cottsay
Copy link
Member Author

cottsay commented Aug 27, 2020

Please update the docs...

cf07f36

@cottsay cottsay merged commit f784d22 into master Aug 28, 2020
@cottsay cottsay deleted the yaml_include branch August 28, 2020 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants