-
Notifications
You must be signed in to change notification settings - Fork 788
Update the generate.py script #1465
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
base: main
Are you sure you want to change the base?
Update the generate.py script #1465
Conversation
…ry README - Add `sample_hpp` subcommand for generating Vulkan-Hpp samples with fallback to `sample_api` - Automatically update Antora nav.adoc with new sample entries, nesting HPP variants under base samples - Automatically add sample sections to category README with optional `--readme-description` flag - Improve documentation with usage examples and optional parameter syntax - Add `slugify()` helper to match CMake folder naming conventions
asuessenbach
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems evaluating variables as part of a string should be done differently:
| + "HPP template 'sample_hpp' not found, falling back to 'sample_api'. The generated sample will not be Vulkan-Hpp based unless you provide the template." | ||
| + terminal_colors.END | ||
| ) | ||
| template_to_use = "sample_api" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You take "sample_api" as a fallback, but do not check for os.path.isdir?
| nav_title = title_base | ||
|
|
||
| # Find the category block header | ||
| cat_header = "* xref:samples/{category}/README.adoc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With my environment, cat_header now looks like "* xref::samples/{category}/README.adoc", which obviously is not found in the lines of nav.adoc.
What works for me is
cat_header = "* xref:samples/" + category + "/README.adoc"
And then, the entries generated in nav.adoc and README.adoc are a bit strange:
** {target_ref}[{nav_title}]
and
=== {target_ref}[{title}]
{desc}
|
How is this supposed to work? I don't see a hpp template file under "bldsys\cmake\template", where the other template files are placed. |
sample_hppsubcommand for generating Vulkan-Hpp samples with fallback tosample_api--readme-descriptionflagslugify()helper to match CMake folder naming conventionsDescription
Please include a summary of the change, new sample or fixed issue. Please also include relevant motivation and context.
Please read the contribution guidelines
Fixes #
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batchcommand line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: