Repository navigation
Conversation
The half_remember_proverb pattern matches a string that names a proverb and half remember or half-remember, in either order. Bank prose about lyrics or lines a user only half remembers passes the audit. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
The template-text guard reads every YAML file in the asset folder of each registered probe, found through probe_assets_dir, so it reads banks a probe keeps in its own folder. A probe whose folder does not resolve fails the guard. Each finding names the bank, entry, field and pattern. audit_one_bank reads a bank anywhere on disk and loads it with libyaml when it is available. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
The template-text audit checks every string in a bank, list items included, such as subtopic_hints and the lists a LocalizedText field holds. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
test_asset_yaml reads every YAML file in the asset folder of each registered probe, through _asset_audit.shipped_banks, so the banks under engine/probes/<label>/assets/ are checked along with the packaged ones. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
tests/test_no_template_text.pyaudits every YAML file in the asset folder of every registered probe, found throughprobe_assets_dir, so it reads each bank where its probe keeps it, the banks inengine/probes/<label>/assets/included. A probe whose folder does not resolve fails the guard.Builds on #121.
half_remember_proverbmatches a string that names a proverb and "half remember" or "half-remember", in either order. Thesov_ai_dynamicen_GBcategoryuk-poetry-and-music, which asks users to bring up lyrics they only half remember, passes the audit._asset_audit.shipped_banks()lists each registered probe's YAML files by<label>/<path in its folder>, and the guard audits exactly those, so a new bank or locale is audited with no list to update. Each finding names the bank, entry, field and pattern.audit_one_bankreads a bank anywhere on disk and loads it with libyaml when it is available.subtopic_hintsand the lists aLocalizedTextfield holds.tests/test_asset_yaml.pyreads the same banks throughshipped_banks(), so the YAML files underengine/probes/<label>/assets/are checked for values a#comment cuts short, along with the packaged ones. It reads 164 files, the generatedcorpus.yamlfiles aside, 25 of them underengine/probes/<label>/assets/.How it was verified
At each commit, on that commit's tree:
The output is from the fourth commit. The test count is 4654 at the first two commits and 4655 at the last two.
At the head:
Each commit's new test fails on the commit before it:
At the head, with
half_remember_proverbset back tohalf remember, the guard reads the shipped banks and fails: