Browse Source

Add yappi dependency for "nilmdb-server -y", but don't require ipython

tags/nilmdb-2.1.0
Jim Paris 2 years ago
parent
commit
88466dcafe
2 changed files with 7 additions and 3 deletions
  1. +5
    -2
      nilmdb/scripts/nilmdb_server.py
  2. +2
    -1
      requirements.txt

+ 5
- 2
nilmdb/scripts/nilmdb_server.py View File

@@ -78,9 +78,12 @@ def main():
stats = yappi.get_func_stats()
stats.sort("ttot")
stats.print_all()
from IPython import embed
embed(header="Use the `yappi` or `stats` object to explore "
try:
from IPython import embed
embed(header="Use the `yappi` or `stats` object to explore "
"further, quit to exit")
except ModuleNotFoundError:
print("\nInstall ipython to explore further")
else:
server.start(blocking=True)
except nilmdb.server.serverutil.CherryPyExit:


+ 2
- 1
requirements.txt View File

@@ -13,7 +13,7 @@ python-datetime-tz==0.5.4
python-dateutil==2.8.1
requests==2.24.0
tz==0.2.2
WebTest==2.0.35
yappi==1.2.5

## The following requirements were added by pip freeze:
beautifulsoup4==4.9.1
@@ -37,4 +37,5 @@ tempora==4.0.0
urllib3==1.25.10
waitress==1.4.4
WebOb==1.8.6
WebTest==2.0.35
zc.lockfile==2.0

Loading…
Cancel
Save