Merge branch 'bugfix/env_var_and_report_bug' into 'master'
Bugfix/env var and report bug See merge request caimira/caimira!488
This commit is contained in:
commit
4ed285d84a
2 changed files with 3 additions and 3 deletions
|
|
@ -516,7 +516,7 @@ def make_app(
|
|||
'filename': 'userguide.html.j2'}),
|
||||
]
|
||||
|
||||
profiler_enabled = os.environ.get('CAIMIRA_PROFILER_ENABLED', 0)
|
||||
profiler_enabled = int(os.environ.get('CAIMIRA_PROFILER_ENABLED', 0))
|
||||
if profiler_enabled:
|
||||
urls += [
|
||||
(get_root_url(CaimiraProfiler.ROOT_URL), ProfilerPage),
|
||||
|
|
|
|||
|
|
@ -346,8 +346,8 @@ def non_zero_percentage(percentage: int) -> str:
|
|||
return "<0.01%"
|
||||
elif percentage < 1:
|
||||
return "{:0.2f}%".format(percentage)
|
||||
elif np.isnan(percentage):
|
||||
return "99.9%"
|
||||
elif percentage > 99.9 or np.isnan(percentage):
|
||||
return ">99.9%"
|
||||
else:
|
||||
return "{:0.1f}%".format(percentage)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue