-
Notifications
You must be signed in to change notification settings - Fork 7
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
Improved templating audits #238
Conversation
for more information, see https://pre-commit.ci
combine-durations/action.py
Outdated
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.
pre-commit/ruff changes
Maybe a little outside the scope of this pull request, but why isn't the code in this repository being tested? 😅 If you could, maybe now would be a good time to introduce it if only for this code that is changing in this pull request. |
I created a separate issue for adding a testing actions: |
GitHub Actions/Workflows are not exactly easy to test in many cases since they're always running in "production", this GHA is probably an easier one to test since the action defers to a standalone script, but yes it would be good to figure something out testing wise |
eb76256
to
8eaa05a
Compare
bc0e4a9
to
55f3449
Compare
55f3449
to
c595976
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Template SuccessTemplating Audit
Template ErrorTemplating Audit
Got 1 error(s) |
a72247b
to
73ae56d
Compare
Template SuccessWarning This is what the audit looks like when the templating has no errors. Templating Audit
Templating Audit
Got 1 error(s) |
Description
Depends on #243
Whoa this became kinda complicated...no wonder I originally skipped this stuff.
I was reminded (in conda/conda-libmamba-solver#588 (comment)) that I had chosen not to over engineered the templating engine but with the templates becoming more complex (and others besides myself monitoring the templating jobs) we might as well include all the bells and whistles to help ourselves when debugging.
Old Audit
New Audit
This change introduces a few key improvements:
we now watch for context usage so we can warn the user about missing variables, the context has 4 possible states:
if the templating produces errors we will leave the audit open by default, this will make the errors more noticeable
the template stubs table also includes counts of how many times the stubs are referenced