spectrum-barometer 2.2.2__tar.gz → 2.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {spectrum_barometer-2.2.2/spectrum_barometer.egg-info → spectrum_barometer-2.2.3}/PKG-INFO +1 -1
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/barometer/graphs.py +20 -9
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/barometer_logger.py +1 -1
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/pyproject.toml +1 -1
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3/spectrum_barometer.egg-info}/PKG-INFO +1 -1
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/web/templates/dashboard.html +1 -1
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/web/templates/stats.html +1 -1
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/LICENSE.txt +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/MANIFEST.in +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/README.md +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/barometer/__init__.py +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/barometer/actions.py +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/barometer/background.py +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/barometer/data.py +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/barometer/paths.py +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/setup.cfg +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/spectrum_barometer.egg-info/SOURCES.txt +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/spectrum_barometer.egg-info/dependency_links.txt +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/spectrum_barometer.egg-info/entry_points.txt +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/spectrum_barometer.egg-info/requires.txt +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/spectrum_barometer.egg-info/top_level.txt +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/web/__init__.py +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/web/app.py +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/web/routes.py +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/web/static/refresh.js +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/web/static/stabbypeng.png +0 -0
- {spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/web/templates/base.html +0 -0
|
@@ -12,7 +12,18 @@ from qbstyles import mpl_style
|
|
|
12
12
|
from pathlib import Path
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
mpl_style(dark=True)
|
|
15
|
+
mpl_style(dark=True, minor_ticks=False)
|
|
16
|
+
|
|
17
|
+
def _apply_x_axis_format(ax, days):
|
|
18
|
+
"""Show hours if generating one day"""
|
|
19
|
+
if days == 1:
|
|
20
|
+
ax.xaxis.set_major_locator(mdates.HourLocator(interval=1))
|
|
21
|
+
ax.xaxis.set_major_formatter(mdates.DateFormatter('%H:%M'))
|
|
22
|
+
|
|
23
|
+
else:
|
|
24
|
+
ax.xaxis.set_major_locator(mdates.AutoDateLocator())
|
|
25
|
+
ax.xaxis.set_major_formatter(mdates.DateFormatter('%m/%d %H:%M'))
|
|
26
|
+
|
|
16
27
|
def generate_line_graph(df, output, days):
|
|
17
28
|
"""Standard line graph"""
|
|
18
29
|
fig, ax = plt.subplots(figsize=(12, 6))
|
|
@@ -25,7 +36,7 @@ def generate_line_graph(df, output, days):
|
|
|
25
36
|
ax.set_title(f'Barometric Pressure - Last {days} Days', fontsize=14, fontweight='bold')
|
|
26
37
|
ax.grid(True, alpha=0.3)
|
|
27
38
|
ax.legend()
|
|
28
|
-
ax
|
|
39
|
+
_apply_x_axis_format(ax, days)
|
|
29
40
|
plt.xticks(rotation=45)
|
|
30
41
|
plt.tight_layout()
|
|
31
42
|
plt.savefig(output, dpi=150, bbox_inches='tight')
|
|
@@ -50,7 +61,7 @@ def generate_smooth_graph(df, output, days, window=12):
|
|
|
50
61
|
ax.set_title(f'Barometric Pressure with Trend - Last {days} Days', fontsize=14, fontweight='bold')
|
|
51
62
|
ax.grid(True, alpha=0.3)
|
|
52
63
|
ax.legend()
|
|
53
|
-
ax
|
|
64
|
+
_apply_x_axis_format(ax, days)
|
|
54
65
|
plt.xticks(rotation=45)
|
|
55
66
|
plt.tight_layout()
|
|
56
67
|
plt.savefig(output, dpi=150, bbox_inches='tight')
|
|
@@ -71,7 +82,7 @@ def generate_area_graph(df, output, days):
|
|
|
71
82
|
ax.set_title(f'Barometric Pressure Area - Last {days} Days', fontsize=14, fontweight='bold')
|
|
72
83
|
ax.grid(True, alpha=0.3)
|
|
73
84
|
ax.legend()
|
|
74
|
-
ax
|
|
85
|
+
_apply_x_axis_format(ax, days)
|
|
75
86
|
plt.xticks(rotation=45)
|
|
76
87
|
plt.tight_layout()
|
|
77
88
|
plt.savefig(output, dpi=150, bbox_inches='tight')
|
|
@@ -160,7 +171,7 @@ def generate_rate_of_change(df, output, days):
|
|
|
160
171
|
ax.set_ylabel('Pressure Change (hPa/hour)', fontsize=12)
|
|
161
172
|
ax.set_title(f'Rate of Pressure Change - Last {days} Days', fontsize=14, fontweight='bold')
|
|
162
173
|
ax.grid(True, alpha=0.3, axis='y')
|
|
163
|
-
ax
|
|
174
|
+
_apply_x_axis_format(ax, days)
|
|
164
175
|
plt.xticks(rotation=45)
|
|
165
176
|
|
|
166
177
|
# Legend
|
|
@@ -187,8 +198,8 @@ def generate_dashboard(df, output, days):
|
|
|
187
198
|
ax1.set_title('Pressure Over Time', fontweight='bold')
|
|
188
199
|
ax1.set_ylabel('Pressure (hPa)')
|
|
189
200
|
ax1.grid(True, alpha=0.3)
|
|
190
|
-
ax1.xaxis.set_major_formatter(mdates.DateFormatter('%m/%d'))
|
|
191
|
-
|
|
201
|
+
ax1.xaxis.set_major_formatter(mdates.DateFormatter('%H:%M' if days == 1 else '%m/%d'))
|
|
202
|
+
|
|
192
203
|
# 2. Distribution
|
|
193
204
|
ax2 = fig.add_subplot(gs[1, 0])
|
|
194
205
|
ax2.hist(df['pressure_hpa'], bins=20, color='#2E86AB', alpha=0.7, edgecolor='black')
|
|
@@ -249,9 +260,9 @@ def generate_dashboard(df, output, days):
|
|
|
249
260
|
|
|
250
261
|
def apply_theme(theme: str):
|
|
251
262
|
if theme == "dark":
|
|
252
|
-
mpl_style(dark=True)
|
|
263
|
+
mpl_style(dark=True, minor_ticks=False)
|
|
253
264
|
else:
|
|
254
|
-
mpl_style(dark=False)
|
|
265
|
+
mpl_style(dark=False, minor_ticks=False)
|
|
255
266
|
|
|
256
267
|
|
|
257
268
|
def generate_graph(days=7, output=None, graph_type='line',
|
|
@@ -124,7 +124,7 @@ def cli(ctx, verbose):
|
|
|
124
124
|
@cli.command()
|
|
125
125
|
def version():
|
|
126
126
|
"""Show version information"""
|
|
127
|
-
click.echo("spectrum-barometer version 2.2.
|
|
127
|
+
click.echo("spectrum-barometer version 2.2.3! (that was fast :3)")
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
@cli.command()
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
<nav>
|
|
276
276
|
<a href="{{ url_for('main.dashboard') }}" >Dashboard</a>
|
|
277
277
|
<a href="{{ url_for('main.stats') }}">Statistics</a>
|
|
278
|
-
<a class="version" href="https://github.com/BobaTeagrl/spectrum-barometer">V 2.2.
|
|
278
|
+
<a class="version" href="https://github.com/BobaTeagrl/spectrum-barometer">V 2.2.3 :3</a>
|
|
279
279
|
</nav>
|
|
280
280
|
|
|
281
281
|
<!-- Flash messages -->
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
<nav>
|
|
70
70
|
<a href="{{ url_for('main.dashboard') }}">Dashboard</a>
|
|
71
71
|
<a href="{{ url_for('main.stats') }}">Statistics</a>
|
|
72
|
-
<a class="version" href="https://github.com/BobaTeagrl/spectrum-barometer">V 2.2.
|
|
72
|
+
<a class="version" href="https://github.com/BobaTeagrl/spectrum-barometer">V 2.2.3 :3</a>
|
|
73
73
|
|
|
74
74
|
</nav>
|
|
75
75
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/spectrum_barometer.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/spectrum_barometer.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/spectrum_barometer.egg-info/requires.txt
RENAMED
|
File without changes
|
{spectrum_barometer-2.2.2 → spectrum_barometer-2.2.3}/spectrum_barometer.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|