Skip to content

Commit

Permalink
Test improvement to date time bug fix in autograder.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Gchism94 committed Mar 5, 2024
1 parent bfab8eb commit 55cf248
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions jupyterquest/autograder.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def generate_html_with_css(markdown_content):
overflow: auto;
}
code {
font-family: 'Open Sans', monospace;
font-family: 'Roboto', monospace;
padding: 2px 4px;
font-size: 90%;
border-radius: 3px;
Expand All @@ -84,10 +84,8 @@ def generate_html_with_css(markdown_content):
}
</style>
"""
# Get the current date and time
current_datetime = datetime.now().strftime('%Y-%m-%d %H:%M:%S')

# Semantic HTML structure with the current date and time
html_structure = """
<header>
<h1>Autograder Report</h1>
Expand All @@ -98,16 +96,12 @@ def generate_html_with_css(markdown_content):
<footer>
<p>Generated on: {date}</p>
</footer>
""".format(content=markdown.markdown(markdown_content, extensions=[TableExtension()]),
date=current_datetime)
""".format(content=markdown.markdown(markdown_content, extensions=[TableExtension()]), date=current_datetime)

# Combine CSS and HTML content
styled_html = css_styles + html_structure

return styled_html



def main():
repo_path = os.getenv('GITHUB_WORKSPACE', '.')
reports_dir = os.path.join(repo_path, "docs")
Expand Down

0 comments on commit 55cf248

Please sign in to comment.