Skip to content
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

fix: edit presubmit for to simplify configuration #1915

Merged
merged 18 commits into from
May 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
🦉 Updates from OwlBot post-processor
  • Loading branch information
gcf-owl-bot[bot] committed May 10, 2024
commit 839ee1b01914e645f0468f1381bbe3de10ffed70
6 changes: 4 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import time
from functools import wraps


def timed(func):
"""This decorator prints the execution time for the decorated function."""

Expand All @@ -69,18 +70,19 @@ def wrapper(*args, **kwargs):
result = func(*args, **kwargs)
end = time.time()
total_seconds = round(end - start)
hours = total_seconds // 3600 # Integer division to get hours
hours = total_seconds // 3600 # Integer division to get hours
remaining_seconds = total_seconds % 3600 # Modulo to find remaining seconds
minutes = remaining_seconds // 60
seconds = remaining_seconds % 60
human_time = f"{hours:}:{minutes:0>2}:{seconds:0>2}"
print(f"session ran in {total_seconds} seconds ({human_time})")

#logger.debug("{} ran in {}s".format(func.__name__, round(end - start, 2)))
# logger.debug("{} ran in {}s".format(func.__name__, round(end - start, 2)))
return result

return wrapper


def default(session, install_extras=True):
"""Default unit test session.

Expand Down