From 5161de9784b4fe8503cddaaa5596038c5711523e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= Date: Wed, 13 May 2020 09:32:13 +0200 Subject: [PATCH 1/5] fix makefile --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fcbd262..c5a715c 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,7 @@ tag: # git push --tags curl -H "Authorization: token `cat $(HOME)/.github-access-token`" -d '{"tag_name": "v$(VERSION)"}' https://api.github.com/repos/nschloe/stressberry/releases -# https://packaging.python.org/distributing/#id72 -upload: setup.py +upload: @if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "master" ]; then exit 1; fi rm -f dist/* # python3 setup.py sdist bdist_wheel From 5ef2be41be61e8d21befb140b5cd6dc7ba840971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= Date: Wed, 13 May 2020 09:34:23 +0200 Subject: [PATCH 2/5] cleanplotlib -> dufte --- setup.cfg | 2 +- stressberry/cli/plot.py | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/setup.cfg b/setup.cfg index 5344735..15659f6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,7 +27,7 @@ classifiers = packages = find: # importlib_metadata can be removed when we support Python 3.8+ only install_requires = - cleanplotlib + dufte importlib_metadata matplotlib pyyaml diff --git a/stressberry/cli/plot.py b/stressberry/cli/plot.py index 285082d..3b88d2c 100644 --- a/stressberry/cli/plot.py +++ b/stressberry/cli/plot.py @@ -6,9 +6,11 @@ def plot(argv=None): - import cleanplotlib as cpl + import dufte import matplotlib.pyplot as plt + plt.style.use(dufte.style) + parser = _get_parser_plot() args = parser.parse_args(argv) @@ -17,9 +19,6 @@ def plot(argv=None): # actually plot it fig = plt.figure() ax1 = fig.add_subplot(1, 1, 1) - a = [] - b = [] - c = [] for d in data: temperature_data = d["temperature"] if args.delta_t: @@ -27,18 +26,17 @@ def plot(argv=None): zip_object = zip(d["temperature"], d["ambient"]) for d["temperature"], d["ambient"] in zip_object: temperature_data.append(d["temperature"] - d["ambient"]) - a.append(d["time"]) - b.append(temperature_data) - c.append(d["name"]) - cpl.multiplot(a, b, c) + plt.plot(d["time"], temperature_data, label=d["name"]) + + dufte.legend() if args.delta_t: plot_yaxis_label = "Δ temperature [°C over ambient]" else: plot_yaxis_label = "temperature [°C]" - cpl.xlabel("time [s]") - cpl.ylabel(plot_yaxis_label) + plt.xlabel("time [s]") + plt.ylabel(plot_yaxis_label) if args.temp_lims: ax1.set_ylim(*args.temp_lims) From d680550f7ddeca41b2b0689bd64bb4c59b25dbdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= Date: Wed, 13 May 2020 11:43:20 +0200 Subject: [PATCH 3/5] add flirc case to readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 74775a6..677fb28 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,9 @@ plots which can easily be compared. custom case with fans (@flyingferret, [#21](https://github.com/nschloe/stressberry/issues/21)) | [KKSB case](https://kksb-cases.com/products/kksb-raspberry-pi-4-case-aluminium) (@JohBod, [#31](https://github.com/nschloe/stressberry/issues/31)) | [Argon One case](https://www.argon40.com/argon1/argon-one-pi4.html) (@jholloway, [#37](https://github.com/nschloe/stressberry/issues/37)) | | [hex wrench case](https://www.amazon.ca/Aluminum-Model-Raspberry-Wrench-Enclosure/dp/B07W6FT1DD?th=1) (@patrickpoirier51, [#45](https://github.com/nschloe/stressberry/issues/45)) | [CooliPi](https://www.coolipi.com/) (@CooliPi, [#47](https://github.com/nschloe/stressberry/issues/47), [#48](https://github.com/nschloe/stressberry/issues/48)) | [low-profile ice tower case](https://www.aliexpress.com/i/4000288119233.html) (@leonhess, [#54](https://github.com/nschloe/stressberry/issues/54)) + | | +[Flirc case](https://flirc.tv/more/raspberry-pi-4-case) (@RichardKav, [#73](https://github.com/nschloe/stressberry/issues/73)) | | +flirc4b.jpeg ### Raspberry Pi 3B+ From b5f78277462750bbd7120ca4e9dec2d6b2670663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= Date: Wed, 13 May 2020 11:44:21 +0200 Subject: [PATCH 4/5] readme fix --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 677fb28..1f1a011 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,6 @@ custom case with fans (@flyingferret, [#21](https://github.com/nschloe/stressbe [hex wrench case](https://www.amazon.ca/Aluminum-Model-Raspberry-Wrench-Enclosure/dp/B07W6FT1DD?th=1) (@patrickpoirier51, [#45](https://github.com/nschloe/stressberry/issues/45)) | [CooliPi](https://www.coolipi.com/) (@CooliPi, [#47](https://github.com/nschloe/stressberry/issues/47), [#48](https://github.com/nschloe/stressberry/issues/48)) | [low-profile ice tower case](https://www.aliexpress.com/i/4000288119233.html) (@leonhess, [#54](https://github.com/nschloe/stressberry/issues/54)) | | [Flirc case](https://flirc.tv/more/raspberry-pi-4-case) (@RichardKav, [#73](https://github.com/nschloe/stressberry/issues/73)) | | -flirc4b.jpeg ### Raspberry Pi 3B+ From 851959506c417425709c1bd02ed697159e38191b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= Date: Wed, 13 May 2020 11:46:21 +0200 Subject: [PATCH 5/5] version bump --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 15659f6..e0b153f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = stressberry -version = 0.3.0 +version = 0.3.1 author = Nico Schlömer email = nico.schloemer@gmail.com description = Stress tests for the Raspberry Pi