Skip to content

Conversation

LaikaN57
Copy link
Contributor

Overview

Brief description of what this PR does, and why it is needed (use case)?

Fixes a bunch of HTML validation errors in the output reports.

image

Testing/Steps taken to ensure quality

How did you validate the changes in this PR?

TBD

Notes

Optional. Caveats, Alternatives, Other relevant information.

Testing Instructions

How to test this PR Start after checking out this branch (bulleted)

  • Include test case, and expected output

@andrew-glenn
Copy link
Contributor

I realize it's still in draft status, but many many thanks for this.


status = stack.status
status_class = "test-red"
status_icon = "❌"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some attempt at accessibility for R/G colorblind.

Comment on lines +55 to +66
stylesheet = """th, td {
border: 1px solid black;
table {
border-collapse: collapse;
}
td.test-green {
background-color: #98FF98;
}
td.test-red {
background-color: #FCB3BC;
}
"""
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most basic stylesheet to convey the point of the test results with no fluff.

Comment on lines +205 to +206
def get_installed_version():
return importlib.metadata.version(__package__ or __name__)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took this from _cli.py. I had issues when using that version directly and when attempting to pull it out into _common_utils.py.

I might give this part one more attempt and then ask for help.

self._output_file = output_file
self._version = version

# TODO: refactor for readability
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrew-glenn I may have gone too far with the refactor here. If you don't mind just giving this a quick glance to see if you want me to break it up or not. (I do still need to do a little clean up on the tests.)

As it is right now, I have made the following improvements:

  • fixed HTML validation issues
  • fixed version footer
  • added fallback stylesheet if GH is unreachable (or transient network errors)
  • added R/G colorblind helper icons
  • refactored the yattag functions/contexts to be a bit more concise/readable (and prefered as per docs)

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