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

Asset validation #163

Merged
merged 3 commits into from
May 30, 2021
Merged

Asset validation #163

merged 3 commits into from
May 30, 2021

Conversation

mockersf
Copy link
Member

@mockersf mockersf commented May 30, 2021

Added a bin for asset validation. Current output is:

> cargo run --bin validate assets
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/validate assets`
0.4 to 0.5 (official)                              - DescriptionMissing
0.3 to 0.4 (unofficial)                            - DescriptionMissing
Bevy Cheatbook                                     - DescriptionTooLong
Using Rapier for Physics                           - DescriptionMissing
Kurinji                                            - DescriptionTooLong
bevy_easings                                       - DescriptionTooLong
autodefault                                        - DescriptionTooLong
bevy_game_template                                 - DescriptionTooLong
physme                                             - DescriptionTooLong
arugio                                             - DescriptionTooLong
Error: ()

Output is not pretty... but it looks OK for me

And added image support

Current accepted toml:

name = string, mandatory
description = string, mandatory, less than 100 chars, no newline, not starting with #, no markdown link
link = string, mandatory
image = string, optional, must be a file name that doesn't go up in folders, can't be a http link, only jpg, gif & png
order = usize, optional // this one should not be used by most assets but is needed for some control of ordering

The description is made mandatory on the validation step and not at parsing time because a few assets currently are missing it, this should be changed once those assets are fixed.

Validation will also fail on an unknown field.

@cart
Copy link
Member

cart commented May 30, 2021

Looks good to me! I'm assuming the plan is to check out the bevy-website repo in the awesome-bevy repo's CI, then run the validator? At least for now that seems preferable to duplicated asset code in the awesome-bevy repo, moving all asset code into the awesome-bevy repo, or creating an new repo.

@mockersf
Copy link
Member Author

mockersf commented May 30, 2021

Once merged, this will work:

cargo install --git https://github.com/bevyengine/bevy-website/ --bin validate

I'll use that to run the validation from awesome-bevy

@cart cart merged commit 641722a into bevyengine:master May 30, 2021
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.

2 participants