-
Notifications
You must be signed in to change notification settings - Fork 2
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
Issue 167 HTML file Support #171
Conversation
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.
some code repetition and .vscode being uploaded instead of ignored, otherwise it looks good
.vscode/settings.json
Outdated
@@ -0,0 +1,3 @@ | |||
{ |
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.
I wanna say that .vscode should be in the .gitignore, currently, it just ignores .vs, if you're able, add .vscode to the .gitignore
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.
As Noah said, this should be added to .gitignore.
if blob.name.endswith('.txt'): | ||
# Download the text content | ||
file_contents = blob.download_as_text() | ||
|
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.
maybe change this to case switch/ pattern matching to make more readable
@@ -175,7 +212,6 @@ def process_gcs_directory(prefix, result, fuzzy_path_value): | |||
"failContent": fail_content | |||
} | |||
|
|||
# Determine the monitor type and append the file data | |||
if "UnorderedWaypointMonitor" in blob.name: |
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.
seems to be a repeat of above, maybe a way to make reduce code repetition
|
||
elif blob.name.endswith('.txt'): | ||
file_contents = blob.download_as_text() | ||
|
||
info_content = get_info_contents(file_contents, "INFO", {}) | ||
pass_content = get_info_contents(file_contents, "PASS", {}) | ||
fail_content = get_info_contents(file_contents, "FAIL", {}) | ||
|
||
file_data = { |
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.
repeat of above, some way to reduce code repition
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.
.vscode/settings.json
Outdated
@@ -0,0 +1,3 @@ | |||
{ |
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.
As Noah said, this should be added to .gitignore.
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.
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.
Fixes #167
Modified the process_gcs_directory function to detect HTML files by generating a public URL for each HTML file. In addition, I ensured that the JSON includes a path attribute for HTML files containing the public URL.
The GCS bucket in the process_gcs_directory did not include HTML files because it didn't recognize them. Including HTML files that are categorized properly helps reduce integration issues later and allows for easier testing and validation.
Checked the JSON response for HTML file details with a valid path and now HTML reports can be found under the acceptance reports.