diff --git a/Makefile b/Makefile index 08bc35b..d67f416 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ upload: setup.py twine upload dist/* update: - curl https://stackpath.bootstrapcdn.com/bootstrap/4.4.0/css/bootstrap.min.css > tuna/web/static/bootstrap.min.css + curl https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css > tuna/web/static/bootstrap.min.css curl https://d3js.org/d3.v5.min.js > tuna/web/static/d3.min.js publish: tag upload diff --git a/README.md b/README.md index 7efef48..3c1b56c 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ [![GitHub stars](https://img.shields.io/github/stars/nschloe/tuna.svg?style=flat-square&logo=github&label=Stars&logoColor=white)](https://github.com/nschloe/tuna) [![PyPi downloads](https://img.shields.io/pypi/dm/tuna.svg?style=flat-square)](https://pypistats.org/packages/tuna) -tuna is a modern, lightweight Python profile viewer inspired by the amazing +tuna is a modern, lightweight Python profile viewer inspired by [SnakeViz](https://github.com/jiffyclub/snakeviz). It handles runtime and import -profiles, has zero dependencies, uses [d3](https://d3js.org/) and +profiles, has no Python dependencies, uses [d3](https://d3js.org/) and [bootstrap](https://getbootstrap.com/), and avoids [certain](https://github.com/jiffyclub/snakeviz/issues/111) [errors](https://github.com/jiffyclub/snakeviz/issues/112) present in SnakeViz. diff --git a/tuna/__about__.py b/tuna/__about__.py index 9d3e261..6aa6fde 100644 --- a/tuna/__about__.py +++ b/tuna/__about__.py @@ -2,6 +2,6 @@ __author_email__ = "nico.schloemer@gmail.com" __copyright__ = "Copyright (c) 2018-2019, {} <{}>".format(__author__, __author_email__) __license__ = "License :: OSI Approved :: MIT License" -__version__ = "0.3.4" +__version__ = "0.3.5" __maintainer__ = "Nico Schlömer" __status__ = "Development Status :: 5 - Production/Stable" diff --git a/tuna/main.py b/tuna/main.py index 50a2359..07063a2 100644 --- a/tuna/main.py +++ b/tuna/main.py @@ -31,7 +31,7 @@ def read(filename): # runtime profile data = read_runtime_profile(filename) - return {"data": data, "filename": filename} + return data def read_runtime_profile(prof_filename): @@ -188,15 +188,15 @@ def read_import_profile(filename): return tree[0] -def render(data): +def render(data, filename): this_dir = os.path.dirname(__file__) with open(os.path.join(this_dir, "web", "index.html")) as _file: template = string.Template(_file.read()) return template.substitute( - data=escape(json.dumps(data["data"]).replace("